hl7ch / ch-core

CH Core Implementation Guide (FHIR)
MIT License
16 stars 5 forks source link

Snapshot Table displays duplicate elements in the element Identifier #31

Closed ziegm closed 1 year ago

ziegm commented 4 years ago

In the following profiles, the sub-elements of the element identifier are displayed in duplicate in the snapshot table: https://fhir.ch/ig/ch-core/0.1.0/StructureDefinition-ch-core-organization.html https://fhir.ch/ig/ch-core/0.1.0/StructureDefinition-ch-core-patient.html https://fhir.ch/ig/ch-core/0.1.0/StructureDefinition-ch-core-composition-patient-epr.html

grafik

Applied slicing:

<slicing>
   <discriminator>
      <type value="pattern" />
      <path value="$this" />
   </discriminator>
   <rules value="open" />
</slicing>

Applied pattern:

<patternIdentifier>
   <system value="urn:oid:2.16.756.5.45" />
</patternIdentifier>

No duplicates are displayed without the following code element:

<element id="Organization.identifier:BER.value">
   <path value="Organization.identifier.value" />
   <short value="BER of the organization" />
   <definition value="BER of the organization"/>
   <min value="1" />
</element>
DavidGutknecht commented 4 years ago

Hello Michaela,

I'm really not an expert in slicing, but did you try with a different kind of discriminator like ?

<discriminator>
    <type value="value"/>
        <path value="system"/>
</discriminator>
<discriminator>
        <type value="value"/>
        <path value="code"/>
</discriminator>

Best regards, David

ziegm commented 4 years ago

Dear David

Thanks for your input.

image

You can see from the example of the Patient.identifier that the discriminator should be pattern, because the identifier:LocalPid is built differently than the others.

Best regards, Michaela

DavidGutknecht commented 4 years ago

Thanks for the explanation !

Just another supposition. LocalPid has cardinality 0..* But the pattern identifier is fix grafik

This would mean that the system will not be able to distinguish between two LocalPid. You should somehow also include the system and the value or ?

Best regards, David

oliveregger commented 4 years ago

System and value are set to 1 for identifier:LocalPID, so you can distinguish between different LocalPID's according to system. The slice however identifies all localPID's together, thats intended.

The origin of this issue is that the html representation in the implementation guide is not correct, the snaphshot which is generated however is correct.

DavidGutknecht commented 4 years ago

Hello, just as information, I solved this duplicate on my side by doing as following: For example line 199 If you remove the patternIdentifier

 <patternIdentifier>
                <type>
                    <coding>
                        <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
                        <code value="MR" />
                    </coding>
                </type>
            </patternIdentifier>

And if you fix the "system" and the "code" in separated elements:

        <element id="Patient.identifier:LocalPid.type.coding.system">
            <path value="Patient.identifier.type.coding.system" />
            <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203"/>
        </element>
        <element id="Patient.identifier:LocalPid.type.coding.code">
            <path value="Patient.identifier.type.coding.code" />
            <fixedCode value="MR"/>
        </element>

It should do the Trick, and nomore duplicate in the html the "system" part. I'm not sure that the signification is the same. But from the look and feel point of view it looks ok ;-)

Best regards, David

oliveregger commented 4 years ago

we need to use the patternIdentifier otherwise the slicing will not work with the different identifier usecases. can you validate with your setup all the examples?

DavidGutknecht commented 4 years ago

You are right, after validating throw the examples I got some errors :-( Sorry for the disturbing.

ziegm commented 2 years ago

Added question in zulip: https://chat.fhir.org/#narrow/stream/179252-IG-creation/topic/Duplicated.20element.20in.20snapshot.20when.20using.20slicing

ziegm commented 1 year ago

Changes:

oliveregger commented 1 year ago

Telco vom 1.3: 12 - 0 - 0