Stream: IG creation
Topic: slicing on a pattern
Brian Reinhold (Feb 24 2019 at 16:50):
I cannot not find any examples on the FHIR web site how to syntactically setup slicing using a pattern. This seems like a way to slice on a value set when one value set has one set of codes and the other has another set of codes, but both value sets come from the same code system. But I do not how to further setup a slicing when I indicate <type value="pattern" />. I guess this is very rarely used.
So far this is the best I have found:
https://www.hl7.org/fhir/structuredefinition-example-composition.xml.html
<patternCodeableConcept>
<coding>
<system value="http://loinc.org"/>
<code value="18776-5"/>
<display value="Plan of treatment (narrative)"/>
</coding>
</patternCodeableConcept>
However its not clear to me what my options are. Can I use a value set somehow since the value set identifies the list of codes? It would be a pain to copy all of those codes into this list and then remember to update it when the value set gets updated.
Eric Haas (Feb 25 2019 at 01:44):
slice on pattern is used a lot. And the example is how is typically used. pattern is like fixed for a complex datatype. If you want to use a value set then slice by valueset?
Brian Reinhold (Feb 25 2019 at 10:46):
slice on pattern is used a lot. And the example is how is typically used. pattern is like fixed for a complex datatype. If you want to use a value set then slice by valueset?
I DO want to slice on a value set. Can you tell me how to do that?
Lloyd McKenzie (Feb 25 2019 at 16:17):
Pattern doesn't let you slice by value set. Pattern lets you say "the complex type I'm slicing on should match this pattern" - where the pattern is a set of fixed values for some of the elements. None of them can be expressed with a valueset. If you want to sliced with a value set, you have to slice by value.
Chris Moesel (Mar 05 2019 at 14:20):
Regarding the example pattern above, I'd also add that profilers should be careful about including the display
in a patternCodeableConcept
. If you do use display
, the profile requires the instance data to contain that exact display value. If you only care that it includes the necessary system
and code
(regardless of display
), you should leave display
out of the pattern.
Last updated: Apr 12 2022 at 19:14 UTC