Search in sources :

Example 36 with PROCEDURE

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_procedure_example_implant.

@Test
public void test_procedure_example_implant() throws FileNotFoundException, IOException, Exception {
    System.out.println("procedure-example-implant.ttl");
    new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\procedure-example-implant.ttl"));
}
Also used : Turtle(org.hl7.fhir.dstu3.utils.formats.Turtle) Test(org.junit.jupiter.api.Test)

Example 37 with PROCEDURE

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project fhir-bridge by ehrbase.

the class ProzedurActionConverter method convertUsedCode.

private List<MedizingeraetCluster> convertUsedCode(Procedure procedure) {
    List<MedizingeraetCluster> medizingeraetClusters = new ArrayList<>();
    for (CodeableConcept codeableConcept : procedure.getUsedCode()) {
        for (Coding coding : codeableConcept.getCoding()) {
            MedizingeraetCluster medizingeraetCluster = new MedizingeraetCluster();
            dvCodedTextParser.parseFHIRCoding(coding).ifPresent(medizingeraetCluster::setGeraetename);
            medizingeraetClusters.add(medizingeraetCluster);
        }
    }
    return medizingeraetClusters;
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) ArrayList(java.util.ArrayList) MedizingeraetCluster(org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.MedizingeraetCluster) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 38 with PROCEDURE

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project fhir-bridge by ehrbase.

the class TherapyCompositionConverter method convertCategory.

private List<GeccoProzedurKategorieElement> convertCategory(Procedure procedure) {
    List<GeccoProzedurKategorieElement> geccoProzedurKategorieElements = new ArrayList<>();
    for (Coding coding : procedure.getCategory().getCoding()) {
        GeccoProzedurKategorieElement geccoProzedurKategorieElement = new GeccoProzedurKategorieElement();
        DvCodedTextParser.getInstance().parseFHIRCoding(coding).ifPresent(geccoProzedurKategorieElement::setValue);
        geccoProzedurKategorieElements.add(geccoProzedurKategorieElement);
    }
    return geccoProzedurKategorieElements;
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) ArrayList(java.util.ArrayList) GeccoProzedurKategorieElement(org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.definition.GeccoProzedurKategorieElement)

Example 39 with PROCEDURE

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project fhir-bridge by ehrbase.

the class ProcedureActionConverter method mapBodysite.

public void mapBodysite(ProzedurAction action, Procedure resource) {
    for (CodeableConcept loop : resource.getBodySite()) {
        DetailsZurKoerperstelleCluster anatomicalLocationCluster = new DetailsZurKoerperstelleCluster();
        getBodysiteCoding(loop).ifPresent(anatomicalLocationCluster::setNameDerKoerperstelleValue);
        action.setDetailsZurKoerperstelle(new ArrayList<>());
        action.getDetailsZurKoerperstelle().add(anatomicalLocationCluster);
    }
}
Also used : DetailsZurKoerperstelleCluster(org.ehrbase.fhirbridge.ehr.opt.prozedurcomposition.definition.DetailsZurKoerperstelleCluster) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept)

Example 40 with PROCEDURE

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.PROCEDURE in project fhir-bridge by ehrbase.

the class GenericTherapyIT method testMapping.

public void testMapping(String resourcePath, String paragonPath) throws IOException {
    Procedure procedure = (Procedure) super.testFileLoader.loadResource(resourcePath);
    TherapyCompositionConverter therapyCompositionConverter = new TherapyCompositionConverter();
    GECCOProzedurComposition mappedProzedurComposition = therapyCompositionConverter.convert(procedure);
    Diff diff = compareCompositions(getJavers(), paragonPath, mappedProzedurComposition);
    assertEquals(diff.getChanges().size(), 0);
}
Also used : GECCOProzedurComposition(org.ehrbase.fhirbridge.ehr.opt.geccoprozedurcomposition.GECCOProzedurComposition) TherapyCompositionConverter(org.ehrbase.fhirbridge.ehr.converter.specific.therapy.TherapyCompositionConverter) Diff(org.javers.core.diff.Diff) Procedure(org.hl7.fhir.r4.model.Procedure)

Aggregations

Procedure (org.hl7.fhir.r4.model.Procedure)22 Test (org.junit.jupiter.api.Test)19 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)14 Coding (org.hl7.fhir.r4.model.Coding)14 ArrayList (java.util.ArrayList)12 Bundle (org.hl7.fhir.r4.model.Bundle)11 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)11 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)9 Reference (org.hl7.fhir.r4.model.Reference)9 ExplanationOfBenefit (org.hl7.fhir.dstu3.model.ExplanationOfBenefit)8 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)8 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)8 CCWProcedure (gov.cms.bfd.server.war.commons.CCWProcedure)7 CodeableConcept (org.hl7.fhir.dstu3.model.CodeableConcept)7 Coding (org.hl7.fhir.dstu3.model.Coding)7 Date (java.util.Date)6 List (java.util.List)6 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)6 Diagnosis (gov.cms.bfd.server.war.commons.Diagnosis)5 Collectors (java.util.stream.Collectors)5