Hello,
I'm using MDHT and running into an issue where my application can't parse a ResultOrganizer with a SpecimenCollectionProcedure.
For example, when this is parsed:
<organizer>
<templateId root="2.16.840.1.113883.10.20.22.4.1" extension="2015-08-01"/>
<templateId root="2.16.840.1.113883.10.20.22.4.1"/>
...
<component>
<procedure classCode="PROC" moodCode="EVN">
<templateId root="2.16.840.1.113883.10.20.22.4.415" extension="2018-09-01"/>
...
The model I end up with has an organizer with a component, but component.procedure is null.
When I remove the templateId, I end up with a generic component.procedure, so thinking this had something to do specifically with this templateId, I evaluated this in org.eclipse.mdht.uml.cda.internal.resource.CDAXSITypeProvider:
this.classes.get("2.16.840.1.113883.10.20.22.4.415v2018-09-01")
Which printed:
org.eclipse.emf.ecore.impl.EClassImpl@1d2b49b2 (name: SpecimenConditionObservation) (instanceClassName: null) (abstract: false, interface: false)
I'm not too familiar with how MDHT works under the hood, but I'm guessing it's resolving to null because it's trying to parse a procedure as an observation.
Looking at the console.ecore file here:
I see that they both reference the same templateId:
<eClassifiers xsi:type="ecore:EClass" name="
SpecimenConditionObservation" eSuperTypes="../../org.eclipse.mdht.uml.cda/model/cda.ecore#//Observation">
<eAnnotations source="
http://www.openhealthtools.org/mdht/uml/cda/annotation">
<details key="constraints.validation.error" value="SpecimenConditionObservationTemplateId SpecimenConditionObservationCode SpecimenConditionObservationCodeP SpecimenConditionObservationClassCode SpecimenConditionObservationMoodCode SpecimenConditionObservationValue"/>
<details key="templateId.root" value="
2.16.840.1.113883.10.20.22.4.415"/>
<details key="templateId.extension" value="
2018-09-01"/>
<eClassifiers xsi:type="ecore:EClass" name="
SpecimenCollectionProcedure" eSuperTypes="../../org.eclipse.mdht.uml.cda/model/cda.ecore#//Procedure">
<eAnnotations source="
http://www.openhealthtools.org/mdht/uml/cda/annotation">
<details key="constraints.validation.error" value="SpecimenCollectionProcedureTemplateId SpecimenCollectionProcedureCode SpecimenCollectionProcedureCodeP SpecimenCollectionProcedureText SpecimenCollectionProcedureTargetSiteCode SpecimenCollectionProcedureTargetSiteCodeP SpecimenCollectionProcedureSpecimenConditionObservation"/>
<details key="templateId.root" value="
2.16.840.1.113883.10.20.22.4.415"/>
<details key="templateId.extension" value="
2018-09-01"/>
SpecimenConditionObservation should have a templateId of "2.16.840.1.113883.10.20.22.4.421:2018-06-12".
SpecimenCollectionProcedure should be "2.16.840.1.113883.10.20.22.4.415:2018-09-01".
See this page for reference:
Is it possible to have this fixed?
In the meantime, is there a workaround, like can I set something on one of the MDHT factories or packages so that when it sees "2.16.840.1.113883.10.20.22.4.415" it generates a procedure and when it sees "2.16.840.1.113883.10.20.22.4.421" it generates an observation?