use of org.ehrbase.fhirbridge.ehr.opt.hipdocumentcomposition.HIPDocumentComposition in project fhir-bridge by ehrbase.
the class DocumentReferenceToHipDocumentConverter method convertInternal.
@Override
protected HIPDocumentComposition convertInternal(DocumentReference documentReference) {
HIPDocumentComposition composition = new HIPDocumentComposition();
composition.setStartTimeValue(getStartTime(documentReference));
getMetadata(documentReference).ifPresent(composition::setHipMetadata);
composition.setMediendatei(getMultimedia(documentReference));
return composition;
}
use of org.ehrbase.fhirbridge.ehr.opt.hipdocumentcomposition.HIPDocumentComposition in project fhir-bridge by ehrbase.
the class DocumentReferenceIT method testMapping.
@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
DocumentReference documentReference = (DocumentReference) super.testFileLoader.loadResource(resourcePath);
DocumentReferenceToHipDocumentConverter converter = new DocumentReferenceToHipDocumentConverter();
HIPDocumentComposition result = converter.convert(documentReference);
Diff diff = compareCompositions(getJavers(), paragonPath, result);
assertEquals(0, diff.getChanges().size());
}
Aggregations