Closed pirupius closed 3 weeks ago
Size Change: -205 kB (-15.23%) π
Total Size: 1.14 MB
Filename | Size | Change | |
---|---|---|---|
dist/617.js |
0 B | -86.9 kB (removed) | π |
dist/733.js |
0 B | -107 kB (removed) | π |
dist/901.js |
0 B | -11.8 kB (removed) | π |
@pirupius I'm not sure I understand the issue you are solving here. From the sample JSON:
"hideAnswers": {
"hideWhenExpression": "['concept-uuid-2', 'concept-uuid-3']"
},
Is the above meant to be some kind of a conditional statement?
@samuelmale this was a bad example, was trying to show something more direct. Let me update with a real world scenario.
After a another thought at this, i've decided to close this PR in favor of reusing some of the already available features. This eliminate the need to maintain more code and avoid duplication.
Requirements
Summary
This is a utility helper to filter and hide answers based on predefined question conditions.
Dummy JSON Question
Based on the all the answers being rendered as options to chose from, an optional
hideAnswers
can be passed to filter and display only answers that match a criteria (The json above just passes valid answers). Out of the 5 or more only 2 pass the condition so those will be the only options displayedScreenshots
https://github.com/user-attachments/assets/072b7ee5-572f-4494-a627-c9ae508fbf1d
Related Issue
https://openmrs.atlassian.net/browse/O3-3699
Other