use of org.hl7.fhir.r4.model.Composition in project fhir-bridge by ehrbase.
the class VirologischerBefundCompositionConverter method convertInternal.
@Override
public VirologischerBefundComposition convertInternal(@NonNull Observation resource) {
VirologischerBefundComposition composition = new VirologischerBefundComposition();
VirologischerBefundBundle virologischerBefundBundle = new VirologischerBefundBundle(resource);
Observation observation = virologischerBefundBundle.getVirologischerBefund();
DiagnosticReport diagnosticReport = virologischerBefundBundle.getDiagnosticReport();
observation.setSpecimenTarget(virologischerBefundBundle.getSpecimen());
mapStatus(composition, diagnosticReport);
mapFallIdentifikation(diagnosticReport).ifPresent(composition::setFallidentifikation);
composition.setBefund(new VirologischerBefundObservationConverter().convert(observation));
return composition;
}
use of org.hl7.fhir.r4.model.Composition 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());
}
use of org.hl7.fhir.r4.model.Composition in project fhir-bridge by ehrbase.
the class BodyWeightCompositionConverter method mapKategorie.
private void mapKategorie(KoerpergewichtComposition composition, Observation resource) {
List<KoerpergewichtKategorieElement> list = new ArrayList<>();
for (CodeableConcept category : resource.getCategory()) {
for (Coding coding : category.getCoding()) {
KoerpergewichtKategorieElement koerpergewichtTestKategorieElement = new KoerpergewichtKategorieElement();
koerpergewichtTestKategorieElement.setValue(coding.getCode());
list.add(koerpergewichtTestKategorieElement);
}
}
composition.setKategorie(list);
}
use of org.hl7.fhir.r4.model.Composition in project fhir-bridge by ehrbase.
the class ClinicalFrailtyScaleScoreCompositionConverter method mapKategorie.
private void mapKategorie(KlinischeFrailtySkalaComposition composition, Observation resource) {
List<KlinischeFrailtySkalaKategorieElement> list = new ArrayList<>();
for (CodeableConcept category : resource.getCategory()) {
for (Coding coding : category.getCoding()) {
KlinischeFrailtySkalaKategorieElement klinischeFrailtySkalaKategorieElement = new KlinischeFrailtySkalaKategorieElement();
klinischeFrailtySkalaKategorieElement.setValue(coding.getCode());
list.add(klinischeFrailtySkalaKategorieElement);
}
}
composition.setKategorie(list);
}
use of org.hl7.fhir.r4.model.Composition in project fhir-bridge by ehrbase.
the class BodyHeightCompositionConverter method mapKategorie.
private void mapKategorie(KoerpergroesseComposition composition, Observation resource) {
List<KoerpergroesseKategorieElement> list = new ArrayList<>();
for (CodeableConcept category : resource.getCategory()) {
for (Coding coding : category.getCoding()) {
KoerpergroesseKategorieElement koerpergroesseKategorieElement = new KoerpergroesseKategorieElement();
koerpergroesseKategorieElement.setValue(coding.getCode());
list.add(koerpergroesseKategorieElement);
}
}
composition.setKategorie(list);
}
Aggregations