Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Adds extra validation rules to the visit form
This is to prevent a visit being saved where a group of fields that together are required have missing data. For example, now it should not be possible to submit a height or weight without a date, or height/weight observation date without a corresponding height or weight.
Some of the tests had to be updated as some of the test data only included one field, and the dummy_sheet had to be corrected in some places where for example the patient was a smoker but no smoking date had been offered.
In subsequent commits before closing this PR I will add more tests to ensure the validation rules are working.
Code changes
Please describe the changes you made here.
Documentation changes (done or required as a result of this PR)
Please describe any changes to documentation here.
Related Issues
List any issues related to this PR here.
Mentions
@mentions of the person or team responsible for reviewing proposed changes.