EWS Observation Extensions¶
-
class
nh_eobs_mental_health.models.nh_clinical_patient_observation_ews.NHClinicalPatientObservationEWS(pool, cr)[source]¶ Override of nh.clinical.patient.observation.ews for generic mental health behaviour
-
complete(*args, **kwargs)[source]¶ It determines which acuity case the current observation is in with the stored data and responds to the different policy triggers accordingly defined on the
_POLICYdictionary:{'ranges': [0, 4, 6], 'case': '0123', --> Used with bisect to determine the acuity case based on the score. 'frequencies': [720, 240, 60, 30], --> frequency of recurrency of the NEWS observation, based on the case. 'notifications': [...], Information sent to the trigger_notifications method, based on case. 'risk': ['None', 'Low', 'Medium', 'High']} --> Clinical risk of the patient, based on case.
All the case based lists work in a simple way: list[case] –> value used
After the policy triggers take place the activity is completed and a new NEWS activity is created. Then the case based frequency is applied, effectively scheduling it.
In the case of having a partial observation we won’t have a new frequency so the new activity is scheduled to the same time the one just completed was, as the need for a complete observation is still there.
Returns: TrueReturn type: bool
-
create_clinical_review_task(*args, **kwargs)[source]¶ Create a ‘nh.clinical.notification.clinical_review’ record and associated activity.
Parameters: activity ('nh.activity' record) –
-
is_refusal_in_effect(*args, **kwargs)[source]¶ Use the last_refused_ews SQL view to see if activity_id is part of a patient refusal
Parameters: - cr – Odoo cursor
- uid – User doing operation
- activity_id – <nh.activity> Activity ID
- mode – Mode to operate on, parent goes up chain, child goes down
- context – Odoo Context
Returns: If the patient is currently in refusal
-
partial_reason¶ Parameters: - selection – specifies the possible values for this field. It is given as either a list of pairs (value, string), or a model method, or a method name.
- selection_add – provides an extension of the selection in the case of an overridden field. It is a list of pairs (value, string).
The attribute selection is mandatory except in the case of related fields or field extensions.
-