JHipster с библиотекой MDHT
Я включил MDHT в pom.xml
<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"));
Кто-нибудь сталкивался с такой проблемой или может предложить какое-нибудь решение? Я боролся в течение двух дней...