ahdis / ch-emed-pmp Goto Github PK
View Code? Open in Web Editor NEWFHIR Implementation Guide
FHIR Implementation Guide
Should the patient instructions be displayed in the medication card PDF, and if so, how?
{
"resourceType": "OperationOutcome",
"issue": [ {
"severity": "warning",
"code": "invalid",
"details": {
"coding": [ {
"code": "EXTRA_METADATA_NOT_SAVED"
} ],
"text": "DocumentEntry.sourcePatientInfo has not been saved"
}
}, {
"severity": "error",
"code": "invalid",
"details": {
"coding": [ {
"code": "REGISTRY_ERROR"
} ],
"text": "The PMP has encountered an internal error while aggregating the CDA document '5f8dd3db-ccb7-432b-84c3-06727d4f0cf8', item: 'efd21f98-69d9-4b38-9a1d-7af7043240b9'"
}
} ]
}
https://test.ahdis.ch/eprik-cara/index.html#/transaction/3bde65a6-67ac-4061-b7d4-e96a47095116
@qligier could you please have a look?
MPI-ID: e7963774-9098-445f-9cab-5d52234b52c3
MTP: urn:uuid:45c6b4d4-19e7-4ae9-9809-37ec009deaec -> urn:uuid:01ce145d-a727-4650-abb1-789b836cead6
PADV: urn:uuid:a6a96b32-2a77-4bd8-a32b-adc46b7a8eb1 -> urn:uuid:282a97c7-22bd-4a37-9261-a459ec7c1fd6
Medication Cards: the dernier intervenant have changed, but the comment is not on the pdf; could/should it be there?
Medication List: the entry observation of the PADV is missing
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:ns2="urn:ihe:pharm">
<realmCode code="CHE"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.756.5.30.1.127.1.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.1.5"/>
<templateId root="2.16.756.5.30.1.1.10.1.13"/>
<templateId root="2.16.756.5.30.1.1.10.1.9"/>
<templateId root="2.16.840.1.113883.10.12.2"/>
<templateId root="2.16.840.1.113883.10.12.1"/>
<id root="da26c880-b10e-4f2a-8cec-699011efab4d"/>
<code code="56445-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medication summary">
<translation code="721912009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Medication summary document (record artifact)"/>
</code>
<title language="fr-CH">Liste de médication</title>
<effectiveTime value="20220622134335+0000"/>
<confidentialityCode code="17621005" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Normal (qualifier value)"/>
<languageCode code="fr-CH"/>
<setId root="da26c880-b10e-4f2a-8cec-699011efab4d"/>
<versionNumber value="1"/>
<recordTarget>
<templateId root="2.16.756.5.30.1.1.10.2.1"/>
<patientRole>
<id root="2.16.756.5.30.1.191.1.0.2.1" extension="e7963774-9098-445f-9cab-5d52234b52c3"/>
<patient>
<name use="L">
<family>NEFF-WINGEIER</family>
<given>Trong Sang</given>
</name>
<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1" codeSystemName="HL7 AdministrativeGender" displayName="Male"/>
<birthTime value="19871008"/>
</patient>
</patientRole>
</recordTarget>
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<functionCode code="COMPOSER" codeSystem="2.16.840.1.113883.5.88" codeSystemName="Participation Function" displayName="composer software"/>
<time value="20220622134335+0000"/>
<assignedAuthor>
<id root="2.51.1.3" extension="7601002860123"/>
<assignedAuthoringDevice>
<manufacturerModelName>CARA's PMP</manufacturerModelName>
<softwareName>PMP CARA v0.1</softwareName>
</assignedAuthoringDevice>
</assignedAuthor>
</author>
<custodian>
<templateId root="2.16.756.5.30.1.1.10.2.3"/>
<assignedCustodian>
<representedCustodianOrganization>
<id root="2.51.1.3" extension="1.2.3.4"/>
<name use="L">Hausarzt</name>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<informationRecipient typeCode="PRCP">
<templateId root="2.16.756.5.30.1.1.10.2.4"/>
<intendedRecipient>
<receivedOrganization>
<name use="L">Hausarzt</name>
</receivedOrganization>
</intendedRecipient>
</informationRecipient>
<component contextConductionInd="true">
<structuredBody>
<component>
<section>
<templateId root="2.16.756.5.30.1.1.10.3.44"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.2.5"/>
<code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
<title language="fr-CH">Liste de médicaments</title>
<text>
<content ID="generator_comment">Cette liste de médication a été générée automatiquement par le PMP le June 22, 2022 at 1:43:35 PM UTC. Les paramètres utilisés pour la génération du document sont : les éléments de type Medication Treatment Plan Item, Prescription Item, Dispense Item et PADV sont inclus ; tous les traitements sont considérés.</content>
<content ID="nljsm.">Texte narratif pour l'item ccd512dc-ac8e-468b-ab74-ee1e6b6b000c</content>
<table>
<thead>
<tr>
<th>Präpartename</th>
<th>Wirkstoffname</th>
<th>Galenische Form</th>
<th>Dosis pro Einheit</th>
<th>Dos.Morgen</th>
<th>Dos.Mittag</th>
<th>Dos.Abend</th>
<th>Dos.Nacht</th>
<th>Verabreichungsweg</th>
<th>Kommentar</th>
<th>Anwendungsdauer</th>
<th>Behandlungsgrund</th>
</tr>
</thead>
<tbody>
<tr ID="nljsm.mtp.1">
<td ID="nljsm.mtp.1.brandedmedication">Triatec</td>
<td ID="nljsm.mtp.1.ingredient">Ramipril</td>
<td ID="nljsm.mtp.1.packageform">Tbl</td>
<td ID="nljsm.mtp.1.dosequantity">2.5 mg</td>
<td ID="nljsm.mtp.1.dosagemorning">0.5</td>
<td ID="nljsm.mtp.1.dosagelunch">0</td>
<td ID="nljsm.mtp.1.dosageevening">0</td>
<td ID="nljsm.mtp.1.dosagenight">0</td>
<td ID="nljsm.mtp.1.routecode">oral</td>
<td ID="nljsm.mtp.1.note"/>
<td ID="nljsm.mtp.1.datefromto"/>
<td ID="nljsm.mtp.1.reason">Bluthochdruck</td>
</tr>
</tbody>
</table>
<content ID="ieiiu.">Texte narratif pour l'item ce620825-baf3-4c6c-813f-4c5ad9a85a55</content>
<paragraph ID="ieiiu.refpdf">Dafalgan cpr pell 1 g, 1-1-1, dosage avancé: en réserve, raison: douleurs</paragraph>
</text>
<entry>
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="2.16.756.5.30.1.1.10.4.34"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.7"/>
<templateId root="2.16.840.1.113883.10.20.1.24"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1"/>
<id root="CCD512DC-AC8E-468B-AB74-EE1E6B6B000C"/>
<text>
<reference value="#mtp.1"/>
</text>
<statusCode code="completed"/>
<effectiveTime xsi:type="IVL_TS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<low value="20111129"/>
<high nullFlavor="UNK"/>
</effectiveTime>
<effectiveTime xsi:type="EIVL_TS" operator="A" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<event code="MORN"/>
</effectiveTime>
<repeatNumber nullFlavor="NI"/>
<routeCode code="20053000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Oral use"/>
<doseQuantity value="0.5" unit="732936001"/>
<consumable>
<manufacturedProduct classCode="MANU">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<manufacturedMaterial classCode="MMAT" determinerCode="KIND">
<templateId root="2.16.756.5.30.1.1.10.4.33"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.1"/>
<code code="7680538751228" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="TRIATEC Tabl 2.5 mg 20 Stk">
<originalText>
<reference value="#mtp.1"/>
</originalText>
</code>
<name>TRIATEC Tabl 2.5 mg</name>
<ns2:formCode code="10219000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Tablet"/>
<ns2:asContent classCode="CONT">
<ns2:containerPackagedMedicine classCode="CONT" determinerCode="INSTANCE">
<ns2:code code="7680538751228" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="TRIATEC Tabl 2.5 mg 20 Stk"/>
<ns2:name>TRIATEC Tabl 2.5 mg</ns2:name>
<ns2:formCode code="10219000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Tablet"/>
<ns2:capacityQuantity value="20" unit="732936001"/>
</ns2:containerPackagedMedicine>
</ns2:asContent>
<ns2:ingredient classCode="ACTI">
<ns2:quantity>
<numerator value="2.5" unit="mg"/>
<denominator value="1" unit="732936001"/>
</ns2:quantity>
<ns2:ingredient classCode="MMAT" determinerCode="KIND">
<ns2:code code="386872004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Ramipril (substance)"/>
<ns2:name>Ramipril</ns2:name>
</ns2:ingredient>
</ns2:ingredient>
</manufacturedMaterial>
</manufacturedProduct>
</consumable>
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<time value="20111129110000+0100"/>
<assignedAuthor>
<id root="2.51.1.3" extension="7601000234438"/>
<assignedPerson>
<name>
<family>Hausarzt</family>
<given>Familien</given>
</name>
</assignedPerson>
<representedOrganization>
<id root="2.51.1.3" extension="7601000234438"/>
<name>Hausarzt</name>
<addr>
<country>CH</country>
<city>Zürich</city>
<postalCode>8005</postalCode>
<streetAddressLine>Krankenstrasse 2</streetAddressLine>
</addr>
</representedOrganization>
</assignedAuthor>
</author>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.756.5.30.1.1.10.4.41"/>
<code code="75326-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem"/>
<text>Bluthochdruck
<reference value="#nljsm.mtp.1.reason"/>
</text>
<statusCode code="completed"/>
</observation>
</entryRelationship>
<reference typeCode="XCRPT">
<externalDocument>
<id root="CCD512DC-AC8E-468B-AB74-EE1E6B6B000C"/>
</externalDocument>
</reference>
</substanceAdministration>
</entry>
<entry>
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="2.16.756.5.30.1.1.10.4.34"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.7"/>
<templateId root="2.16.840.1.113883.10.20.1.24"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1"/>
<id root="CE620825-BAF3-4C6C-813F-4C5AD9A85A55"/>
<text>
<reference value="#refpdf"/>
</text>
<statusCode code="completed"/>
<effectiveTime xsi:type="SXPR_TS" operator="A" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<comp xsi:type="EIVL_TS">
<event code="MORN"/>
</comp>
<comp xsi:type="EIVL_TS" operator="I">
<event code="NOON"/>
</comp>
<comp xsi:type="EIVL_TS" operator="I">
<event code="EVE"/>
</comp>
</effectiveTime>
<repeatNumber nullFlavor="NI"/>
<routeCode code="20053000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Oral use"/>
<doseQuantity value="1" unit="732936001"/>
<consumable>
<manufacturedProduct classCode="MANU">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<manufacturedMaterial classCode="MMAT" determinerCode="KIND">
<templateId root="2.16.756.5.30.1.1.10.4.33"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.1"/>
<code code="7680563180079" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="DAFALGAN cpr pell 1 g blister 40 pce">
<originalText>
<reference value="#refpdf"/>
</originalText>
</code>
<name>DAFALGAN cpr pell 1 g blister 40 pce</name>
<ns2:formCode code="10221000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Film-coated tablet"/>
<ns2:asContent classCode="CONT">
<ns2:containerPackagedMedicine classCode="CONT" determinerCode="INSTANCE">
<ns2:code code="7680563180079" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="DAFALGAN cpr pell 1 g blister 40 pce"/>
<ns2:name>DAFALGAN cpr pell 1 g blister 40 pce</ns2:name>
<ns2:formCode code="10221000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Film-coated tablet"/>
<ns2:capacityQuantity value="40" unit="{Piece}"/>
</ns2:containerPackagedMedicine>
</ns2:asContent>
<ns2:ingredient classCode="ACTI">
<ns2:quantity>
<numerator value="1" unit="g"/>
<denominator value="1" unit="732936001"/>
</ns2:quantity>
<ns2:ingredient classCode="MMAT" determinerCode="KIND">
<ns2:code code="387517004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Paracetamol (substance)"/>
<ns2:name>Paracétamol</ns2:name>
</ns2:ingredient>
</ns2:ingredient>
</manufacturedMaterial>
</manufacturedProduct>
</consumable>
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<time value="20190212110000+0100"/>
<assignedAuthor>
<id root="2.51.1.3" extension="7601000201041"/>
<assignedPerson>
<name>
<family>Rochat</family>
<given>Dr</given>
<prefix qualifier="AC">Dr. med.</prefix>
</name>
</assignedPerson>
</assignedAuthor>
</author>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.756.5.30.1.1.10.4.41"/>
<code code="75326-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem"/>
<text>douleurs
<reference value="#ieiiu.refpdf"/>
</text>
<statusCode code="completed"/>
</observation>
</entryRelationship>
<reference typeCode="XCRPT">
<externalDocument>
<id root="01CE145D-A727-4650-ABB1-789B836CEAD6"/>
</externalDocument>
</reference>
</substanceAdministration>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
CARD: works
LIST: missing reference to the changed MedicationStatement
Info from @qligier : not fully supported yet
Update mapping
IG cannot be built as CI build with dependency on CH EMED (adjustment of profile dosing unstructured necessary, see here).
Bundle.entry[0]: Bundle.entry[0].resource.section[0].entry[0]: Bundle.entry[0].resource.section[0].entry[0]: Bundle.entry[4].resource: MedicationStatement.contained: max allowed = 1, but found 4 (from http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement-list|3.0.0)
Will be fixed in CH EMED: hl7ch/ch-emed#196
@qligier
I noticed that some of the contained resources had the same IDs (e.g. #1 twice), this cannot be resolved.
There are a few issues with the MedicationList (maybe already known):
Tested use case:
Slicing information (This element does not match any known slice defined in the profile http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement) in the validation of a Medication List document.
In the element meta.profile is the ch-emed-medicationstatement, not the more specific ch-emed-medicationstatement-list specified (also for the other entry types). That could be changed, to avoid the slicing information...
"meta": {
"profile": [
"http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationstatement",
"http://hl7.org/fhir/StructureDefinition/MedicationStatement"
]
},
"meta": {
"profile": [
"http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-observation",
"http://hl7.org/fhir/StructureDefinition/Observation"
]
},
etc.
@qligier
MAGMED010 (Loris Bertrand PALOLA, 1995-05-23), MPI-ID: 68e0258d-20c6-4f6c-8740-00e9e0f0d29f
I tried to delete the documents (MTP) and it didn't work. The server responds with:
"text": "The document is not at the end of its medication chain(s) [PMP (6.4.2.5)]."
https://test.ahdis.ch/eprik-proxy-cara/index.html#/transaction/f4237a8c-13c6-447f-bf1d-c1cd2517bbbe
Something seems to be mixed up on the server. Do you see anything and how can it be cleaned up?
We have successfully registered the Technical User certificate with CARA/EPR. We expect that these certificates are only valid for 1 year. So what happens in 1 year? I thought we could start this discussion.
I am thinking that a month prior to certificate expiration, the client will create a new key/pair signed by the appropriate root authority, install it into our system, and then register it CARA/EPR.
When is the certificate active in CARA/EPR?
At some point, the client will then switch over to use the new certificate (sign the assertion in the ITI-71 request with the new certificate). Will CARA/EPR support the old and new certificate during this transition?
It seems this transition needs to be dynamic and not requiring manual intervention.
Wenn kein PDF vorhanden ist, muss die narrativeLink Extension vorhanden sein und auf Composition.section.text referenzieren.
Die Beispiele müssen entsprechend angepasst werden (p id=redpdf):
"section": [
{
"title": "Plan de traitement médicamenteux",
"code": {
"coding": [
{
"system": "http://loinc.org/",
"code": "77604-7",
"display": "Medication treatment plan.brief"
}
]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p id=\"refpdf\">Dafalgan cpr pell 1 g, 1-1-1, dosage avancé: en réserve, raison: douleurs</p></div>"
},
We submit an MTP and afterwards a PADV with a dosage change, however the dosage change is afterwards not reflected in the MedicationList and MedicationCard.
GetDocumetReferences shows the MTP, PADV:
MPI-PID: e7963774-9098-445f-9cab-5d52234b52c3
MTP: urn:uuid:ccd512dc-ac8e-468b-ab74-ee1e6b6b000c
PADV: urn:uuid:d9812d1a-4562-4053-a497-4ec3bd933e39
See content of files in CDA.
@qligier could you have a look please?
The MedicationCard refers to the MTPItem, but the id element is empty (should be the same as the externalDocumet.id?).
MAGMED006 - Get Medication Card - check CDA, e.g:
<entryRelationship typeCode="REFR">
<substanceAdministration classCode="SBADM">
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.10"/>
<templateId root="2.16.756.5.30.1.1.10.4.45"/>
<id/>
<code code="MTPItem" codeSystem="1.3.6.1.4.1.19376.1.9.2.2"/>
<consumable>
<manufacturedProduct>
<manufacturedMaterial nullFlavor="NA"/>
</manufacturedProduct>
</consumable>
<reference typeCode="XCRPT">
<externalDocument>
<id root="e9e086b5-cde0-4eca-888d-d4a733875d98"/>
</externalDocument>
</reference>
</substanceAdministration>
</entryRelationship>
@qligier could you have a short look?
Here is an example:
CHUV001
CommunityPatientID=64370848-bed5-46c4-972f-05b410b59235
https://test.ahdis.ch/eprik-cara/index.html#/transaction/2fc3847e-3b07-40c7-a260-4f12bd741fff
1-3-MTP-Temesta
2-1-PADV-Temesta: stopped
LIST
I am currently reworking the HCI Analyzer use cases, where the PMP list is taken as input document. I noticed that the following information is missing in the list:
HCI Use Case:
General:
PMP sets the "Hausarzt" as custodian with a invalid GLN (format).
<custodian>
<templateId root="2.16.756.5.30.1.1.10.2.3"/>
<assignedCustodian>
<representedCustodianOrganization>
<id root="2.51.1.3" extension="1.2.3.4"/>
<name use="L">Hausarzt</name>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
The FHIR format checks the correctness of the GLN format.
gln-length: GLN must be exactly 13 characters long
gln-modulus-10: GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually
gln-startswith7601: GLN must start with 7601 for swiss hcp
If the document is further used for testing purposes, e.g. Analyzer, the GLN must currently be adjusted, otherwise there will be an error during validation.
Extension (AC) entfernen
According to the issue #17 about the mapping:
Update mapping for FHIR element 'Dosage.asNeededBoolean',
see profile dosage structured
and profile dosage unstructured
@oliveregger :
The mapping for the structured dosage works.
Is the mapping for the unstructured dosage already done and it is even possible/allowed?
The IG cannot build the example 3-3-MTPDermed with this element included:
// The element or path you referenced does not exist: dosage[nonstructured].asNeededBoolean
// * dosage[nonstructured][=].asNeededBoolean = true
For testing purposes, the document is adjusted manually accordingly: Bundle-3-3-MTPDermed_inReserve.zip
Transformed CDA document: CDA-3-3-MTPDermed_inReserve.zip
Matchbox: Provide and Register
{
"response": {
"status": 400,
"data": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "INVALID_DOCUMENT_CONTENT"
}
],
"text": "The document 'cc2117a2-a547-4415-9fea-c26ea3d8ac44' is not valid: Schematron error: {[[Text@0x4ba1d2ef: content=[(MedicationTreatmentPlanEntryContentModule): choice (hl7:templateId[@root='1.3.6.1.4.1.19376.1.5.3.1.4.7.1'] or 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.9']) does not contain enough elements [min 1x]]]; 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}."
}
}
]
}
},
"config": {
"method": "POST",
"url": "https://test.ahdis.ch/mag-pmp/fhir/",
"headers": {}
}
}
Move comment from Composition.section[annotation] to an element in MedicationStatement for these documents:
Upload 1-2-MTPVoltaren:
{
"response": {
"status": 400,
"data": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "REGISTRY_ERROR"
}
],
"text": "Unexpected exception while processing the request"
}
}
]
}
},
"config": {
"method": "POST",
"url": "https://test.ahdis.ch/mag-pmp/fhir/",
"headers": {}
}
}
@oliveregger : Could you please adapt the mapping?
UC:
MTP Cetirizine
PADV Cetirizine (CHANGE)
Transformed CDA document:
CDA-3-2-PADVCetirizine.zip with forbidden element: <repeatNumber nullFlavor="NI"/>
CDA spec (Art decor)
Provide and register:
{
"response": {
"status": 400,
"data": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "INVALID_DOCUMENT_CONTENT"
}
],
"text": "The document 'f761dbf7-c05c-46bf-9b2a-94ca58d8b374' is not valid: Schematron error: {[[Text@0x79c93037: content=[(PharmaceuticalAdviceItemEntryContentModule): The 'hl7:repeatNumber' is forbidden in the 'Changed Dosage Instructions' part of PADV items.]]; fpi=null; icon=null; lang=null; see=null; space=null]} in {/hl7:ClinicalDocument/hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:entry/hl7:observation/hl7:entryRelationship[2]/hl7:substanceAdministration}."
}
}
]
}
},
"config": {
"method": "POST",
"url": "https://test.ahdis.ch/mag-pmp/fhir/",
"headers": {}
}
}
There is no information/warning in CH EMED if the code of Medication.ingredient is not included in the value set with an extensible binding.
<pharm:ingredient classCode="MMAT" determinerCode="KIND">
<pharm:code code="387165009" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Enalapril maleate (substance)"/>
<pharm:name>Énalapril maléate</pharm:name>
</pharm:ingredient>
"text": "The document '5ddd0eec-124a-40b9-aee8-a104a6441945' is not valid: Schematron error: {[[Text@0x6ff315e5: content=[(ManufacturedMaterialEntryContentModule): The value for code SHALL be selected from value set '2.16.756.5.30.1.1.11.82' ActivePharmaceuticalIngredient (DYNAMIC).]]; 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:consumable/hl7:manufacturedProduct/hl7:manufacturedMaterial/pharm:ingredient/pharm:ingredient/pharm:code}."
Medication.ingredient: https://build.fhir.org/ig/hl7ch/ch-emed/StructureDefinition-ch-emed-medication.html
ValueSet (extensible): https://build.fhir.org/ig/hl7ch/ch-emed/ValueSet-ActivePharmaceuticalIngredient.html
Medication with code, which is not included in the value set: http://build.fhir.org/ig/ahdis/ch-emed-pmp/branches/validation-extensible/MedicationStatement-0-1-MedStatReniten.html
Validation (QA): http://build.fhir.org/ig/ahdis/ch-emed-pmp/branches/validation-extensible/qa.html#_scratch_ig-build-temp-94XR3V_repo_fsh-generated_resources_MedicationStatement-0-1-MedStatReniten
The dose (when unstructured) is not presented in the PDF.
For example (dosage.text).
"dosage": [ {
"id": "#dosage-1",
*"text": "5 mg = 1 cpr à 08:00, 2.5 mg = 0.5 cpr à 14:00, 5 mg = 1 cpr à 18:00, PO, 3 x / j - Tous les jours ",
"patientInstruction": "with food or milk to prevent stomach upset"
}
Getting a HTTP 500 error in the security token service.
This is odd because we have several systems, but we are only getting this error from one of them.
I compared the TCU assertion between the system that works and does not work, but did not see any differences.
https://test.ahdis.ch/eprik-proxy-cara/index.html
1/26/2023, 1:09:45 PM sts SOAP → HTML POST /EPDSTS/services/SecurityTokenService Http-Status 500 Response invalid
2.1.1 CH EMED - UC Step 1-1 and PADV description: change posology
MAGMED010 (targetId: Patient/2.16.756.5.30.1.191.1.0.2.1-68e0258d-20c6-4f6c-8740-00e9e0f0d29f)
MTP: urn:uuid:c9f758a1-296c-4710-84d4-e181db8c7478 -> urn:uuid:45cd122e-1ccb-4b79-8465-9f464acf2232
PADV: urn:uuid:adab8d2d-ae14-48d6-8d15-b726d6ea82c5 -> urn:uuid:9379eac9-99a3-453b-8a71-8b880b51aba0
{
"response": {
"status": 400,
"data": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "warning",
"code": "invalid",
"details": {
"coding": [
{
"code": "EXTRA_METADATA_NOT_SAVED"
}
],
"text": "DocumentEntry.sourcePatientInfo has not been saved"
}
},
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "INVALID_DOCUMENT_CONTENT"
}
],
"text": "The document '9379eac9-99a3-453b-8a71-8b880b51aba0' is not valid: A patient or their representatives are allowed to publish a PADV document with a code that is not COMMENT only if the referenced document was published by themself of their representatives. [PMP (6.4.2.2)]."
}
},
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "INVALID_DOCUMENT_CONTENT"
}
],
"text": "The document '9379eac9-99a3-453b-8a71-8b880b51aba0' is not valid: A patient or their representatives are allowed to publish a PADV document with a code that is not COMMENT only if the referenced document was published by themself of their representatives. [PMP (6.4.2.2)]."
}
}
]
}
},
"config": {
"method": "POST",
"url": "https://test.ahdis.ch/mag-pmp2/fhir/",
"headers": {}
}
}
The validator is returning an error on the Device resource:
"Entry 'urn:uuid:408c556f-353e-48b8-8475-1ebe9af04a3b' isn't reachable by traversing links (forward or backward) from the Composition"
Previously, we could refer to the Device resource using the author. The previous version supported a choice from the following resources:
PractitionerRole
Patient
Practitioner
Device
RelatedPerson
Organization
The new version of the spec has the author element with a choice from the following:
PractionerRole
Patient
RelatedPerson
Getting a 400 Bad Request when retrieving the medication card for
MAGMED001
Trong Sang NEFF-WINGEIER, 1987-10-08
Community ID = e7963774-9098-445f-9cab-5d52234b52c3
This is the patient Oliver setup with 1 MTP. Reading the card was working.
Now we add 2 MTPs and not it returns the error below.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
soap:Header
urn:ihe:iti:2007:RetrieveDocumentSetResponse
urn:uuid:04011308-76f1-4719-a951-dcef2557e199
http://www.w3.org/2005/08/addressing/anonymous
urn:uuid:f437cc73-4d26-496a-ad4f-661d587efe82
</soap:Header>
soap:Body
<ns2:RetrieveDocumentSetResponse xmlns:ns7="urn:ihe:iti:rmd:2017" xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns2="urn:ihe:iti:xds-b:2007">
<ns4:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure">
ns4:RegistryErrorList
<ns4:RegistryError codeContext="An unexpected exception occurred" errorCode="XDSRegistryError" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
</ns4:RegistryErrorList>
</ns4:RegistryResponse>
</ns2:RetrieveDocumentSetResponse>
</soap:Body>
</soap:Envelope>
The treatment reason and patient medication instructions are updated at each new document
(i.e. we take the last one) and we put it in the medication card.
I implemented the mapping to Patient Instructions, I see it in the MedicationList (see https://test.ahdis.ch/eprik-cara-pmp/index.html#/transaction/fd9a1611-87ff-4394-8f59-d54de0b0afc6, Response tab)
however not in the generated MedicationCard (https://test.ahdis.ch/eprik-cara-pmp/index.html#/transaction/f8802b4d-9a01-4566-bb70-e56f56142228, Response tab).
@qligier could you please have a look:
https://test.ahdis.ch/eprik-proxy-cara/index.html#/transaction/515769fb-0d21-423e-8a5d-48ae0c06f1cf
(Testing use case step 2.2.1: https://github.com/ahdis/ch-emed-pmp/wiki/Test-Cases#22-padv-cancel)
"text": "The document '176156a2-4292-4fbc-9715-1130bcd0cf36' is not valid: javax.xml.bind.ValidationException: XmlSchemaValidator.validate() - found XML Schema error\n - with linked exception:\n[org.xml.sax.SAXParseException; cvc-complex-type.2.4.b: The content of element 'author' is not complete. One of '{"urn:hl7-org:v3":templateId, "urn:hl7-org:v3":functionCode, "urn:hl7-org:v3":time}' is expected.]."
}
FHIR input: Composition.author
"author" : [
{
"reference" : "Organization/Pharmacy"
}
],
The author of the document (person or device), see http://fhir.ch/ig/ch-emed/StructureDefinition-ch-emed-composition-pharmaceuticaladvice.html
When we upload the Triatec MTP 1.1. from the CH-EMED usecase to the PMP the resulting MedicationCard does not show the doseQuantity.
It is visible in the PML for patient e7963774-9098-445f-9cab-5d52234b52c3
<repeatNumber nullFlavor="NI"/>
<routeCode code="20053000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Oral use"/>
<doseQuantity value="0.5" unit="732936001"/>
<consumable>
but not in the Medication Card:
<repeatNumber nullFlavor="NI"/>
<routeCode code="20053000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Oral use"/>
<consumable>
MTP document
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pharm="urn:ihe:pharm">
<realmCode code="CHE"/>
<typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/>
<templateId root="2.16.756.5.30.1.1.10.1.9"/>
<templateId root="2.16.840.1.113883.10.12.2"/>
<templateId root="2.16.840.1.113883.10.12.1"/>
<templateId root="2.16.756.5.30.1.127.1.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.1.6"/>
<templateId root="2.16.756.5.30.1.1.10.1.7"/>
<id root="C9F758A1-296C-4710-84D4-E181DB8C7478"/>
<code code="77603-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medication treatment plan.extended">
<translation xsi:type="CD" code="419891008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Record artifact (record artifact)"/>
</code>
<title>Therapieentscheid Medikation</title>
<effectiveTime value="20111129110000+0100"/>
<confidentialityCode code="17621005" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Normally accessible"/>
<languageCode code="de-CH"/>
<setId root="C9F758A1-296C-4710-84D4-E181DB8C7478"/>
<versionNumber value="1"/>
<recordTarget>
<templateId root="2.16.756.5.30.1.1.10.2.1"/>
<patientRole>
<id extension="11111111" root="2.999.1"/>
<addr>
<country>CH</country>
<city>Zürich</city>
<postalCode>8003</postalCode>
<streetAddressLine>Wiesenstr. 12</streetAddressLine>
</addr>
<patient>
<name>
<family>Wegmüller</family>
<given>Monika</given>
</name>
<administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1" codeSystemName="HL7 AdministrativeGender" displayName="Female"/>
<birthTime value="19430515"/>
</patient>
</patientRole>
</recordTarget>
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<time value="20111129110000+0100"/>
<assignedAuthor>
<id extension="7601000234438" root="2.51.1.3"/>
<assignedPerson>
<name>
<family>Hausarzt</family>
<given>Familien</given>
</name>
</assignedPerson>
<representedOrganization>
<id extension="7601000234438" root="2.51.1.3"/>
<name>Hausarzt</name>
<addr>
<country>CH</country>
<city>Zürich</city>
<postalCode>8005</postalCode>
<streetAddressLine>Krankenstrasse 2</streetAddressLine>
</addr>
</representedOrganization>
</assignedAuthor>
</author>
<custodian>
<templateId root="2.16.756.5.30.1.1.10.2.3"/>
<assignedCustodian>
<representedCustodianOrganization>
<id extension="7601000234438" root="2.51.1.3"/>
<name>Hausarzt</name>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<informationRecipient typeCode="PRCP">
<templateId root="2.16.756.5.30.1.1.10.2.4"/>
<intendedRecipient>
<addr>
<country>CH</country>
<city>Zürich</city>
<postalCode>8003</postalCode>
<streetAddressLine>Wiesenstr. 12</streetAddressLine>
</addr>
<informationRecipient>
<name>
<family>Wegmüller</family>
<given>Monika</given>
</name>
</informationRecipient>
</intendedRecipient>
</informationRecipient>
<component contextConductionInd="true">
<structuredBody>
<component>
<section>
<templateId root="2.16.756.5.30.1.1.10.3.13"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.2.6"/>
<id root="C9F758A1-296C-4710-84D4-E181DB8C7478"/>
<code code="77604-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medication treatment plan.brief"/>
<title>Medikamentöser Behandlungsplan</title>
<text>
<table>
<thead>
<tr>
<th>Präpartename</th>
<th>Wirkstoffname</th>
<th>Galenische Form</th>
<th>Dosis pro Einheit</th>
<th>Dosierung</th>
<th>Dos.Morgen</th>
<th>Dos.Mittag</th>
<th>Dos.Abend</th>
<th>Dos.Nacht</th>
<th>Verabreichungsweg</th>
<th>Kommentar</th>
<th>Anwendungsdauer</th>
<th>Behandlungsgrund</th>
</tr>
</thead>
<tbody>
<tr ID="mtp.1">
<td ID="mtp.1.brandedmedication">Triatec</td>
<td ID="mtp.1.ingredient">Ramipril</td>
<td ID="mtp.1.packageform">Tbl</td>
<td ID="mtp.1.dosequantity">2.5 mg</td>
<td ID="mtp.1.dosageintakemode">Morgens 1/2 Tablette nehmen</td>
<td ID="mtp.1.dosagemorning">0.5</td>
<td ID="mtp.1.dosagelunch">0</td>
<td ID="mtp.1.dosageevening">0</td>
<td ID="mtp.1.dosagenight">0</td>
<td ID="mtp.1.routecode">oral</td>
<td ID="mtp.1.note"/>
<td ID="mtp.1.datefromto"/>
<td ID="mtp.1.reason">Bluthochdruck</td>
</tr>
</tbody>
</table>
</text>
<entry>
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="2.16.756.5.30.1.1.10.4.34"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.7"/>
<templateId root="2.16.840.1.113883.10.20.1.24"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.1"/>
<id root="C9F758A1-296C-4710-84D4-E181DB8C7478"/>
<text>
<reference value="#mtp.1"/>
</text>
<statusCode code="completed"/>
<effectiveTime xsi:type="IVL_TS">
<low value="20111129"/>
<high nullFlavor="UNK"/>
</effectiveTime>
<effectiveTime xsi:type="EIVL_TS" operator="A">
<event code="MORN"/>
</effectiveTime>
<repeatNumber nullFlavor="NI"/>
<routeCode code="20053000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Oral use"/>
<doseQuantity unit="732936001" value="0.5"/>
<consumable>
<manufacturedProduct classCode="MANU">
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
<templateId root="2.16.840.1.113883.10.20.1.53"/>
<manufacturedMaterial classCode="MMAT" determinerCode="KIND">
<templateId root="2.16.756.5.30.1.1.10.4.33"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.1"/>
<code code="7680538751228" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="TRIATEC Tabl 2.5 mg 20 Stk">
<originalText>
<reference value="#mtp.1"/>
</originalText>
</code>
<name>TRIATEC Tabl 2.5 mg</name>
<pharm:formCode code="10219000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Tablet"/>
<pharm:asContent classCode="CONT">
<pharm:containerPackagedMedicine classCode="CONT" determinerCode="INSTANCE">
<pharm:code code="7680538751228" codeSystem="2.51.1.1" codeSystemName="GTIN" displayName="TRIATEC Tabl 2.5 mg 20 Stk"/>
<pharm:name>TRIATEC Tabl 2.5 mg</pharm:name>
<pharm:formCode code="10219000" codeSystem="0.4.0.127.0.16.1.1.2.1" displayName="Tablet"/>
<pharm:capacityQuantity unit="732936001" value="20"/>
</pharm:containerPackagedMedicine>
</pharm:asContent>
<pharm:ingredient classCode="ACTI">
<pharm:quantity>
<numerator xsi:type="PQ" unit="mg" value="2.5"/>
<denominator xsi:type="PQ" unit="732936001" value="1"/>
</pharm:quantity>
<pharm:ingredient classCode="MMAT" determinerCode="KIND">
<pharm:code code="386872004" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Ramipril (substance)"/>
<pharm:name>Ramipril</pharm:name>
</pharm:ingredient>
</pharm:ingredient>
</manufacturedMaterial>
</manufacturedProduct>
</consumable>
<entryRelationship typeCode="RSON">
<observation classCode="OBS" moodCode="EVN">
<templateId root="2.16.756.5.30.1.1.10.4.41"/>
<code xsi:type="CD" code="75326-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem"/>
<text xsi:type="ED">Bluthochdruck
<reference value="#mtp.1.reason"/>
</text>
<statusCode code="completed"/>
</observation>
</entryRelationship>
<entryRelationship typeCode="COMP">
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="2.16.756.5.30.1.1.10.4.52"/>
<text>Morgens 1/2 Tablette nehmen
<reference value="#mtp.1.dosageintakemode"/>
</text>
<consumable>
<manufacturedProduct>
<manufacturedMaterial nullFlavor="NA"/>
</manufacturedProduct>
</consumable>
</substanceAdministration>
</entryRelationship>
</substanceAdministration>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
https://test.ahdis.ch/mag-pmp2/camel/xdsretrieve?uniqueId=urn:uuid:8a454731-b65d-4c25-82a3-755ab586a7ef&repositoryUniqueId=2.999.756.42.1
400 Bad Request: "An unexpected exception occurred"
1/18/2023, 11:12:46 AM xds-iti43 SOAP → SOAP POST /pmp2/services/xds/iti43
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
soap:Header
urn:ihe:iti:2007:RetrieveDocumentSetResponse
urn:uuid:b9fff559-7180-4047-97b7-8e1c67628b89
http://www.w3.org/2005/08/addressing/anonymous
urn:uuid:96508406-577f-4ca7-8eab-69cf46904088
</soap:Header>
soap:Body
<ns2:RetrieveDocumentSetResponse xmlns:ns7="urn:ihe:iti:rmd:2017" xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns2="urn:ihe:iti:xds-b:2007">
<ns4:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure">
ns4:RegistryErrorList
<ns4:RegistryError codeContext="An unexpected exception occurred" errorCode="XDSRegistryError" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
</ns4:RegistryErrorList>
</ns4:RegistryResponse>
</ns2:RetrieveDocumentSetResponse>
</soap:Body>
</soap:Envelope>
https://pmp.posttenebrassilico.ch/pmp/mhd/logs
[2023-01-18 16:12:47] [info] 2023-01-18 16:12:47.217 INFO [read #3 - Delay] p.t.c.i.Iti43ResponseConverter: Uncaught exception while processing ITI-43 transaction
[2023-01-18 16:12:47] [info] org.projecthusky.fhir.emed.ch.common.error.InvalidEmedContentException: The practitioner is missing
[2023-01-18 16:12:47] [info] at org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprPractitionerRole.resolvePractitioner(ChEmedEprPractitionerRole.java:40)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.AbstractFhirGenerator.prepareResource(AbstractFhirGenerator.java:169)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.FhirMedicationCardGenerator.addMedicationStatementFromMtp(FhirMedicationCardGenerator.java:166)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.FhirMedicationCardGenerator.processTreatment(FhirMedicationCardGenerator.java:105)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.OnDemandMedicationCardAssembler.assemble(OnDemandMedicationCardAssembler.java:166)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generatePmlcDocument(GenerateOdDocumentCoprocessor.java:205)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:149)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
[2023-01-18 16:12:47] [info] Wrapped by: ch.qligier.hug.pmp.common.errors.exceptions.PmpInternalException: The On-Demand Document generation has failed
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generatePmlcDocument(GenerateOdDocumentCoprocessor.java:207)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:149)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.ProcessorForAuthorizedRequest.process(ProcessorForAuthorizedRequest.java:26)
[2023-01-18 16:12:47] [info] at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:108)
[2023-01-18 16:12:47] [info] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:81)
[2023-01-18 16:12:47] [info] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:812)
[2023-01-18 16:12:47] [info] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:720)
[2023-01-18 16:12:47] [info] 2023-01-18 16:12:47.218 INFO [read #3 - Delay] gier.hug.pmp.common.utils.Logs: Captured unexpected exception:
[2023-01-18 16:12:47] [info] org.projecthusky.fhir.emed.ch.common.error.InvalidEmedContentException: The practitioner is missing
[2023-01-18 16:12:47] [info] at org.projecthusky.fhir.emed.ch.epr.resource.ChEmedEprPractitionerRole.resolvePractitioner(ChEmedEprPractitionerRole.java:40)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.AbstractFhirGenerator.prepareResource(AbstractFhirGenerator.java:169)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.FhirMedicationCardGenerator.addMedicationStatementFromMtp(FhirMedicationCardGenerator.java:166)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.FhirMedicationCardGenerator.processTreatment(FhirMedicationCardGenerator.java:105)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.emed.ondemand.OnDemandMedicationCardAssembler.assemble(OnDemandMedicationCardAssembler.java:166)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generatePmlcDocument(GenerateOdDocumentCoprocessor.java:205)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:149)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
[2023-01-18 16:12:47] [info] Wrapped by: ch.qligier.hug.pmp.common.errors.exceptions.PmpInternalException: The On-Demand Document generation has failed
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generatePmlcDocument(GenerateOdDocumentCoprocessor.java:207)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:149)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
[2023-01-18 16:12:47] [info] at ch.qligier.hug.pmp.transactions.pmp.ProcessorForAuthorizedRequest.process(ProcessorForAuthorizedRequest.java:26)
[2023-01-18 16:12:47] [info] at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:108)
[2023-01-18 16:12:47] [info] at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:81)
[2023-01-18 16:12:47] [info] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:812)
[2023-01-18 16:12:47] [info] at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:720)
[2023-01-18 16:12:47] [info] 2023-01-18 16:12:47.230 DEBUG [read #3 - Delay] p.t.c.i.Iti43ResponseConverter: Sending response: RetrievedDocumentSet(super=Response(status=FAILURE, errors=[ErrorInfo[codeContext=An unexpected exception occurred,customErrorCode=,errorCode=REGISTRY_ERROR,location=,severity=ERROR]]), documents=[])
[2023-01-18 16:12:47] [info] 2023-01-18 16:12:47.234 INFO [io-8080-exec-59] MemoryAuditMessageTransmission: Saving a new ATNA message
the id's of the contained resources within the same container resource have to be different (even if the resource type is already different).
example snippet from a pmp list document, where it have a duplicated id (practitioner "1", practitionerrole "1"):
{
"resourceType": "MedicationRequest",
"meta": {
"profile": [
"https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medicationrequest-list"
]
},
"contained": [{
"resourceType": "Medication",
"id": "medication-2",
"meta": {
"profile": [
"https://fhir.cara.ch/StructureDefinition/ch-emed-epr-medication"
]
},
"code": {
"coding": [{
"system": "urn:oid:2.51.1.1",
"code": "7680500440334",
"display": "NORVASC Tabl 10 mg"
}
],
"text": "NORVASC Tabl 10 mg"
},
"form": {
"coding": [{
"system": "urn:oid:0.4.0.127.0.16.1.1.2.1",
"code": "10219000",
"display": "Tablet"
}
]
},
"amount": {
"numerator": {
"value": 30,
"unit": "Tablet (unit of presentation)",
"system": "http://snomed.info/sct",
"code": "732936001"
},
"denominator": {
"value": 1,
"unit": "Package",
"system": "http://unitsofmeasure.org",
"code": "{Package}"
}
},
"ingredient": [{
"itemCodeableConcept": {
"coding": [{
"system": "http://snomed.info/sct",
"code": "386864001",
"display": "Amlodipine (substance)"
}
],
"text": "Amlodipine"
},
"strength": {
"numerator": {
"value": 10,
"unit": "milligram",
"system": "http://unitsofmeasure.org",
"code": "mg"
},
"denominator": {
"value": 1,
"unit": "Tablet (unit of presentation)",
"system": "http://snomed.info/sct",
"code": "732936001"
}
}
}
]
}, {
"resourceType": "PractitionerRole",
"id": "1",
"meta": {
"profile": [
"https://fhir.cara.ch/StructureDefinition/ch-emed-epr-practitionerrole"
]
},
"practitioner": {
"reference": "#1"
},
"organization": {
"reference": "#2"
}
}, {
"resourceType": "Practitioner",
"id": "1",
"meta": {
"profile": [
"https://fhir.cara.ch/StructureDefinition/ch-emed-epr-practitioner"
]
},
"identifier": [{
"system": "urn:oid:2.51.1.3",
"value": "7601000234438"
}
],
"name": [{
"family": "Hausarzt",
"given": [
"Familien"
]
}
]
}, {
"resourceType": "Organization",
"id": "2",
"meta": {
"profile": [
"http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-organization"
]
},
"identifier": [{
"system": "urn:oid:2.51.1.3",
"value": "7601000234438"
}
],
"name": "Hausarzt",
"address": [{
"line": [
"Krankenstrasse 2"
],
"city": "Zürich",
"postalCode": "8005",
"country": "CH"
}
]
}
],
"extension": [{
"extension": [{
"url": "id",
"valueIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:c39fa7f0-d1ff-4245-b038-a9dbaf05dac4"
}
}, {
"url": "externalDocumentId",
"valueIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:c39fa7f0-d1ff-4245-b038-a9dbaf05dac4"
}
}
],
"url": "http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentplan"
}, {
"extension": [{
"url": "id",
"valueIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:1a82f387-a153-4138-b783-a63354ef37fa"
}
}, {
"url": "externalDocumentId",
"valueIdentifier": {
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:1a82f387-a153-4138-b783-a63354ef37fa"
}
}
],
"url": "http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-prescription"
}
],
"identifier": [{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:1a82f387-a153-4138-b783-a63354ef37fa"
}
],
"status": "active",
"intent": "order",
"medicationReference": {
"reference": "#medication-2"
},
"subject": {
"reference": "urn:uuid:500471bc-1131-4d05-a2fa-219499f8e687"
},
"requester": {
"reference": "#1"
},
"reasonCode": [{
"text": "-"
}
],
"dosageInstruction": [{
"id": "#dosage-2",
"patientInstruction": "-",
"timing": {
"repeat": {
"boundsPeriod": {
"start": "2012-02-04"
},
"when": [
"MORN",
"EVE"
]
}
},
"route": {
"coding": [{
"system": "urn:oid:0.4.0.127.0.16.1.1.2.1",
"code": "20053000",
"display": "Oral use"
}
]
},
"doseAndRate": [{
"doseQuantity": {
"value": 1,
"unit": "Tablet (unit of presentation)",
"system": "http://snomed.info/sct",
"code": "732936001"
}
}
]
}
],
"dispenseRequest": {
"validityPeriod": {
"start": "2012-02-04",
"end": "2012-05-03"
}
}
}
}
causes validator errors, because is not able to find the correct resource.
Unable to retrieve medication card ITI-68 when dose is not structured.
See patient:
CHUV001
Aegerter-Bischoff, BRUNO KAKOB
https://test.ahdis.ch/eprik-cara/index.html#/transaction/b4908cd6-8477-4ec9-8b4b-8b6a1f3c7b13
An unexpected exception occurred (3f44d3f7)
It appears the issue is related to the dosage we submitted with an MTP (See below).
In this example, we have a coded route and frequency, but NOT a dose. Is this medication card builder expecting a structured/coded dose/rate if there is a code frequency?
We are just changing how we encode dosage element - previously we only created a structure dosage if all elements (frequency, route, and dose were coded; but, now we are changing to encode what we have (partial dosage).
"dosage": [
{
"text": "750 MG/DOSE (10 mg/kg/dose), PO, * Max. 3x/j - Tous les jours *",
"patientInstruction": "with food",
"timing": {
"repeat": {
"boundsPeriod": {
"start": "2023-03-06"
},
"when": [
"MORN",
"NOON",
"EVE"
]
}
},
"asNeededBoolean": true,
"route": {
"coding": [
{
"system": "urn:oid:0.4.0.127.0.16.1.1.2.1",
"code": "20053000",
"display": "Oral use"
}
]
}
}
]
Patient MAGMED011 (targetId: Patient/2.16.756.5.30.1.191.1.0.2.1-e7963774-9098-445f-9cab-5d52234b52c3)
Upload document -> PADV (FHIR) with COMMENT:
http://build.fhir.org/ig/ahdis/ch-emed-pmp/Bundle-2-2-PADVDafalgan.json.html
Transformed document (FHIR -> CDA)
<?xml version="1.0" encoding="UTF-8"?>
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<realmCode code="CHE"/>
<typeId extension="POCD_HD000040" root="2.16.840.1.113883.1.3"/>
<templateId root="2.16.756.5.30.1.1.10.1.9"/>
<templateId root="2.16.840.1.113883.10.12.2"/>
<templateId root="2.16.840.1.113883.10.12.1"/>
<templateId root="2.16.756.5.30.1.127.1.4"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.1.2"/>
<templateId root="2.16.756.5.30.1.1.10.1.6"/>
<id root="E945BE33-338C-4A5C-AD8F-C21B536E506F"/>
<code code="61356-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medication pharmaceutical advice.extended">
<translation xsi:type="CD" code="419891008" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Record artifact (record artifact)"/>
</code>
<title>Commentaire relatif à la médication</title>
<effectiveTime value="20190215110000+0100"/>
<confidentialityCode code="17621005" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT" displayName="Normally accessible"/>
<languageCode code="fr-CH"/>
<setId root="E945BE33-338C-4A5C-AD8F-C21B536E506F"/>
<versionNumber value="1"/>
<recordTarget>
<templateId root="2.16.756.5.30.1.1.10.2.1"/>
<patientRole>
<id extension="MAGMED011" root="2.16.756.5.30.1.196.3.2.1"/>
<telecom value="[email protected]" use="HP"/>
<patient>
<name>
<family>NEFF-WINGEIER</family>
<given>Trong Sang</given>
</name>
<administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1" codeSystemName="HL7 AdministrativeGender" displayName="Male"/>
<birthTime value="19871008"/>
</patient>
</patientRole>
</recordTarget>
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<time value="20190215110000+0100"/>
<assignedAuthor>
<id extension="7601000876546" root="2.51.1.3"/>
<assignedPerson>
<name>
<family>Pharm</family>
<given>Pharmacien</given>
</name>
</assignedPerson>
</assignedAuthor>
</author>
<custodian>
<templateId root="2.16.756.5.30.1.1.10.2.3"/>
<assignedCustodian>
<representedCustodianOrganization>
<id extension="7601000876546" root="2.51.1.3"/>
<name>Pharmacie</name>
<addr>
<country>CH</country>
<city>Zürich</city>
<postalCode>8005</postalCode>
<streetAddressLine>Apothekerstrasse 22</streetAddressLine>
</addr>
</representedCustodianOrganization>
</assignedCustodian>
</custodian>
<informationRecipient typeCode="PRCP">
<templateId root="2.16.756.5.30.1.1.10.2.4"/>
<intendedRecipient>
<informationRecipient>
<name>
<family>NEFF-WINGEIER</family>
<given>Trong Sang</given>
</name>
</informationRecipient>
</intendedRecipient>
</informationRecipient>
<component contextConductionInd="true">
<structuredBody>
<component>
<section>
<templateId root="2.16.756.5.30.1.1.10.3.12"/>
<templateId root="1.3.6.1.4.1.19376.1.9.1.2.2"/>
<id root="E945BE33-338C-4A5C-AD8F-C21B536E506F"/>
<code code="61357-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Medication pharmaceutical advice.brief"/>
<title>Conseils sur les médicaments</title>
<text>
<paragraph ID="refpdf">la patiente n’a pas pris le médicament car pas nécessaire, le Voltarène émulgel a fait son effet</paragraph>
</text>
<entry>
<observation classCode="OBS" moodCode="EVN">
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.3"/>
<templateId root="2.16.756.5.30.1.1.10.4.44"/>
<id root="A60EC70C-3089-47B2-84BC-41F0D26F6FF1"/>
<code xsi:type="CD" code="COMMENT" codeSystem="1.3.6.1.4.1.19376.1.9.2.1" codeSystemName="IHE Pharmaceutical Advice Status List"/>
<text xsi:type="ED">la patiente n’a pas pris le médicament car pas nécessaire, le Voltarène émulgel a fait son effet
<reference value="#refpdf"/>
</text>
<statusCode code="completed"/>
<effectiveTime value="20190215110000+0100"/>
<entryRelationship typeCode="REFR">
<substanceAdministration classCode="SBADM" moodCode="INT">
<templateId root="1.3.6.1.4.1.19376.1.9.1.3.10"/>
<templateId root="2.16.756.5.30.1.1.10.4.45"/>
<id root="45C6B4D4-19E7-4AE9-9809-37EC009DEAEC"/>
<code code="MTPItem" codeSystem="1.3.6.1.4.1.19376.1.9.2.2" codeSystemName="IHE Pharmacy Item Type List" displayName="Medication Treatment Plan Item"/>
<consumable>
<manufacturedProduct>
<manufacturedMaterial nullFlavor="NA"/>
</manufacturedProduct>
</consumable>
<reference typeCode="XCRPT">
<externalDocument>
<id root="45C6B4D4-19E7-4AE9-9809-37EC009DEAEC"/>
</externalDocument>
</reference>
</substanceAdministration>
</entryRelationship>
</observation>
</entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>
{
"response": {
"status": 400,
"data": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invalid",
"details": {
"coding": [
{
"code": "REGISTRY_ERROR"
}
],
"text": "Unexpected exception while processing the request"
}
}
]
}
},
"config": {
"method": "POST",
"url": "https://test.ahdis.ch/mag-pmp/fhir/",
"headers": {}
}
}
Log:
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.898 DEBUG [io-8080-exec-34] p.t.c.c.x.i.Iti41QueryPreparer: ITI-41 route: Iti41QueryPreparer processor
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.899 DEBUG [io-8080-exec-34] .t.c.c.x.i.Iti41QueryValidator: ITI-41 route: Iti41QueryValidator processor
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.914 DEBUG [io-8080-exec-34] .t.c.c.x.i.Iti41QueryConverter: ITI-41 route: Iti41QueryConverter processor
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.914 INFO [io-8080-exec-34] .c.auth.PmpAccessRightsService: Access to 'urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b' is permitted
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.915 INFO [io-8080-exec-34] .c.auth.PmpAccessRightsService: Access to 'urn:e-health-suisse:2015:policy-administration:UpdatePolicy' is permitted
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.915 INFO [io-8080-exec-34] c.l.PatientWriteOpLockRegistry: Acquiring patient write operation lock for 7a4ec59f-a024-4cfb-bc04-3339c53cb9ac
[2022-05-31 10:56:14] [info] 2022-05-31 10:56:14.915 DEBUG [io-8080-exec-34] t.p.p.ProvideDocumentProcessor: Route: ProvideDocumentProcessor
[2022-05-31 10:56:15] [info] 2022-05-31 10:56:15.009 DEBUG [io-8080-exec-34] c.c.x.i.Iti41ResponseConverter: ITI-41 route: Iti41ResponseConverter processor
[2022-05-31 10:56:15] [info] 2022-05-31 10:56:15.009 ERROR [io-8080-exec-34] c.c.x.i.Iti41ResponseConverter: Uncaught exception while processing ITI-41 transaction
[2022-05-31 10:56:15] [info] ch.qligier.hug.pmp.commons.errors.exceptions.GoToResponseCreationException: The CCE document is invalid
Current mapping:
CDA - Medication List document from PMP:
<author>
<templateId root="2.16.756.5.30.1.1.10.9.23"/>
<functionCode code="COMPOSER" codeSystem="2.16.840.1.113883.5.88" codeSystemName="Participation Function" displayName="composer software"/>
<time value="20220708080440+0000"/>
<assignedAuthor>
<id root="2.51.1.3" extension="7601002860123"/>
<assignedAuthoringDevice>
<manufacturerModelName>CARA's PMP</manufacturerModelName>
<softwareName>PMP CARA v0.1</softwareName>
</assignedAuthoringDevice>
</assignedAuthor>
</author>
FHIR - Transformed Medication List document:
Composition.author.reference -> "urn:uuid:7de6a015-efcb-45c6-8e80-2384972640be"
<entry>
<fullUrl value="urn:uuid:ac73e073-b101-4be0-864d-e0d2ae2a02d9"/>
<resource>
<Practitioner>
<identifier>
<system value="urn:oid:2.51.1.3"/>
<value value="7601002860123"/>
</identifier>
</Practitioner>
</resource>
</entry>
Change mapping, e.g.
<entry>
<fullUrl value="urn:uuid:ac73e073-b101-4be0-864d-e0d2ae2a02d9"/>
<resource>
<Device>
<deviceName>
<name value="CARA's PMP"/>
<type value="model-name"/>
</deviceName>
</Device>
</resource>
</entry>
siehe hl7ch/cda-fhir-maps#40
If I upload this MTP and PADV as HCP it works.
http://build.fhir.org/ig/ahdis/ch-emed-pmp/Bundle-1-3-MTPTemesta.json.html
http://build.fhir.org/ig/ahdis/ch-emed-pmp/Bundle-2-1-PADVTemesta.json.html
If I upload the same documents this way, it doesn't work:
MTP as Patient
PADV as HCP
error: The document '13bc2947-10c8-4e94-8dac-0629a0c5329f' is not valid: Unable to find an item entry digest.
see also https://test.ahdis.ch/eprik-cara-pmp/index.html#/transaction/8a32b5e4-48c3-48be-9bcc-e45508b13eda
@qligier: shouldn't this also work or is my expectation wrong?
Currently a query for a patient for the PMP registry returns success with an empty list if he has not been setup with an APPC document.
In a next version an error message XDSUnknownPatientId will be raised.
From the CARA integration guide: "Must support. The intake start and stop date (with or without time) is given by the first hl7:effectiveTime, with type IVL<TS.CH.TZ>. Boundaries are inclusive. The dates SHOULD be precise to the day (YYYYMMDD); there SHOULD be a good reason to be more precise than that."
The CARA guide does not define a minimum supported? Is there a minimum? Is year and/or year-month only supported? It is allowed in the FHIR specification - "dateTime | A date, date-time or partial date (e.g. just year or year + month)"?
We verify the signature of the SAML assertion we received during authentication using the applicable HIN certificate. We find the certificate in our local application trust store (Java Key Store) by the 'alias name' used when it was stored.
Each year we manually download the latest HIN test and production certificates and install them into our trust store.
The use of the alias name is not optimal as it must be manually configured into our system each time we apply the new certificates (a new alias name is used each time a certificate is added - so during the yearly maintenance cycle, the HIN certificates are added, but have a different alias name).
My question is... how to search the trust store to find the HIN certificate? I was thinking of using the 'Subject CN'. We would configure the certificate Subject-CN instead of the alias name and use that to locate the HIN certificate (ignoring those expired or not yet active). I did not think there was anything that could be 'reliably' used from the SAML assertion to identify the certificate used for signing (like the 'KeyInfo/X509Data/X509Certificate' since this was not mandatory, nor should be trusted anyway).
We just want to avoid any downtime (or manually configuration to get the system working again) when HIN performs its certificate maintenance.
What are other doing for solve this issue?
Reported from @CheriGey
After documents are exported to CARA, we noticed the patient name was changed to the Soarian patient name on the pdf on a subsequent import. We tested a bit further and have found the same happens with gender and date of birth.
We were expecting this section in the medication card. It is missing when the patient does not have medications.
For example: CHUV001 (Aegerter-Bischoff, BRUNO KAKOB)
The old medication card contains this section.
{
"title": "Liste de médicaments",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10160-0",
"display": "History of medication use"
}
]
},
"text": {
"status": "generated",
"div": "<div xmlns="http://www.w3.org/1999/xhtml\" id="narrative">See the PDF original representation"
}
}
@qligier FYI:
hl7ch/ch-emed#206: The medication list document would now need (additionally) the LOINC code for Composition.type.
CARA Implementation Guide: https://qligier.github.io/cara-emed-ig/
Some CDA-CH-EMED samples: https://github.com/qligier/cdachemed-samples
Endpoints
Hosts
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
https://test.ahdis.ch/eprik-proxy-cara/index.html#/transaction/35292bbe-b05a-4b5b-b6af-8f8705c68bac
"The document is not at the end of its medication chain(s) [PMP (6.4.2.5)]"
It's an MTP document, which I cannot delete. The Medication Card shows no medication.
@qligier Could you please have a look what the problem here might be?
Executed the validator against an MTP...
One of the warnings found was: "The display "Medication treatment plan.brief" is not a valid display for the code {http://loinc.org}77604-7 - should be one of ['Medication treatment plan.brief Document', 'Med tx plan.brief Doc'
Corrected the issue, and when running the validator on the new document we see "Does not match slice 'treatmentPlan' (discriminator: code.coding.where((system = 'http://loinc.org') and (code = '77604-7') and (display = 'Medication treatment plan.brief')).exists())"
Observed similar behavior with the PADV.
MedicaitonLIst fails PMP with the following:
"statusText": "OK",
"url": "https://test.ahdis.ch/mag-pmp/camel/xdsretrieve?uniqueId=urn:uuid:ff43d5ac-2223-4101-b63b-01cd931d6d3c&repositoryUniqueId=2.999.756.42.1",
"ok": false,
"name": "HttpErrorResponse",
"message": "Http failure response for https://test.ahdis.ch/mag-pmp/camel/xdsretrieve?uniqueId=urn:uuid:ff43d5ac-2223-4101-b63b-01cd931d6d3c&repositoryUniqueId=2.999.756.42.1: 400 OK",
"error": "There was an internal error while retrieving the document"
The assingedAuthor has a nuffFlavor for country, this could be the issue for the error afterwards:
Zürich 8005 Krankenstrasse 2 Müller Alexanderrg.husky.emed.ch.errors.InvalidEmedContentException: Schematron error: {[[Text@0x144338fb: content=[dtr1-1-BIN: there must be a nullFlavor, or content must be non-empty]]; 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:author/hl7:assignedAuthor/hl7:addr/hl7:country}
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validateAgainstSchematron(CdaChEmedValidator.java:300)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:265)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:239)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:206)
at ch.qligier.hug.pmp.emed.ondemand.OnDemandMedicationListAssembler.assemble(OnDemandMedicationListAssembler.java:120)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generateOnDemandMedicationListDocument(GenerateOdDocumentCoprocessor.java:120)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:131)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
2022-09-15 09:52:52.532 ERROR [io-8080-exec-10] nDemandMedicationListAssembler: Validation error of a generated PML
org.husky.emed.ch.errors.InvalidEmedContentException: Schematron error: {[[Text@0x144338fb: content=[dtr1-1-BIN: there must be a nullFlavor, or content must be non-empty]]; 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:author/hl7:assignedAuthor/hl7:addr/hl7:country}
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validateAgainstSchematron(CdaChEmedValidator.java:300)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:265)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:239)
at org.husky.emed.ch.cda.validation.CdaChEmedValidator.validate(CdaChEmedValidator.java:206)
at ch.qligier.hug.pmp.emed.ondemand.OnDemandMedicationListAssembler.assemble(OnDemandMedicationListAssembler.java:120)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generateOnDemandMedicationListDocument(GenerateOdDocumentCoprocessor.java:120)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:131)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
2022-09-15 09:52:52.532 ERROR [io-8080-exec-10] p.r.RetrieveDocumentsProcessor: There was an exception while retrieving a document
ch.qligier.hug.pmp.commons.errors.exceptions.InvalidDocumentException: The generation medication list is invalid
at ch.qligier.hug.pmp.emed.ondemand.OnDemandMedicationListAssembler.assemble(OnDemandMedicationListAssembler.java:124)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generateOnDemandMedicationListDocument(GenerateOdDocumentCoprocessor.java:120)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:131)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:108)
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:81)
at org.apache.camel.management.DefaultInstrumentationProcessor.process(DefaultInstrumentationProcessor.java:90)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:812)
Wrapped by: ch.qligier.hug.pmp.commons.errors.exceptions.PmpInternalException: The On-Demand Document generation has failed
at ch.qligier.hug.pmp.transactions.pmp.retrieve.coprocessors.GenerateOdDocumentCoprocessor.generateOnDemandMedicationListDocument(GenerateOdDocumentCoprocessor.java:122)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.dispatchDocumentRetrieval(RetrieveDocumentsProcessor.java:131)
at ch.qligier.hug.pmp.transactions.pmp.retrieve.RetrieveDocumentsProcessor.process(RetrieveDocumentsProcessor.java:92)
at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:108)
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:81)
at org.apache.camel.management.DefaultInstrumentationProcessor.process(DefaultInstrumentationProcessor.java:90)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.doRun(RedeliveryErrorHandler.java:812)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$RedeliveryTask.run(RedeliveryErrorHandler.java:720)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.