我在pom.xml中包含了MDHT
<dependency>
<groupId>org.openehealth.ipf.oht.mdht</groupId>
<artifactId>ipf-oht-mdht-uml-cda-ccd</artifactId>
<version>1.2.0.201212201425</version>
</dependency>
我在资源中创建了一个方法,如下所示,我想加载患者个人资料信息
@GetMapping("/patients/profile/{id}")
@Timed
public ResponseEntity<PatientProfileDTO> getPatientProfile(@PathVariable Long id) {
try {
PatientProfileDTO patientProfileDTO = new PatientProfileDTO();
CDAUtil.loadPackages();
ContinuityOfCareDocument ccDocument = (ContinuityOfCareDocument) CDAUtil.load(new FileInputStream("patient_ccd.xml"));
//set patientProfileDTO here by reading patient_ccd.xml
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(patientProfileDTO));
} catch (Exception e) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "Error", "An exception occured while reading patient profile")).body(null);
}
}
我在org.openhealthtools.mdht.uml.cda.impl.ClinicalDocumentImpl cannot be cast to org.openhealthtools.mdht.uml.cda.ccd.ContinuityOfCareDocument
ContinuityOfCareDocument ccDocument = (ContinuityOfCareDocument) CDAUtil.load(new FileInputStream("patient_ccd.xml"));
有没有人遇到过这样的问题或者可以提出任何解决方案?我已经挣扎了两天......