scandihealth / lpr3-docs

https://scandihealth.github.io/lpr3-docs/
MIT License
11 stars 7 forks source link

Invalid representedOrganization #244

Closed ScaAnders closed 5 years ago

ScaAnders commented 5 years ago

I have a CDA document with the following author section: `

<templateId root="2.16.840.1.113883.10.12.102" />
<time value="20181115010000+0100" />
<assignedAuthor nullFlavor="NI" classCode="ASSIGNED">
  <representedOrganization classCode="ORG" determinerCode="INSTANCE">
    <id root="1.2.208.176.1.1" extension="634491000016008" assigningAuthorityName="SOR" />
  </representedOrganization>
</assignedAuthor>

I then get the exception you see below, telling me that I am missing an 'id' element inside the representedOrganization. Can you tell me how I must change the CDA? LPR3 response: urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-bResponseurn:uuid:43ce0cea-fc71-42d3-9eca-beb767da005ahttp://www.w3.org/2005/08/addressing/anonymousurn:uuid:d63aece6-c760-4295-9e86-595c6a49428f3</ns10:SecurityLevel>1440</ns10:TimeOut>0bef5b89-e7a8-420c-867b-8ef2d52094ca</ns10:FlowID>460f5a2c-7110-4a7b-95c6-6f595e6211e4</ns10:MessageID></ns10:Linking>flow_finalized_succesfully</ns10:FlowStatus>RUTINE</ns10:Priority>yes</ns10:RequireNonRepudiationReceipt></ns10:Header></soap:Header></ns2:RegistryError></ns2:RegistryErrorList></ns2:RegistryResponse></soap:Body></soap:Envelope> `

TueCN commented 5 years ago

Your XML does not validate up against the CDA XML schema.

The validation error message specifies what is expected:

One of '{urn:hl7-org:v3:realmCode, urn:hl7-org:v3:typeId, urn:hl7-org:v3:templateId, urn:hl7-org:v3:id}' is expected.

You can place e.g. a <id nullFlavor="NI"/> as the first child of <assignedAuthor>

        <assignedAuthor nullFlavor="NI" classCode="ASSIGNED">
            <id nullFlavor="NI"/>
            <representedOrganization classCode="ORG" determinerCode="INSTANCE">
                <id root="1.2.208.176.1.1" extension="634491000016008" assigningAuthorityName="SOR"/>
            </representedOrganization>
        </assignedAuthor>

You can download the CDA XML schema from https://gazelle.ihe.net/XSD/HL7/CDA/

ScaAnders commented 5 years ago

Thanks!