Wardboard Extensions¶
-
class
nh_eobs_mental_health.models.nh_clinical_wardboard.NHClinicalWardboard(pool, cr)[source]¶ -
acuity_index¶ 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
-
acuity_selection= [('NoScore', 'New Pt / Obs Restart'), ('High', 'High Risk'), ('Medium', 'Medium Risk'), ('Low', 'Low Risk'), ('None', 'No Risk'), ('ObsStop', 'Obs Stop'), ('Refused', 'Refused')]¶
-
end_obs_stop(**kwargs)[source]¶ Completes the patient monitoring exception activity and toggles the ‘obs stop’ flag on the spell to False as there are no longer any patient monitoring exceptions in effect.
-
fields_view_get(*args, **kwargs)[source]¶ Override nh_eobs.wardboard.fields_view_get to change next_diff to ‘Observations Stopped’ if obs_stop flag set on patient spell :param cr: Odoo Cursor :param uid: ID of user performing action :param view_id: XML_ID of view :param view_type: Type of view (form, kanban etc) :param context: Odoo context :param toolbar: If has toolbar or not :param submenu: Submenu :return: ui.ir.view for rendering on frontend
-
init(*args, **kwargs)[source]¶ Override the init function to add the new get_last_finished_obs_stop SQL view.
Parameters: cr – Odoo Cursor
-
obs_stop¶
-
prompt_user_for_obs_stop_reason(*args, **kwargs)[source]¶ Returns an action to the front-end that instructs it to open another view in which the user can select a reason for observations to be stopped. :return: An action that opens another view. :rtype: dict
-
rapid_tranq¶
-
read(*args, **kwargs)[source]¶ Override of read method of wardboard to override next_diff and frequency fields with obs_stop information is flag set :param cr: Odoo cursor :param user: User doing operation :param ids: Record IDs to read :param fields: Fields to read from records :param context: Odoo context :param load: Type of loading to do :return: list of dicts or objects
-
set_rapid_tranq(*args, **kwargs)[source]¶ Set the rapid_tranq field of the patient’s spell to the passed value.
Parameters: value – The new value for the rapid_tranq field. Return type: bool or dict Returns:
-
spell_has_open_escalation_tasks(*args, **kwargs)[source]¶ Check to see if spell has any open escalation tasks.
Parameters: - cr – Odoo cursor
- uid – User carrying out operation
- spell_activity_id – IDs of the spell
- context – Odoo context
Returns: True if open tasks, False if not
-
start_obs_stop(**kwargs)[source]¶ Creates a new patient monitoring exception with the passed reason.
Creates an activity with a reference to the monitoring exception, save the ‘spell activity id’ on the activity, and start it. It is difficult to retrieve the monitoring exception activity later to complete it if the spell activity id is not set.
Toggles the ‘obs stop’ flag on the spell to True as there is now a patient monitoring exception in effect.
-