Stream: questionnaire
Topic: LHCForms - quantity display?
Jose Costa Teixeira (Feb 04 2022 at 19:53):
Does LHCForms parse quantity type? I don't get it to display the value and units, only a string entry
Jose Costa Teixeira (Feb 04 2022 at 21:04):
@Paul Lynch ?
Paul Lynch (Feb 04 2022 at 21:40):
Yes, it does handle valueQuantity. I will look for an example.
Paul Lynch (Feb 04 2022 at 21:45):
Paul Lynch (Feb 04 2022 at 21:46):
If you upload that to https://lhcforms.nlm.nih.gov/lforms-fhir-app/?server=https%3A%2F%2Flforms-fhir.nlm.nih.gov%2FbaseR4, you can save a QR and load it back in.
Jose Costa Teixeira (Feb 06 2022 at 07:19):
I see. It only shows up when there's a unitOption - shouldn't we be able to have questionnaire quantities without defining the unit valueset (i.e. leave it open?)
Lloyd McKenzie (Feb 06 2022 at 15:42):
And specify the unit as text?
Jose Costa Teixeira (Feb 06 2022 at 18:51):
Yes
Jose Costa Teixeira (Feb 06 2022 at 18:51):
Or open choice
Diane (Feb 06 2022 at 21:10):
We ran across this issue as well. We have study procedures that are done x times per week, y times per month, etc and these fit nicely with the standardized unit valuesets. But we have other study procedures that are done once per study phase or two times per treatment cycle, where the length of the study phase or treatment cycle cannot be known ahead of time, because it might depend on how long it takes to recruit participants or how long it takes before there is any response to the treatment. So, we thought that it would be useful for the use to be able to specify the units such as "study phase" or "treatment cycle". Another example might be a longitudinal study of women over 10 years, where they will be given a test once per pregnancy over a 10 year observation period, where the number and frequency of pregnancies is unknown up front and the unit should be "pregnancy".
Lloyd McKenzie (Feb 06 2022 at 22:04):
Those aren't units and can't go into Quantity.unit. Units need to be countable, predictable things that can be added, multiplied and converted to other units.
Brian Postlethwaite (Feb 06 2022 at 23:09):
This is sounding more like multiple questions in the form, not use of a quantity.
one for value, and another for coding (optional) and you get a similar outcome.
Diane (Feb 07 2022 at 00:09):
Thanks @Lloyd McKenzie for explaining how Quantity.unit is intended to be used.
We have struggled with this one a bit, because the table of procedures for the research study is a repeating group (gtable) like this (including sample data). The requirement is that it needs to be shown to the participant with all of the procedures listed by frequency, so that the participants know what they are signing themselves into.
procedure qty. unit
___________________________________________________________
blood draws 6 year
biopsy 2 year
vital signs check 4 month
CTScan 1 study
MRI 1 treatment cycle
xray 1 replacement knee
Since not all of the units are standard (years, months, weeks, etc.), we are currently just letting the users free-form type the frequency of the procedures such as "6 per year" or "4/month" or "1 xray after each replacement knee surgery") , knowing that the data will be messy.
However, I have just found this example using the already existing unitOpen extension:
https://build.fhir.org/ig/HL7/sdc/examples.html#using-unitoption-unitopen-and-unitsupplementalsystem
The extension is at http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-unitOpen
So, I think that we could have the users pick from a list of standard measurements like in the example or pick the ... for other and then have them input a string like "treatment cycle" for the unit.
@Jose Costa Teixeira what are you trying to do with your units?
Lloyd McKenzie (Feb 07 2022 at 00:20):
year and month are units. study, treatment cycle and replacement knee are not. You can't express those in Quantity.unit or Quantity.code.
Diane (Feb 07 2022 at 03:23):
Yes. You are right. It would be best to have the unit recorded as weeks, months, years or "none" and then capture study, treatment cycle or replacement knees psuedo-unit in a different data field.
Jose Costa Teixeira (Feb 07 2022 at 08:10):
My questionnaire item is "amount" and it can be 5 g, 4 spoons, 3 sips, 2 units...
Paul Lynch (Feb 07 2022 at 14:39):
Lloyd McKenzie said:
year and month are units. study, treatment cycle and replacement knee are not. You can't express those in Quantity.unit or Quantity.code.
Could you explain why not? Is there something in FHIR's definition of the term "unit" that prevents that? Generally speaking, I think any noun could be unit. You could write "5 knees/surgeon".
Paul Lynch (Feb 07 2022 at 14:53):
Jose Costa Teixeira said:
Or open choice
FHIR-20394 said there is no open choice for unit lists. I don't remember the reasoning, and nor why I would have moved to approve it. @Lloyd McKenzie ?
Paul Lynch (Feb 07 2022 at 14:55):
Lloyd McKenzie said:
And specify the unit as text?
That much seems to be allowable if there are no units provided. See https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/type.3Dquantity.20without.20questionnaire-unit . We would need to add that support to LHC-Forms.
Lloyd McKenzie (Feb 07 2022 at 15:22):
I may be letting some v3 rules seep in here, because you're right, Quantity isn't that tight. I guess it's best to think of units as being on a scale - there are 'good' units, like 'cm' and 'tbsp' that are regular and safely interconvertable, There are 'fuzzy' units like 'sip' and 'pea-sized blob' which don't have fixed dimensions but that can be evaluated and operated on mathematically without external context and certainly have an approximate equivalence across units. And then there are things like "twice per study" which aren't really 'measurements' at all and which can be compared at all. I.e. if there are two patients who have "twice per study", that could mean 2 months or 2 years. Representing that last set as Quantity is extremely suspect.
Lloyd McKenzie (Feb 07 2022 at 15:23):
Re: FHIR-20394, I think part of it is that we have no mechanism to distinguish whether open vs. closed is allowed. The other aspect was limiting complexity.
Last updated: Apr 12 2022 at 19:14 UTC