Escalation Tasks Base Model¶
-
class
nh_observations.notifications.nh_clinical_notification(pool, cr)[source]¶ Abstract representation of what a clinical notification is. Contains common information that all notifications will have but does not represent any entity itself, so it basically acts as a template for every other notification.
-
get_form_description(*args, **kwargs)[source]¶ Returns a description in dictionary format of the input fields that would be required in the user gui when the notification is shown.
Parameters: patient_id (int) – patientidReturns: a list of dictionaries Return type: list
-
get_view_description(*args, **kwargs)[source]¶ Transform the form description into view description that can be used by the mobile. This will return a list of dicts similar to:
[ { 'type': 'template', 'template': 'nh_observation.custom_template' }, { 'type': 'task', 'inputs': [] } ]
Parameters: form_desc (list) – List of dicts representing the inputs for the form Returns: list of dicts representing view description
-
is_cancellable(*args, **kwargs)[source]¶ Notifications cannot be cancelled by the user by default. :returns:
False:rtype: bool
-
is_valid(*args, **kwargs)[source]¶ Check the validity of the notification (each subclass to supply rules)
Returns: Boolean representing if notification instance is valid Return type: bool
-
patient_id¶ 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
Trueto 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.
-
reason¶ Very similar to
Charbut used for longer contents, does not have a size and usually displayed as a multiline text box.Parameters: translate – whether the value of this field can be translated
-