Search in sources :

Example 1 with LaborbefundKategorieElement

use of org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement in project fhir-bridge by ehrbase.

the class DiagnosticReportLabCompositionConverter method convertCategory.

private List<LaborbefundKategorieElement> convertCategory(DiagnosticReport diagnosticReport) {
    // TODO alter template
    List<LaborbefundKategorieElement> laborbefundKategorieElementList = new ArrayList<>();
    for (CodeableConcept codeableConcept : diagnosticReport.getCategory()) {
        for (Coding coding : codeableConcept.getCoding()) {
            LaborbefundKategorieElement laborbefundKategorieElement = new LaborbefundKategorieElement();
            laborbefundKategorieElement.setValue(coding.getCode());
            laborbefundKategorieElementList.add(laborbefundKategorieElement);
        }
    }
    return laborbefundKategorieElementList;
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) LaborbefundKategorieElement(org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement) ArrayList(java.util.ArrayList) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 2 with LaborbefundKategorieElement

use of org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement in project fhir-bridge by ehrbase.

the class ObservationLabCompositionConverter method convertKategorieValue.

private void convertKategorieValue(CodeableConcept codeableConcept, GECCOLaborbefundComposition composition) {
    for (Coding coding : codeableConcept.getCoding()) {
        if (coding.getSystem().equals(CodeSystem.HL7_OBSERVATI0N_CATEGORY.getUrl())) {
            LaborbefundKategorieElement labortestKategorieElement = new LaborbefundKategorieElement();
            labortestKategorieElement.setValue(coding.getCode());
            composition.setKategorie(List.of(labortestKategorieElement));
        }
    }
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) LaborbefundKategorieElement(org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement)

Aggregations

LaborbefundKategorieElement (org.ehrbase.fhirbridge.ehr.opt.geccolaborbefundcomposition.definition.LaborbefundKategorieElement)2 Coding (org.hl7.fhir.r4.model.Coding)2 ArrayList (java.util.ArrayList)1 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)1