Search in sources :

Example 1 with DocumentReferenceToHipDocumentConverter

use of org.ehrbase.fhirbridge.ehr.converter.specific.hipdocument.DocumentReferenceToHipDocumentConverter in project fhir-bridge by ehrbase.

the class DocumentReferenceIT method executeMappingException.

@Override
public Exception executeMappingException(String resource) throws IOException {
    DocumentReference documentReference = (DocumentReference) testFileLoader.loadResource(resource);
    DocumentReferenceToHipDocumentConverter converter = new DocumentReferenceToHipDocumentConverter();
    return assertThrows(ConversionException.class, () -> converter.convert(documentReference));
}
Also used : DocumentReferenceToHipDocumentConverter(org.ehrbase.fhirbridge.ehr.converter.specific.hipdocument.DocumentReferenceToHipDocumentConverter) DocumentReference(org.hl7.fhir.r4.model.DocumentReference)

Example 2 with DocumentReferenceToHipDocumentConverter

use of org.ehrbase.fhirbridge.ehr.converter.specific.hipdocument.DocumentReferenceToHipDocumentConverter 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());
}
Also used : Diff(org.javers.core.diff.Diff) DocumentReferenceToHipDocumentConverter(org.ehrbase.fhirbridge.ehr.converter.specific.hipdocument.DocumentReferenceToHipDocumentConverter) HIPDocumentComposition(org.ehrbase.fhirbridge.ehr.opt.hipdocumentcomposition.HIPDocumentComposition) DocumentReference(org.hl7.fhir.r4.model.DocumentReference)

Aggregations

DocumentReferenceToHipDocumentConverter (org.ehrbase.fhirbridge.ehr.converter.specific.hipdocument.DocumentReferenceToHipDocumentConverter)2 DocumentReference (org.hl7.fhir.r4.model.DocumentReference)2 HIPDocumentComposition (org.ehrbase.fhirbridge.ehr.opt.hipdocumentcomposition.HIPDocumentComposition)1 Diff (org.javers.core.diff.Diff)1