Closed JiahaoLi closed 7 years ago
try ConsolPackage.eInstance.getContinuityOfCareDocument() instead i am not sure getting the instance eClass triggers the load
htank
sean
On May 18, 2017, at 1:05 PM, JiahaoLi notifications@github.com wrote:
My project is using the run time library to implement CCDA R1 and R2 validation. It works when servers in Spring MVC project. But for some reason the EMF package registry is not getting loaded properly and therefore it cannot deserialize as a Consol CCD document when try to servers in Sprint Boot project.
Mu2consolPackage.eINSTANCE.unload(); ConsolPackage.eINSTANCE.eClass(); CDAUtil.load(in, result);
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mdht/mdht-models/issues/111, or mute the thread https://github.com/notifications/unsubscribe-auth/AFGeFzJPTpgazogHWkotH4UWqU7SU60mks5r7HpjgaJpZM4NfiDj.
@swmuir Thank you for your quick response. I tried the solution you shared, however, i still get the same issue. Here is the code:
XPathIndexer xpathIndexer = new XPathIndexer();
ValidationResult result = new ValidationResult();`
try {
processParseXMLDocument(xpathIndexer, ccdaDocument);
InputStream ccdaDocumentStream = new ByteArrayInputStream(ccdaDocument.getBytes());
log.info("Using validation criteria: " + ValidationCriteria.C_CDA_IG_ONLY);
Mu2consolPackage.eINSTANCE.unload();
// ConsolPackage.eINSTANCE.eClass();
ConsolPackage.eINSTANCE.getContinuityOfCareDocument();
CDAUtil.load(ccdaDocumentStream, result);
} catch (Exception e) {
log.error(e.getMessage(), e);
}
return analysisValidationResults(xpathIndexer, result);
}
Here is the error message: java.lang.UnsupportedOperationException: Unknown type ([vocab, ActClinicalDocument, DOCCLIN]) at org.eclipse.mdht.uml.cda.operations.ClinicalDocumentOperations.validateClassCode(ClinicalDocumentOperations.java:133) ~[org.eclipse.mdht.uml.cda-3.0.0.201703230502.jar:na] at org.eclipse.mdht.uml.cda.impl.ClinicalDocumentImpl.validateClassCode(ClinicalDocumentImpl.java:1659) ~[org.eclipse.mdht.uml.cda-3.0.0.201703230502.jar:na]
Thanks.
That is defined in org.eclipse.mdht.uml.hl7.vocab so make sure the that jar has been deployed
@swmuir Yes, i add all required latest libraries, here is dependencies list:
Thanks.
@swmuir Hi swmuir, After i changed packaging from jar to war and use tomcat to deploy instead of spring boot embedded container. It works!
Thanks.
My project is using the run time library to implement CCDA R1 and R2 validation. It works when servers in Spring MVC project. But for some reason the EMF package registry is not getting loaded properly and therefore it cannot deserialize as a Consol CCD document when try to servers in Sprint Boot project.
Mu2consolPackage.eINSTANCE.unload();
ConsolPackage.eINSTANCE.eClass();
CDAUtil.load(in, result);