Search in sources :

Example 1 with SOFAComposition

use of org.ehrbase.fhirbridge.ehr.opt.sofacomposition.SOFAComposition in project fhir-bridge by ehrbase.

the class SofaScoreCompositionConverter method convertInternal.

@Override
public SOFAComposition convertInternal(@NonNull Observation observation) {
    SOFAComposition result = new SOFAComposition();
    result.setKategorie(convertCategory(observation));
    result.setSofaScore(sofaScoreObservationConverter.convert(observation));
    return result;
}
Also used : SOFAComposition(org.ehrbase.fhirbridge.ehr.opt.sofacomposition.SOFAComposition)

Example 2 with SOFAComposition

use of org.ehrbase.fhirbridge.ehr.opt.sofacomposition.SOFAComposition in project fhir-bridge by ehrbase.

the class SofaScoreIT method testMapping.

@Override
public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Observation observation = (Observation) super.testFileLoader.loadResource(resourcePath);
    SofaScoreCompositionConverter converter = new SofaScoreCompositionConverter();
    SOFAComposition composition = converter.convert(observation);
    Diff diff = compareCompositions(getJavers(), paragonPath, composition);
    assertEquals(0, diff.getChanges().size());
}
Also used : Diff(org.javers.core.diff.Diff) SofaScoreObservation(org.ehrbase.fhirbridge.ehr.opt.sofacomposition.definition.SofaScoreObservation) Observation(org.hl7.fhir.r4.model.Observation) SofaScoreCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.sofascore.SofaScoreCompositionConverter) SOFAComposition(org.ehrbase.fhirbridge.ehr.opt.sofacomposition.SOFAComposition)

Aggregations

SOFAComposition (org.ehrbase.fhirbridge.ehr.opt.sofacomposition.SOFAComposition)2 SofaScoreCompositionConverter (org.ehrbase.fhirbridge.ehr.converter.specific.sofascore.SofaScoreCompositionConverter)1 SofaScoreObservation (org.ehrbase.fhirbridge.ehr.opt.sofacomposition.definition.SofaScoreObservation)1 Observation (org.hl7.fhir.r4.model.Observation)1 Diff (org.javers.core.diff.Diff)1