Search in sources :

Example 1 with GECCODiagnoseComposition

use of org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.GECCODiagnoseComposition in project fhir-bridge by ehrbase.

the class GECCODiagnoseCompositionConverter method convertInternal.

@Override
public GECCODiagnoseComposition convertInternal(@NonNull Condition resource) {
    GECCODiagnoseComposition composition = new GECCODiagnoseComposition();
    Optional<VorliegendeDiagnoseEvaluation> vorliegendeDiagnose = getVorliegendeDiagnose(resource);
    if (resource.getVerificationStatus().isEmpty()) {
        composition.setUnbekannteDiagnose(new UnbekannteDiagnoseEvaluationConverter().convert(resource));
    } else {
        mapVerficationStatus(resource, vorliegendeDiagnose, composition);
    }
    mapCategoryCoding(resource, composition);
    return composition;
}
Also used : GECCODiagnoseComposition(org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.GECCODiagnoseComposition) VorliegendeDiagnoseEvaluation(org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.VorliegendeDiagnoseEvaluation)

Example 2 with GECCODiagnoseComposition

use of org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.GECCODiagnoseComposition in project fhir-bridge by ehrbase.

the class GECCODiagnoseIT method testMapping.

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

Aggregations

GECCODiagnoseComposition (org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.GECCODiagnoseComposition)2 GECCODiagnoseCompositionConverter (org.ehrbase.fhirbridge.ehr.converter.specific.geccodiagnose.GECCODiagnoseCompositionConverter)1 VorliegendeDiagnoseEvaluation (org.ehrbase.fhirbridge.ehr.opt.geccodiagnosecomposition.definition.VorliegendeDiagnoseEvaluation)1 Condition (org.hl7.fhir.r4.model.Condition)1 Diff (org.javers.core.diff.Diff)1