-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the questionnaire-unit extension #1550
Comments
@shelaghm can you work with @williamito on UI design for this |
@fredhersch I edited this issue to just be for the questionnaire-unit extension and created #1600 for the rest. I think we discussed this scoping would be a P1? |
@williamito Is there a UI design need here or are we all set? |
@shelaghm Some design needed - how to render the unit associated with an item if specified in the Questionnaire. For example, a questionnaire might have a |
Here are the existing design mocks I have. This implies that the user can select the unit type. I assume we also need functionality for a static unit like |
Thanks! Yes, this is specifically for the static case.
|
If the |
Dear, I made a change that add the support of the extension when saving the answer (I need that for proper mapping and calculatedExpression) BUT this is my first Kotlin development AND I am not happy where I added to unit but the item object in not accessible anymore when the new answer is added/set
|
thanks patrick for this draft code snippet - we'll create a pr for this |
Update, indeed questionnaire-unit is not the right extension, my code might not be relevant, I will try with unitOption |
I like the alt version though - because I feel the UI would be more consistent with #1600. And the unit itself is more conspicuous. |
@jingtang10 |
Is your feature request related to a problem? Please describe.
The full definition of the "quantity" type is:
http://hl7.org/fhir/StructureDefinition/questionnaire-unit
extension support is not listed either yes or no on FHIR specification support page, but based on some testing, we seem to ignore it. However, in the definition of thequestionnaire-unit
extension it states:So the actual way to use
type='quantity'
are theunitOption
orunitValueSet
extensions which we explicitly do not support, but without whichtype='quantity'
is just a strictly worse version of'integer'
or'decimal'
.You can see examples of both versions in this LHC Forms unit test questionnaire JSON.
Describe the solution you'd like
Add support for the
questionnaire-unit
extension. If it is used on an item oftype='integer'
ortype='decimal
, it should:unit
,system
,code
information provided inquestionnaire-unit
Prioritize support forunitOption
orunitValueSet
, where it should:1. Show a unit picker (dropdown?) in the rendered Questionnaire2. In the questionnareResponse, generate a valueQuantity3. Populate the valueQuantity with anyunit
,system
,code
information provided inquestionnaire-unit
Lower/caveat the stated support of
type='quantity'
until a method of unit selection is available.The text was updated successfully, but these errors were encountered: