Package Gnumed :: Package business :: Module gmDemographicRecord :: Class cOrg
[frames] | no frames]

Class cOrg

source code

                                   object --+    
                                            |    
pycommon.gmBusinessDBObject.cBusinessDBObject --+
                                                |
                                               cOrg

Organisations

This is also the common ancestor of cIdentity, self._table is used to hide the difference. The aim is to be able to sanely write code which doesn't care whether its talking to an organisation or an individual

Instance Methods
 
cleanup(self) source code
 
export_demographics(self) source code
 
get_members(self)
Returns a list of (address dict, cIdentity) tuples
source code
 
set_member(self, person, address)
Binds a person to this organisation at this address.
source code
 
unlink_person(self, person) source code
 
getId(self)
Hide the difference between org.id and v_basic_person.pk_identity
source code

Inherited from pycommon.gmBusinessDBObject.cBusinessDBObject: __del__, __getitem__, __init__, __setitem__, __str__, fields_as_dict, format, get_fields, get_patient, get_updatable_fields, is_modified, refetch_payload, same_payload, save, save_payload

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

set_member(self, person, address)

source code 

Binds a person to this organisation at this address. person is a cIdentity object address is a dict of {'number', 'street', 'addendum', 'city', 'postcode', 'type'} type is one of the IDs returned by getAddressTypes