MDHT in Transformer Step: Wrong CCD doc type when XML loaded with JavaScript?

vendredi 3 octobre 2014

I've been successfully using the following to load the sample CCD XML doc at http://ift.tt/1uIdq4M in a Mirth Connect JavaScript Transformer Step:




Code:



var doc = org.openhealthtools.mdht.uml.cda.util.CDAUtil.load(new java.io.ByteArrayInputStream(messageObject.getRawData().getBytes("UTF-8")));


I can then do things like:




Code:



var docPatientRole = doc.getRecordTargets().get(0).getPatientRole();

var docPatient = docPatientRole.getPatient();

channelMap.put('patientDateOfBirth', docPatient.getBirthTime().getValue());



However, when I try grab the Problem section via the following, I get an error.




Code:



var problemConcerns = doc.getProblemSection().getProblemConcerns();


The error reads:




Code:



TypeError: Cannot find function getProblemSection in object org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl@1c543715 (nullFlavor: <unset>, classCode: <unset>, moodCode: <unset>).


In looking at the MDHT source code I see that the getProblemSection method is not in org.openhealthtools.mdht.uml.cda.ClinicalDocument, but it is in org.openhealthtools.mdht.uml.cda.ccd.ClinicalDocument. I then went looking for a CDAUtil class that is namespaced by ...cda.ccd... and cannot find one.



So, how do I load the properly namespaced ClinicalDocument object so that I can access its methods?





MDHT in Transformer Step: Wrong CCD doc type when XML loaded with JavaScript?

0 commentaires:

Enregistrer un commentaire