Home | Trees | Indices | Help |
|
---|
|
object --+ | pycommon.gmBorg.cBorg --+ | gmCurrentPatient
Patient Borg to hold the currently active patient. There may be many instances of this but they all share state. The underlying dem.identity row must have .deleted set to FALSE. The sequence of events when changing the active patient: 1) Registered callbacks are run. Those are run synchronously. If a callback returns False or throws an exception the patient switch is aborted. Callback code can rely on the patient still being active and to not go away until it returns. It is not passed any arguments and must return False or True. 2) Signal "pre_patient_unselection" is sent. This does not wait for nor check results. The keyword pk_identity contains the PK of the person being switched away from. 3) the current patient is unset (gmNull.cNull) 4) Signal "current_patient_unset" is sent At this point resetting GUI fields to empty should be done. The active patient is not there anymore. This does not wait for nor check results. 5) The current patient is set to the new value. The new patient can also remain gmNull.cNull in case the calling code explicitely unset the current patient. 6) Signal "post_patient_selection" is sent. Code listening to this signal can assume that the new patient is already active.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Static Methods | |
Inherited from |
Class Variables | |
connected = property(_get_connected, lambda x: x)
|
|
locked = property(_get_locked, _set_locked)
|
Properties | |
Inherited from |
Method Details |
Change or get currently active patient. patient: * None: get currently active patient * -1: unset currently active patient * cPatient instance: set active patient if possible
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Aug 19 01:55:20 2018 | http://epydoc.sourceforge.net |