Food and Fluid Observation¶
-
class
nh_food_and_fluid.models.food_and_fluid.NHClinicalFoodAndFluid(pool, cr)[source]¶ -
active_food_fluid_period(spell_activity_id)[source]¶ Check to see if any food and fluid observations have been submitted in this period :param spell_activity_id: ID of patient’s spell activity :return: True if food and fluid observation have been submitted in the current period :rtype: bool
-
classmethod
before_seven_am(date_time)[source]¶ True if the passed date_time is before 07:00 in the morning.
Parameters: date_time (datetime) – Returns: Return type: bool
-
bowels_open¶
-
calculate_fluid_balance(spell_activity_id, date_time)[source]¶ Calculates the fluid balance for supplied date_time (which is an Odoo string representation of a datetime) :param spell_activity_id: ID of the patient’s spell activity :param date_time: Odoo string representation of a datetime :type date_time: str :return: Fluid Balance :rtype: int
-
calculate_total_fluid_intake(spell_activity_id, date_time)[source]¶ Returns the sum of all the fluid_taken values from all the food and fluid observations completed in a particular period.
The period to calculate for is determined by the date_time argument. The date_time argument can be any time. Whichever period the date_time is a part of will be the period used for the calculation.
Parameters: - spell_activity_id (int) –
- date_time –
Type: str or datetime
Returns: Total fluid intake.
Return type:
-
dietary_needs¶
-
fluid_description¶
-
fluid_output¶
-
fluid_taken¶
-
food_fluid_rejected¶
-
food_taken¶
-
format_period_datetimes(periods)[source]¶ Format the datetimes in the passed period dictionaries to be more user-friendly.
Parameters: periods – Returns:
-
classmethod
get_data_visualisation_resource()[source]¶ Returns URL of JS file to plot data visualisation so can be loaded on mobile and desktop
Returns: URL of JS file to plot graph Return type: str
-
get_form_description(*args, **kwargs)[source]¶ Returns a description in dictionary format of the input fields that would be required in the user gui to submit this observation.
Adds the lists of recorded concerns and dietary needs to the form description as these are stored in separate models to allow for multi select
Parameters: patient_id (int) – patientidReturns: a list of dictionaries Return type: list
-
get_formatted_obs(*args, **kwargs)[source]¶ Override of nh.clinical.patient.observation.
Returns: Return type: dict
-
get_obs_activities_for_period(spell_activity_id, date_time)[source]¶ Get a list of food and fluid observation activities for the date_time passed in :param spell_activity_id: ID of the patient’s spell activity :param date_time: Odoo string representation of a date_time :type date_time: str :return: list of food and fluid observation activities :rtype: list
-
get_period_dictionaries(food_and_fluid_observations, include_units=False)[source]¶ Get a list of dictionaries, each one representing a 24 hour observation period. Each dictionary contains data about the period as well as a nested list of data for the observations.
Parameters: - food_and_fluid_observations –
- include_units (bool) – Include measurements with units where applicable.
Returns:
-
get_period_domain(date_time)[source]¶ The period to produce domain parameters for is determined by the date_time argument. The date_time argument can be any time. Whichever period the date_time is a part of will be the period used for the calculation.
Parameters: date_time (datetime or str) – Returns: Domain parameters that will limit results to a 24 hour period. Return type: list
-
get_period_end_datetime(date_time)[source]¶ Get the datetime representing the first microsecond of the period after the one that the passed date_time is a part of.
Parameters: date_time (datetime or str) – Returns: Return type: str
-
get_period_start_datetime(date_time)[source]¶ Get the datetime representing the beginning of the period that the passed datetime occurs in.
Parameters: date_time (datetime or str) – Returns: Return type: str
-
passed_urine¶
-
recorded_concerns¶
-