Search in sources :

Example 6 with Diff

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

the class KontaktGesundheitAbteilingIT method testMapping.

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

Example 7 with Diff

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

the class HistoryOfVaccinationIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Immunization immunization = (Immunization) super.testFileLoader.loadResource(resourcePath);
    ImpfstatusCompositionConverter impfstatusCompositionConverter = new ImpfstatusCompositionConverter();
    ImpfstatusComposition mappedImpfstatusComposition = impfstatusCompositionConverter.convert(immunization);
    Diff diff = compareCompositions(getJavers(), paragonPath, mappedImpfstatusComposition);
    assertEquals(0, diff.getChanges().size());
}
Also used : Immunization(org.hl7.fhir.r4.model.Immunization) Diff(org.javers.core.diff.Diff) ImpfstatusCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.impfstatus.ImpfstatusCompositionConverter) ImpfstatusComposition(org.ehrbase.fhirbridge.ehr.opt.impfstatuscomposition.ImpfstatusComposition)

Example 8 with Diff

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

the class MedicationStatementIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    MedicationStatement medicationStatement = (MedicationStatement) super.testFileLoader.loadResource(resourcePath);
    GECCOMedikationCompositionConverter geccoMedikationCompositionConverter = new GECCOMedikationCompositionConverter();
    GECCOMedikationComposition mapped = geccoMedikationCompositionConverter.convert(medicationStatement);
    Diff diff = compareCompositions(getJavers(), paragonPath, mapped);
    assertEquals(0, diff.getChanges().size());
}
Also used : Diff(org.javers.core.diff.Diff) GECCOMedikationCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.medication.GECCOMedikationCompositionConverter) GECCOMedikationComposition(org.ehrbase.fhirbridge.ehr.opt.geccomedikationcomposition.GECCOMedikationComposition) MedicationStatement(org.hl7.fhir.r4.model.MedicationStatement)

Example 9 with Diff

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

the class KnownExposureIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath);
    SarsCov2KnownExposureCompositionConverter compositionConverter = new SarsCov2KnownExposureCompositionConverter();
    SARSCoV2ExpositionComposition mapped = compositionConverter.convert(observation);
    Diff diff = compareCompositions(getJavers(), paragonPath, mapped);
    assertEquals(0, diff.getChanges().size());
}
Also used : SarsCov2KnownExposureCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.knownexposure.SarsCov2KnownExposureCompositionConverter) SARSCoV2ExpositionComposition(org.ehrbase.fhirbridge.ehr.opt.sarscov2expositioncomposition.SARSCoV2ExpositionComposition) Diff(org.javers.core.diff.Diff) Observation(org.hl7.fhir.r4.model.Observation)

Example 10 with Diff

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

the class PCRIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath);
    PCRCompositionConverter pcrCompositionConverter = new PCRCompositionConverter();
    GECCOVirologischerBefundComposition mapped = pcrCompositionConverter.convert(observation);
    Diff diff = compareCompositions(getJavers(), paragonPath, mapped);
    assertEquals(0, diff.getChanges().size());
}
Also used : GECCOVirologischerBefundComposition(org.ehrbase.fhirbridge.ehr.opt.geccovirologischerbefundcomposition.GECCOVirologischerBefundComposition) Diff(org.javers.core.diff.Diff) Observation(org.hl7.fhir.r4.model.Observation) PCRCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.geccovirologischerbefund.PCRCompositionConverter)

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