Patient Monitoring Exception Reason Selection Wizard

class nh_eobs_mental_health.wizard.nh_clinical_patient_monitoring_exception_select_reason.PatientMonitoringExceptionSelectReason(pool, cr)[source]

A model used for displaying a drop down list of patient monitoring exception ‘reasons’ so that the user can select one.

‘spell_has_open_escalation_tasks’ is used as a flag in the view so that warning messages can be shown.

‘patient_name’ allows the view to easily display the patient name.

patient_name

Basic string field, can be length-limited, usually displayed as a single-line string in clients

Parameters:
  • size (int) – the maximum size of values stored for that field
  • translate (bool) – whether the values of this field can be translated
reasons

The value of such a field is a recordset of size 0 (no record) or 1 (a single record).

Parameters:
  • comodel_name – name of the target model (string)
  • domain – an optional domain to set on candidate values on the client side (domain or string)
  • context – an optional context to use on the client side when handling that field (dictionary)
  • ondelete – what to do when the referred record is deleted; possible values are: 'set null', 'restrict', 'cascade'
  • auto_join – whether JOINs are generated upon search through that field (boolean, by default False)
  • delegate – set it to True to make fields of the target model accessible from the current model (corresponds to _inherits)

The attribute comodel_name is mandatory except in the case of related fields or field extensions.

spell_has_open_escalation_tasks
start_patient_monitoring_exception(*args, **kwargs)[source]

As this model is only for the purposes of display in the UI this method is limited in that it simply receives the call from the view and passes on the necessary data in the model to ~models.nh_clinical_wardboard.NHClinicalWardboard .start_obs_stop where most of the logic is implemented.