Refused Observation Report Extensions¶
-
class
nh_eobs_mental_health.report.refused_observations.MentalHealthObservationReport(pool, cr)[source]¶ -
get_clinical_review_column_data(refusal_episode)[source]¶ Get the data necessary to populate the ‘Clinical Review’ column of the ‘Patient Refusal Events Data’ section of the observation report.
Parameters: refusal_episode (dict) – Raw data from the database. Returns: Return type: dict
-
get_clinical_review_frequency_set_column_data(refusal_episode)[source]¶ Get the data necessary to populate the ‘Clinical Review Frequency Set’ column of the ‘Patient Refusal Events Data’ section of the observation report.
Parameters: refusal_episode (dict) – Raw data from the database. Returns: Return type: dict
-
get_first_refusal_column_data(refusal_episode)[source]¶ Get the data necessary to populate the ‘First Refusal’ column of the ‘Patient Refusal Events Data’ section of the observation report.
Parameters: refusal_episode (dict) – Raw data from the database. Returns: Return type: dict
-
get_refusal_episodes(spell_activity_id)[source]¶ Collect the refusal episodes for the spell provided
Parameters: spell_activity_id – Spell activity id for the patient Returns: list of dicts Return type: list
-
get_refusal_events_data()[source]¶ Get a dictionary containing all the information necessary to populate the ‘Patient Refusal Events Data’ section of the observation report.
Returns: Return type: dict
-
get_refusals_until_news_obs_taken_column_data(refusal_episode)[source]¶ Get the data necessary to populate the ‘Refusals Until News Obs Taken’ column of the ‘Patient Refusal Events Data’ section of the observation report.
Parameters: refusal_episode (dict) – Raw data from the database. Returns: Return type: dict
-
get_report_data(data, ews_only=False)[source]¶ Returns a dictionary that will be used to populate the report. Most of the values are themselves dictionaries returned by activity.read(). However they also have an additional key named ‘values’ that contains the model record as dictionaries returned by model.read().
Parameters: - data –
- ews_only –
Returns: Return type:
-
get_task_column_data(refusal_episode, clinical_review_frequency=False)[source]¶ Generic method that can get the necessary data for multiple different columns that display information about different types of task.
Parameters: Returns:
-
init(*args, **kwargs)[source]¶ Create or replace the refused_chain_count table for use in get_refusal_episodes
Parameters: cr – Odoo cursor
-