Search in sources :

Example 51 with Diff

use of org.javers.core.diff.Diff in project fhir-bridge by ehrbase.

the class DnrIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Consent consent = (Consent) super.testFileLoader.loadResource(resourcePath);
    DnrAnordnungCompositionConverter dnrAnordnungCompositionConverter = new DnrAnordnungCompositionConverter();
    DNRAnordnungComposition mapped = dnrAnordnungCompositionConverter.convert(consent);
    Diff diff = compareCompositions(getJaversIgnoreStartTime(), paragonPath, mapped);
    assertEquals(0, diff.getChanges().size());
}
Also used : DNRAnordnungComposition(org.ehrbase.fhirbridge.ehr.opt.dnranordnungcomposition.DNRAnordnungComposition) Consent(org.hl7.fhir.r4.model.Consent) DnrAnordnungCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.dnranordnung.DnrAnordnungCompositionConverter) Diff(org.javers.core.diff.Diff)

Example 52 with Diff

use of org.javers.core.diff.Diff in project fhir-bridge by ehrbase.

the class DiagnosticReportLabIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    DiagnosticReport resource = (DiagnosticReport) super.testFileLoader.loadResource(resourcePath);
    DiagnosticReportLabCompositionConverter compositionConverter = new DiagnosticReportLabCompositionConverter();
    GECCOLaborbefundComposition geccoLaborbefundComposition = compositionConverter.convert(resource);
    Diff diff = compareCompositions(getJavers(), paragonPath, geccoLaborbefundComposition);
    assertEquals(diff.getChanges().size(), 0);
}
Also used : Diff(org.javers.core.diff.Diff) GECCOLaborbefundComposition(org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.GECCOLaborbefundComposition) DiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport) DiagnosticReportLabCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.diagnosticreportlab.DiagnosticReportLabCompositionConverter)

Example 53 with Diff

use of org.javers.core.diff.Diff in project fhir-bridge by ehrbase.

the class RadiologyReportIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    DiagnosticReport diagnosticReport = (DiagnosticReport) super.testFileLoader.loadResource(resourcePath);
    RadiologischerBefundCompositionConverter radiologischerBefundConverter = new RadiologischerBefundCompositionConverter();
    GECCORadiologischerBefundComposition mappedGeccoRadiologischerBefundComposition = radiologischerBefundConverter.convert(diagnosticReport);
    Diff diff = compareCompositions(getJavers(), paragonPath, mappedGeccoRadiologischerBefundComposition);
    assertEquals(diff.getChanges().size(), 0);
}
Also used : GECCORadiologischerBefundComposition(org.ehrbase.fhirbridge.ehr.opt.geccoradiologischerbefundcomposition.GECCORadiologischerBefundComposition) Diff(org.javers.core.diff.Diff) DiagnosticReport(org.hl7.fhir.r4.model.DiagnosticReport) RadiologischerBefundCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.radiologischerbefund.RadiologischerBefundCompositionConverter)

Example 54 with Diff

use of org.javers.core.diff.Diff 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)

Example 55 with Diff

use of org.javers.core.diff.Diff in project fhir-bridge by ehrbase.

the class KontaktGesundheitEinrichtungIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Encounter encounter = (Encounter) super.testFileLoader.loadResource(resourcePath);
    StationaererVersorgungsfallCompositionConverter stationaererVersorgungsfallCompositionConverter = new StationaererVersorgungsfallCompositionConverter();
    StationaererVersorgungsfallComposition mapped = stationaererVersorgungsfallCompositionConverter.convert(encounter);
    Diff diff = compareCompositions(getJavers(), paragonPath, mapped);
    assertEquals(0, diff.getChanges().size());
}
Also used : StationaererVersorgungsfallCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.stationaererversorgungsfall.StationaererVersorgungsfallCompositionConverter) Diff(org.javers.core.diff.Diff) StationaererVersorgungsfallComposition(org.ehrbase.fhirbridge.ehr.opt.stationaererversorgungsfallcomposition.StationaererVersorgungsfallComposition) Encounter(org.hl7.fhir.r4.model.Encounter)

Aggregations

Diff (org.javers.core.diff.Diff)57 Observation (org.hl7.fhir.r4.model.Observation)23 Javers (org.javers.core.Javers)10 Test (org.junit.Test)5 Bundle (org.hl7.fhir.r4.model.Bundle)4 DualProtocolSaajSoapMessageFactory (ca.bc.gov.open.pcss.civil.comparison.config.DualProtocolSaajSoapMessageFactory)2 List (java.util.List)2 UsernamePasswordCredentials (org.apache.http.auth.UsernamePasswordCredentials)2 VirologischerBefundCompositionConverter (org.ehrbase.fhirbridge.ehr.converter.specific.virologischerbefund.VirologischerBefundCompositionConverter)2 GECCOPersonendatenComposition (org.ehrbase.fhirbridge.ehr.opt.geccopersonendatencomposition.GECCOPersonendatenComposition)2 VirologischerBefundComposition (org.ehrbase.fhirbridge.ehr.opt.virologischerbefundcomposition.VirologischerBefundComposition)2 BefundObservation (org.ehrbase.fhirbridge.ehr.opt.virologischerbefundcomposition.definition.BefundObservation)2 VirologischerBefundConverter (org.ehrbase.fhirbridge.fhir.bundle.converter.VirologischerBefundConverter)2 Condition (org.hl7.fhir.r4.model.Condition)2 DiagnosticReport (org.hl7.fhir.r4.model.DiagnosticReport)2 ValueChange (org.javers.core.diff.changetype.ValueChange)2 WebServiceSenderWithAuth (ca.bc.gov.open.pcss.civil.comparison.config.WebServiceSenderWithAuth)1 ca.bc.gov.open.pcss.three (ca.bc.gov.open.pcss.three)1 YesNoType (ca.bc.gov.open.pcss.two.YesNoType)1 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1