(feat) O3-2972: Validate number fields whose concepts don't allow decimal values #805
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.
This PR adds validation to the Laboratory Test Results form that ensures fields of type number whose backing concepts don't allow decimal values show an error when decimals are typed in. For example, the backing concept for
Platelets
does not allow decimal values:This validation logic was recently introduced to the Angular form engine here.
Video of the validation in practice
323767858-c0cd18ca-20f4-4dcb-8184-b04d5ba74d7d.mp4
This change solves this error shown when submitting the form after filling in values that lie within the related reference ranges for the backing concepts but without taking into account whether the fields support decimal values or not:
Related issue
https://openmrs.atlassian.net/browse/O3-2972
Other
I don't know what the versioning scheme in use here is. I've elected to increment the version by 1. More details about the issue are pointed out in this PR.