Package Gnumed :: Package business :: Module gmPerson :: Class cIdentity
[frames] | no frames]

Class cIdentity

source code

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

Instance Methods
 
__setitem__(self, attribute, value) source code
 
cleanup(self) source code
 
get_active_name(self) source code
 
get_names(self, active_only=False, exclude_active=False) source code
 
get_description_gender(self) source code
 
get_description(self) source code
 
add_name(self, firstnames, lastnames, active=True)
Add a name.
source code
 
delete_name(self, name=None) source code
 
set_nickname(self, nickname=None)
Set the nickname.
source code
 
get_tags(self, order_by=None) source code
 
add_tag(self, tag) source code
 
remove_tag(self, tag) source code
 
add_external_id(self, type_name=None, value=None, issuer=None, comment=None, pk_type=None)
Adds an external ID to the patient.
source code
 
update_external_id(self, pk_id=None, type=None, value=None, issuer=None, comment=None)
Edits an existing external ID.
source code
 
get_external_ids(self, id_type=None, issuer=None) source code
 
delete_external_id(self, pk_ext_id=None) source code
 
assimilate_identity(self, other_identity=None, link_obj=None)
Merge another identity into this one.
source code
 
put_on_waiting_list(self, urgency=0, comment=None, zone=None) source code
 
get_waiting_list_entry(self) source code
 
export_as_gdt(self, filename=None, encoding='iso-8859-15', external_id_type=None) source code
 
get_occupations(self) source code
 
link_occupation(self, occupation=None, activities=None)
Link an occupation with a patient, creating the occupation if it does not exists.
source code
 
unlink_occupation(self, occupation=None) source code
 
get_comm_channels(self, comm_medium=None) source code
 
link_comm_channel(self, comm_medium=None, url=None, is_confidential=False, pk_channel_type=None)
Link a communication medium with a patient.
source code
 
unlink_comm_channel(self, comm_channel=None) source code
 
get_addresses(self, address_type=None) source code
 
link_address(self, number=None, street=None, postcode=None, urb=None, state=None, country=None, subunit=None, suburb=None, id_type=None, address=None)
Link an address with a patient, creating the address if it does not exists.
source code
 
unlink_address(self, address=None, pk_address=None)
Remove an address from the patient.
source code
 
get_relatives(self) source code
 
link_new_relative(self, rel_type='parent') source code
 
delete_relative(self, relation) source code
 
get_formatted_dob(self, format='%Y %b %d', encoding=None, none_string=None) source code
 
get_medical_age(self) source code
 
dob_in_range(self, min_distance=u'1 week', max_distance=u'1 week') source code
 
get_last_encounter(self) source code
 
get_messages(self, order_by=None) source code
 
delete_message(self, pk=None) source code
 
get_dirname(self)
Format patient demographics into patient specific path name fragment.
source code

Inherited from pycommon.gmBusinessDBObject.cBusinessDBObject: __del__, __getitem__, __init__, __str__, __unicode__, 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__

Class Variables
  ID = property(_get_ID, _set_ID)
  is_patient = property(_get_is_patient, _set_is_patient)
  staff_id = property(_get_staff_id, lambda x: x)
  gender_symbol = property(_get_gender_symbol, lambda x: x)
  gender_string = property(_get_gender_string, lambda x: x)
  active_name = property(get_active_name, lambda x: x)
  tags = property(get_tags, lambda x: x)
  external_ids = property(get_external_ids, lambda x: x)
  waiting_list_entries = property(get_waiting_list_entry, lambda...
  export_tray = property(_get_export_tray, lambda x: x)
  emergency_contact_in_database = property(_get_emergency_contac...
  messages = property(get_messages, lambda x: x)
  overdue_messages = property(_get_overdue_messages, lambda x: x)
  dynamic_hints = property(_get_dynamic_hints, lambda x: x)
  primary_provider = property(_get_primary_provider, lambda x: x)
  dirname = property(get_dirname, lambda x: x)
  tray_dir_name = property(_get_tray_dir_name, lambda x: x)
Properties

Inherited from object: __class__

Method Details

__setitem__(self, attribute, value)
(Index assignment operator)

source code 
Overrides: pycommon.gmBusinessDBObject.cBusinessDBObject.__setitem__

add_name(self, firstnames, lastnames, active=True)

source code 

Add a name.

@param firstnames The first names. @param lastnames The last names. @param active When True, the new name will become the active one (hence setting other names to inactive) @type active A types.BooleanType instance

set_nickname(self, nickname=None)

source code 

Set the nickname. Setting the nickname only makes sense for the currently active name. @param nickname The preferred/nick/warrior name to set.

add_external_id(self, type_name=None, value=None, issuer=None, comment=None, pk_type=None)

source code 

Adds an external ID to the patient.

creates ID type if necessary

update_external_id(self, pk_id=None, type=None, value=None, issuer=None, comment=None)

source code 

Edits an existing external ID.

Creates ID type if necessary.

assimilate_identity(self, other_identity=None, link_obj=None)

source code 

Merge another identity into this one.

Keep this one. Delete other one.

link_occupation(self, occupation=None, activities=None)

source code 

Link an occupation with a patient, creating the occupation if it does not exists.

@param occupation The name of the occupation to link the patient to.

link_comm_channel(self, comm_medium=None, url=None, is_confidential=False, pk_channel_type=None)

source code 

Link a communication medium with a patient.

@param comm_medium The name of the communication medium. @param url The communication resource locator. @type url A types.StringType instance. @param is_confidential Wether the data must be treated as confidential. @type is_confidential A types.BooleanType instance.

link_address(self, number=None, street=None, postcode=None, urb=None, state=None, country=None, subunit=None, suburb=None, id_type=None, address=None)

source code 

Link an address with a patient, creating the address if it does not exists.

@param id_type The primary key of the address type.

unlink_address(self, address=None, pk_address=None)

source code 

Remove an address from the patient.

The address itself stays in the database. The address can be either cAdress or cPatientAdress.


Class Variable Details

waiting_list_entries

Value:
property(get_waiting_list_entry, lambda x: x)

emergency_contact_in_database

Value:
property(_get_emergency_contact_from_database, lambda x: x)