Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping for medication 'in reserve' #17

Closed
ziegm opened this issue Jul 15, 2022 · 7 comments
Closed

Mapping for medication 'in reserve' #17

ziegm opened this issue Jul 15, 2022 · 7 comments
Assignees
Labels
CH EMED depends on CH EMED issue waiting for input

Comments

@ziegm
Copy link
Contributor

ziegm commented Jul 15, 2022

Update mapping for FHIR element 'Dosage.asNeededBoolean',
see profile dosage structured
and profile dosage unstructured

Example including this element: http://build.fhir.org/ig/ahdis/ch-emed-pmp/Bundle-1-1-MTPDafalgan.json.html

@ziegm ziegm added map dependency CH EMED depends on CH EMED issue labels Jul 15, 2022
@ziegm
Copy link
Contributor Author

ziegm commented Jul 15, 2022

see discussion in CH EMED: hl7ch/ch-emed#72

@oliveregger
Copy link
Member

@oliveregger
Copy link
Member

@qligier an MTP with the added "In reserve" extension, is not accepted by the PMP, returns the following error message:

INVALID_DOCUMENT_CONTENT

The document 'c9270a7b-d738-463f-9776-5a9176e3186d' is not valid: javax.xml.bind.ValidationException: XmlSchemaValidator.validate() - found XML Schema error\n - with linked exception:\n[org.xml.sax.SAXParseException; cvc-enumeration-valid: Value 'DEF' is not facet-valid with respect to enumeration '[ACT, ACCM, CONS, CTTEVENT, INC, INFRM, PCPR, REG, SPCTRT]'. It must be a value from the enumeration.]."

this comes from the

    <act classCode="DEF" moodCode="ACT">

Is this an error in the spec or needs the validator of the PMP to be modified?

see cda example / response here: https://test.ahdis.ch/eprik-cara-pmp/#/transaction/d4c47c73-6d6d-46c3-b330-a457aa7a3438

@qligier
Copy link
Member

qligier commented Aug 10, 2022

It should be

<act classCode="ACT" moodCode="DEF">

I fixed a document with this issue yesterday but I see the error comes from the integration guide, I'll fix it there too.

@oliveregger
Copy link
Member

Now I get a schematron error: https://test.ahdis.ch/eprik-cara-pmp/index.html#/transaction/7ce33e95-e16f-479f-99fd-f1ce640c85f5 :

The document 'ed308296-48d6-44c7-8265-387e30206cf2' is not valid: Schematron error: {[[Text@0x4e1f6333: content=[(MedicationTreatmentPlanEntryContentModule)/d42e12243-true-d242096e0: 'substanceAdministration' is defined as closed, and this element 'entryRelationship' is not allowed, or not allowed with this content. This may concern the templateId, code or id. Expected in this context: hl7:templateId[@root = '2.16.756.5.30.1.1.10.4.34'] | hl7:templateId[@root = '1.3.6.1.4.1.19376.1.9.1.3.7'] | hl7:templateId[@root = '2.16.840.1.113883.10.20.1.24'] | hl7:templateId[@root = '1.3.6.1.4.1.19376.1.5.3.1.4.7'] | hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.1'] | hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.8'] | hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.9'] | hl7:id[not(@nullFlavor)] | hl7:text[not(@nullFlavor)][hl7:reference] | hl7:statusCode[@code = 'completed'] | hl7:effectiveTime[@xsi:type='IVL_TS'] | hl7:effectiveTime[@operator='A' and @xsi:type='EIVL_TS'] | hl7:effectiveTime[@operator='A' and @xsi:type='SXPR_TS'] | hl7:repeatNumber | hl7:routeCode[concat(@code, @codesystem) = doc('include/voc-2.16.756.5.30.1.1.11.2-DYNAMIC.xml')//valueSet[1]/conceptList/concept/concat(@code, @codesystem) or @nullFlavor] | hl7:approachSiteCode | hl7:doseQuantity | hl7:rateQuantity | hl7:consumable[not(@nullFlavor)][hl7:manufacturedProduct] | hl7:author | hl7:author | hl7:entryRelationship[@typecode='COMP' and hl7:substanceAdministration and (../hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.8'] or ../hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.10'] or ../hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.9'] or ../hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.11']) and not(hl7:substanceAdministration/hl7:templateId)] | hl7:entryRelationship[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.4.1']]] | hl7:entryRelationship[hl7:observation] | hl7:entryRelationship[@typecode='REFR'] | hl7:entryRelationship[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3']]] | hl7:entryRelationship[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.3.1']]] | hl7:entryRelationship[hl7:supply[@Classcode='SPLY' and @moodcode='RQO']] | hl7:entryRelationship[hl7:act[hl7:templateId[@root='1.3.6.1.4.1.19376.1.9.1.3.9.1']]] | hl7:reference[@typecode = 'XCRPT'] | hl7:precondition[hl7:criterion] | hl7:entryRelationship[hl7:substanceAdministration[hl7:templateId[@root='2.16.756.5.30.1.1.10.4.52']]] | hl7:entryRelationship[hl7:act[hl7:templateId[@root='2.16.756.5.30.1.1.10.4.2']]] (rule-reference: d42e12243-true-d242096e0)]]; fpi=null; icon=null; lang=null; see=null; space=null]} in {/hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:substanceAdministration/hl7:entryRelationship}." errorCode="InvalidDocumentContent" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
</ns3:RegistryErrorList>

              <entryRelationship typeCode="COMP">
                <act classCode="ACT" moodCode="DEF">
                  <templateId root="2.16.756.5.30.1.1.10.10"/>
                  <code code="225761000" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED Clinical Terms" displayName="As required (qualifier value)"/>
                  <statusCode code="completed"/>
                </act>
              </entryRelationship>

@qligier do you see what is wrong with the template? if I remove the template it works, but that's not what I would like to achieve ...

@qligier
Copy link
Member

qligier commented Aug 10, 2022

Probably because the Schematron uses the old definitions, it should be fixed with the new deployment. I don't see an issue with your XML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH EMED depends on CH EMED issue waiting for input
Projects
None yet
Development

No branches or pull requests

3 participants