Stream: shorthand
Topic: valuesets, codes, and value[x]
Bob Milius (Mar 19 2021 at 16:55):
Is it possible to create a ValueSet that contains not only codes and names, but also preferred values for each code? (e.g., valueQuantity with preferred unit, valueInteger, etc)?
Chris Moesel (Mar 19 2021 at 19:43):
Hi Bob. I'm not sure I fully understand the question. If you want to bind a ValueSet to a Quantity
in order to specify allowable units, that is possible. From the ValueSet perspective, it's just a normal value set with some codes (presumably from UCUM). For example:
Alias: UCUM = http://unitsofmeasure.org
ValueSet: FeetAndInches
* UCUM#[ft_i] "foot"
* UCUM#[in_i] "inch"
Profile: ImperialLength
Parent: Observation
* value[x] only Quantity
* valueQuantity from FeetAndInches
But I'm not sure that is what you are asking.
Bob Milius (Mar 19 2021 at 19:52):
I suspect what I want isn't currently possible. e.g., when I look at the vital-signs page, there's a nice table that describes the LOINC code, and the UCUM unit code for the value. It would be nice if there was a way to require that, maybe in a value-set. But The vital-signs value-set doesn't have that connection, and the vital-signs profile doesn't enforce any value[x] info, so I'm thinking it isn't possible, unless to I create many slices, one for each code/value[x] combination. Sorry for the rambling, just speculating.
Chris Moesel (Mar 19 2021 at 20:57):
Ah. Well, the way vital signs does it is they actually create sub-profiles for each row in that table. So if you click on the specific vital sign name, you'll be taken to another profile that is based on the parent vital-signs profile, and enforces the code
and related value[x]
(and constraints) for that specific vital sign. For example, the BodyHeight profile.
Bob Milius (Mar 19 2021 at 21:03):
Ah... that makes sense. I'll have to figure out the best way to do that for a hundred different codes in our valuesets. :/
Chris Moesel (Mar 19 2021 at 22:37):
Oh my goodness. I suppose you might be able to do the whole thing via FHIRPath constrains, but that wouldn't be very readable for people looking at your IG. If it's on a repeatable element (like Observation.component
) then you could do a hundred slices -- although I'm not sure if that's better (and it doesn't work if you want to do it higher up on Observation.code
and Observation.value[x]
).
Maybe somebody else here has a bright idea. ;-)
Or maybe 100 profiles really is the right way. ¯\_(ツ)_/¯
Richard Townley-O'Neill (Mar 21 2021 at 23:02):
@ Bob Milius Can you use ValueSet.expansion.contains.display or ValueSet.expansion.contains.designation ?
Last updated: Apr 12 2022 at 19:14 UTC