Gnumed.business.gmPerson.cPerson

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

# Class cPerson

source code

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

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, with_nickname=True) | source code
get_description(self, with_nickname=True) | 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
suggest_external_id(self, target=None, encoding=None) | source code
suggest_external_ids(self, target=None, encoding=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
export_as_xml_linuxmednews(self, filename=None) | source code
export_as_vcard(self, filename=None) | source code
export_as_mecard(self, filename=None) | source code
MECARD(self) http://blog.thenetimpact.com/2011/07/decoding-qr-codes-how-to-format-data-for-qr-code-generators/ https://www.nttdocomo.co.jp/english/service/developer/make/content/barcode/function/application/addressbook/index.html | 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, region_code=None, country_code=None, subunit=None, suburb=None, id_type=None, address=None, adr_type=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_bills(self, order_by=None, pk_patient=None) | 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', none_string=None, honor_estimation=False) | source code
get_medical_age(self) | source code
dob_in_range(self, min_distance='1 week', max_distance='1 week') | source code
current_birthday_passed(self) | source code
birthday_this_year(self) | source code
birthday_next_year(self) | source code
get_last_encounter(self) | source code
get_messages(self, order_by=None) | source code
delete_message(self, pk=None) | source code
get_subdir_name(self) Format patient demographics into patient specific path name fragment. | source code
Inherited from `pycommon.gmBusinessDBObject.cBusinessDBObject`: `__del__`, `__getitem__`, `__init__`, `__str__`, `fields_as_dict`, `format`, `get_fields`, `get_patient`, `get_updatable_fields`, `is_modified`, `patient_pk`, `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)`
| as_patient = `property(_get_as_patient, lambda x: x)`
| 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)`
| gender_list = `property(_get_gender_list, 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)`
| external_id_suggestion = `property(suggest_external_id, lambda `...``
| waiting_list_entries = `property(get_waiting_list_entry, lambda`...``
| export_area = `property(_get_export_area, lambda x: x)`
| comm_channels = `property(get_comm_channels, lambda x: x)`
| bills = `property(get_bills, lambda x: x)`
| emergency_contact_in_database = `property(_get_emergency_contac`...``
| birthday_last_year = `property(_get_birthday_last_year, lambda `...``
| 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)`
| suppressed_hints = `property(_get_suppressed_hints, lambda x: x)`
| primary_provider_identity = `property(_get_primary_provider_ide`...``
| primary_provider = `property(_get_primary_provider, lambda x: x)`
| subdir_name = `property(get_subdir_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 bool 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.

### MECARD(self) | source code
http://blog.thenetimpact.com/2011/07/decoding-qr-codes-how-to-format-data-for-qr-code-generators/ https://www.nttdocomo.co.jp/english/service/developer/make/content/barcode/function/application/addressbook/index.html MECARD:N:NAME;ADR:pobox,subunit,unit,street,ort,region,zip,country;TEL:111111111;FAX:22222222;EMAIL:mail@praxis.org; MECARD:N:lastname,firstname;BDAY:YYYYMMDD;ADR:pobox,subunit,number,street,location,region,zip,country;; MECARD:N:$<lastname::::>$,$<firstname::::>$;BDAY:$<date_of_birth::%Y%m%d::>$;ADR:,$<adr_subunit::home::>$,$<adr_number::home::>$,$<adr_street::home::>$,$<adr_location::home::>$,,$<adr_postcode::home::>$,$<adr_country::home::>$;;

### 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 str instance. @param is_confidential Wether the data must be treated as confidential. @type is_confidential A bool instance.

### link_address(self, number=None, street=None, postcode=None, urb=None, region_code=None, country_code=None, subunit=None, suburb=None, id_type=None, address=None, adr_type=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

  ### external_id_suggestion Value:
      property(suggest_external_id, lambda x: x)

  ### 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)

  ### birthday_last_year Value:
      property(_get_birthday_last_year, lambda x: x)

  ### primary_provider_identity Value:
      property(_get_primary_provider_identity, lambda x: x)