Food and Fluid Review Escalation Task

class nh_food_and_fluid.models.food_fluid_review.FoodAndFluidReview(pool, cr)[source]

Food and Fluid Review task

ESCALATION_TASKS = {0: ['Confirm adequate intake'], 1: ['Encourage fluid intake to above 1500ml', 'Keep monitoring', 'Inform Shift Coordinator'], 2: ['Encourage hourly fluids immediately', 'Inform Shift Coordinator'], 3: ['Inform medical staff immediately']}
cancel_review_tasks(cancel_reason, spell_activity_id=None)[source]

Cancel all open review tasks activities with the passed cancel reason for either one spell or all spells. :param spell_activity_id: If passed, only cancels review tasks for the associated spell. If left as the default None, cancels review tasks for all spells. :type spell_activity_id: int :param cancel_reason:

get_escalation_tasks_for_score(score)[source]

Get the list of escalation tasks associated with a given F&F score :param score: F&F score for period :return: list of escalation task names

get_review_task_summary(*args, **kwargs)[source]

Get the summary for the review task :return: string for summary :rtype: str

get_view_description(form_desc)[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 a view description
manage_review_tasks_for_active_periods(*args, **kwargs)[source]

Ensure all spells have the correct food and fluid review tasks associated with them. This involves cancelling existing ones and creating new ones at specific times. :return:

static process_period_datetimes(period)[source]

Change the format in the supplied period to be similar to 7am dd/mm :param period: period dictionary :return: period dictionary

schedule_review(spell_activity)[source]

Create the activity for the Food and Fluid Review Task :param spell_activity: Activity for patient’s spell :return: activity ID

should_trigger_review(*args, **kwargs)[source]

Take the current localised time for the user and figure out if the review task should be triggered :return: True if correct localised time :rtype: bool

trigger_review_tasks_for_active_periods(*args, **kwargs)[source]

Method to trigger F&F review tasks for any active periods in the system Called by Scheduled Action every hour

trigger_times = [15, 6]