Stream: shorthand
Topic: limit codeable concept to a set without valueset
Gino Almondo (Jan 26 2021 at 14:48):
Hi!
I am in the process of writing fsh-files with the purpose of creating an implementation guide.
In some profiles I would like to specify that an attribute of type CodeableConcept can only take some values.
Can I specify "on the fly" these values by listing them instead of creating a full-blown valueset? What would the syntax look like in that case?
Chris Moesel (Jan 26 2021 at 17:27):
The only way I can think of to do that without a value set is to slice on coding
and create a separate slice for each code you want to support. But there is at least one potential issue. If you wanted to require that it must contain one of the codes, you'd have to make it a closed
slicing, which would then prohibit an instance from having any additional codings (synonyms, user selected code, etc).
Even without that issue, however, it would be an overly complicated solution just to avoid using value sets. In FHIR, value sets and bindings are the canonical approach to restricting a code-like value to a set of codes. Why don't you want to use that approach?
Elliot Silver (Jan 27 2021 at 21:12):
What is the intent of avoiding a "full-blown valueset"? Value sets are pretty light-weight and don't need to be defined by some official body, so having a valueset inside you IG is perfectly reasonable. This has the advantage that users of you IG can validate that the values they put in your profile are from the valueset. If you have a valueset that really is only needed in one location, you could consider making it contained within the profile, but I feel that limits its usability.
Last updated: Apr 12 2022 at 19:14 UTC