FHIR Chat · Distinct two profiles with similar structure · implementers

Stream: implementers

Topic: Distinct two profiles with similar structure


view this post on Zulip David Gutknecht (Jan 20 2021 at 13:43):

Hello,

I defined in my IG two different profiles based on the same Base Profile : Practitioner

  • One is used to identify a Doctor (called Practitioner)
  • The other to identify a "User" (called SoftwareUser)

The difference between both is that for user I allow empty names and sliced the identifiers to include the login.

Everything works except an error in the QA report linked to one of my bundle-examples.
The composition links to Practitioner/1 (from type Practitioner) and to Practitioner/2 (from type SoftwareUser),
and both are included in the bundle.

I get following message:

Profile https://mednet.swiss/fhir/StructureDefinition/mni-patientOverview-bundle, Element matches more than one slice - Practitioner, SoftwareUser

In the Bundle definition I specified following slice to the entry-List:

<!-- ***************************************** -->
        <!-- Practitioner -->

        <element id="Bundle.entry:Practitioner">
            <path value="Bundle.entry" />
            <sliceName value="Practitioner" />
            <min value="0" />
            <max value="*" />
            <mustSupport value="true"/>
        </element>

        <element id="Bundle.entry:Practitioner.fullUrl">
            <path value="Bundle.entry.fullUrl" />
            <min value="1"/>
            <max value="1"/>
            <mustSupport value="true"/>
        </element>

        <element id="Bundle.entry:Practitioner.resource">
            <path value="Bundle.entry.resource" />
            <min value="1"/>
            <max value="1"/>
            <type>
                <code value="Practitioner" />
                <profile value="https://mednet.swiss/fhir/StructureDefinition/mni-practitioner" />
            </type>
            <mustSupport value="true"/>
        </element>

<!-- ***************************************** -->
        <!-- SoftwareUser -->

        <element id="Bundle.entry:SoftwareUser">
            <path value="Bundle.entry" />
            <sliceName value="SoftwareUser" />
            <min value="0" />
            <max value="*" />
            <mustSupport value="true"/>
        </element>

        <element id="Bundle.entry:SoftwareUser.fullUrl">
            <path value="Bundle.entry.fullUrl" />
            <min value="1"/>
            <max value="1"/>
            <mustSupport value="true"/>
        </element>

        <element id="Bundle.entry:SoftwareUser.resource">
            <path value="Bundle.entry.resource" />
            <min value="1"/>
            <max value="1"/>
            <type>
                <code value="Practitioner" />
                <profile value="https://mednet.swiss/fhir/StructureDefinition/mni-softwareUser" />
            </type>
            <mustSupport value="true"/>
        </element>

Any Idea how I could solve this ?
Is there maybe a way to change SoftwareUser to a dedicated "type" ?

Thanks for your help.
Best regards,
David

view this post on Zulip Lloyd McKenzie (Jan 20 2021 at 15:15):

Slices have to be distinct. If it's possible for an instance to satisfy multiple slices, that's an error. So you can't have two slices where one is just a more loosely constrained version of the other - you have to have at least one element that's guaranteed to be different.

view this post on Zulip David Gutknecht (Jan 25 2021 at 12:10):

Thanks for your Help.

I found the solution

In my bundle definition instead of allowing both profiles mni-practitioner and mni-Software user,
I allow the base definition Practitioner.

<element id="Bundle.entry:Practitioner.fullUrl">
            <path value="Bundle.entry.fullUrl" />
            <short value="URI for the resource. Made from &lt;resource type&gt;/&lt;resource id&gt;
                        This could also be an url from type https://server/&lt;resource type&gt;/&lt;resource id&gt;
                        or an UUID like urn:uuid:148d342c-5052-4b9e-8370-2923af30e867
                        In this case, this should also be used as reference value in all the bundle."/>
            <min value="1"/>
            <max value="1"/>
            <mustSupport value="true"/>
        </element>

        <element id="Bundle.entry:Practitioner.resource">
            <path value="Bundle.entry.resource" />
            <min value="1"/>
            <max value="1"/>
            <type>
                <code value="Practitioner" />
                <profile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
            </type>
            <mustSupport value="true"/>
        </element>

Best regards,
David

view this post on Zulip Lloyd McKenzie (Jan 25 2021 at 15:43):

If you didn't want to allow all practitioners - i.e. you wanted to enforce a minimum set of constraints, you could define a profile that represented the lowest common denominator of your two profiles.

view this post on Zulip Frank Oemig (Jan 25 2021 at 15:46):

... and derive the more specialized from it.

view this post on Zulip Lloyd McKenzie (Jan 25 2021 at 15:47):

That's a possibility and helps ensure consistency, but isn't strictly required.

view this post on Zulip David Gutknecht (Feb 02 2021 at 16:09):

That's also a good idea !
Thanks


Last updated: Apr 12 2022 at 19:14 UTC