(feat) O3-4201: Enhance Number Question Labels Display Unit and Range (Min/Max) from Concept#454
Conversation
…(min-max) to label and min/max to form
|
@samuelmale @ibacher please let me know if you had other approaches in mind for this or issues |
samuelmale
left a comment
There was a problem hiding this comment.
Can you add some test coverage asserting that the units and labels are incorporated in the label?
…l, add test concept with units and range
…ber-Question-Labels-Display-Unit-and-Range-(Min/Max)-from-Concept
…abel i18n, unit/range test cases
There was a problem hiding this comment.
not really sure about jest.mock('react-i18next', () => ({...
it seemed needed for the new i18n label t('{{fieldDescription}} {{unitsAndRange}}'... but I'm not sure if that's correct
…nly min test, cleaner hi/low from matchingConcept
samuelmale
left a comment
There was a problem hiding this comment.
@D-matz can you resolve the lint issues and merge conflicts and we have this merged in?
|
@samuelmale by the way, I had to add i18n usetranslation to unspecified.test.tsx and form-engine.test.tsx which I am not sure about, for those tests to pass. Also note I have 9 failing tests on yarn test on both this branch and main. So please let me know if I'm doing something wrong with these. |



Add (unit) (min-max) to label, validate input against concept min/max
https://openmrs.atlassian.net/browse/O3-4201
Related: https://openmrs.atlassian.net/browse/O3-4122
4122 also suggests a warning for values within the absolute range but outside normal or critical range. Looking for suggestions on how to implement that, and how to add a test case for a concept with units and min/max
Requirements
Summary
Screenshots
Related Issue
Other