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

# Class cAddress

source code

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

A class representing an address as an entity in itself.

We consider addresses to be self-complete "labels" for locations. It does not depend on any people actually living there. Thus an address can get attached to as many people as we want to signify that that is their place of residence/work/...

This class acts on the address as an entity. Therefore it can modify the address fields. Think carefully about *modifying* addresses attached to people, though. Most times when you think person.modify_address() what you *really* want is as sequence of person.unlink_address(old) and person.link_address(new).

Modifying an address may or may not be the proper thing to do as it will transparently modify the address for *all* the people to whom it is attached. In many cases you will want to create a *new* address and link it to a person instead of the old address.

Instance Methods
format(self) | source code
Inherited from `pycommon.gmBusinessDBObject.cBusinessDBObject`: `__del__`, `__getitem__`, `__init__`, `__setitem__`, `__str__`, `fields_as_dict`, `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__`