FHIR Chat · patternCodeableConcept · shorthand

Stream: shorthand

Topic: patternCodeableConcept


view this post on Zulip Nathan Davis (Jan 19 2022 at 19:42):

How is a patternCodeableConcept defined in FSH? In the xml style of IG I could use this tag to require that at least one instance of a CodeableConcept had to match the code binding. For example:

        <element id="Observation:cimiBloodPressurePanel.component.code:systolicBP">
            <path value="Observation.component.code"/>
            <short value="Systolic blood pressure"/>
            <patternCodeableConcept>
                <coding>
                    <system value="http://loinc.org"/>
                    <code value="8480-6"/>
                </coding>
            </patternCodeableConcept>
            <mustSupport value="true"/>
        </element>

The above code would result in:

image.png

I'm not sure how to accomplish the same in FSH.

view this post on Zulip Chris Moesel (Jan 19 2022 at 19:51):

This is done via an assignment rule in FSH. By default, assignment rules use pattern[x], but you can force them to use fixed[x] by adding the term (exactly) after the assignment.

In your example, you want a patternCodeableConcept, so you just need to do this:

* component.code[systolicBP] = http://loinc.org#8480-6

Most of the complication in your example is actually the path (since it uses slices). But the important part for your question ("How do I make a patternCodeableConcept?") is = http://loinc.org#8480-6. Of course, most authors setup an alias for loinc, so it might look more like this: = $LOINC#8480-6.

view this post on Zulip Nathan Davis (Jan 19 2022 at 22:30):

@Chris Moesel Thank you. I hadn't realized that the default was "patternCodeableConcept". From this I discovered a different issue that I'll post in a new topic stream.


Last updated: Apr 12 2022 at 19:14 UTC