1

我在 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"));

有没有人遇到过这样的问题或可以提出任何解决方案?这两天我一直在苦苦挣扎...

4

0 回答 0