Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions nh_food_and_fluid/models/food_and_fluid.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ class NHClinicalFoodAndFluid(models.Model):
string='Consider Special Dietary Needs', necessary=False
)
fluid_taken = obs_fields.Integer('Fluid Taken (ml) - Include IV / NG',
necessary=False)
fluid_description = obs_fields.Text('Fluid Description')
food_taken = obs_fields.Text('Food Taken')
required=True)
fluid_description = obs_fields.Text('Fluid Description', required=True)
food_taken = obs_fields.Text('Food Taken', required=True)
food_fluid_rejected = obs_fields.Text(
'Food and Fluid Offered but Rejected', necessary=False
'Food and Fluid Offered but Rejected', required=True
)
passed_urine = obs_fields.Selection(_passed_urine_options, 'Passed Urine',
required=True)
bowels_open = obs_fields.Selection(_bowels_open_options, 'Bowels Open',
required=True)
fluid_output = obs_fields.Integer('Fluid Output (ml)', necessary=False)
fluid_output = obs_fields.Integer('Fluid Output (ml)', required=True)

@api.constrains('fluid_output')
def _in_min_max_range(self):
Expand Down Expand Up @@ -144,28 +144,32 @@ def get_form_description(self, patient_id):
'title': 'Fluid Taken Guidance',
'label': 'Fluid Taken Guidance'
},
'necessary': 'false'
'required': True,
# 'necessary': 'false'
},
{
'name': 'fluid_description',
'type': 'text',
'label': 'Fluid Description',
'initially_hidden': False,
'necessary': 'false'
'required': True,
# 'necessary': 'false'
},
{
'name': 'food_taken',
'type': 'text',
'label': 'Food Taken',
'initially_hidden': False,
'necessary': 'false'
'required': True,
# 'necessary': 'false'
},
{
'name': 'food_fluid_rejected',
'type': 'text',
'label': 'Food and Fluid Offered but Rejected',
'initially_hidden': False,
'necessary': 'false'
'required': True,
# 'necessary': 'false'
},
{
'name': 'passed_urine',
Expand Down Expand Up @@ -213,7 +217,8 @@ def get_form_description(self, patient_id):
'min': 1,
'max': 999,
'initially_hidden': True,
'necessary': False
'required': True,
# 'necessary': False
},
{
'name': 'bowels_open',
Expand Down