Search in sources :

Example 41 with CarePlan

use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_careplan_example_f203_sepsis.

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

Example 42 with CarePlan

use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCarePlanCarePlanActivityDetailComponent.

protected void composeCarePlanCarePlanActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "detail", name, element, index);
    if (element.hasKindElement())
        composeEnum(t, "CarePlan", "kind", element.getKindElement(), -1);
    for (int i = 0; i < element.getInstantiatesCanonical().size(); i++) composeCanonical(t, "CarePlan", "instantiatesCanonical", element.getInstantiatesCanonical().get(i), i);
    for (int i = 0; i < element.getInstantiatesUri().size(); i++) composeUri(t, "CarePlan", "instantiatesUri", element.getInstantiatesUri().get(i), i);
    if (element.hasCode())
        composeCodeableConcept(t, "CarePlan", "code", element.getCode(), -1);
    for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "CarePlan", "reasonCode", element.getReasonCode().get(i), i);
    for (int i = 0; i < element.getReasonReference().size(); i++) composeReference(t, "CarePlan", "reasonReference", element.getReasonReference().get(i), i);
    for (int i = 0; i < element.getGoal().size(); i++) composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
    if (element.hasStatusReason())
        composeCodeableConcept(t, "CarePlan", "statusReason", element.getStatusReason(), -1);
    if (element.hasDoNotPerformElement())
        composeBoolean(t, "CarePlan", "doNotPerform", element.getDoNotPerformElement(), -1);
    if (element.hasScheduled())
        composeType(t, "CarePlan", "scheduled", element.getScheduled(), -1);
    if (element.hasLocation())
        composeReference(t, "CarePlan", "location", element.getLocation(), -1);
    for (int i = 0; i < element.getPerformer().size(); i++) composeReference(t, "CarePlan", "performer", element.getPerformer().get(i), i);
    if (element.hasProduct())
        composeType(t, "CarePlan", "product", element.getProduct(), -1);
    if (element.hasDailyAmount())
        composeQuantity(t, "CarePlan", "dailyAmount", element.getDailyAmount(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "CarePlan", "quantity", element.getQuantity(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 43 with CarePlan

use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCarePlanCarePlanActivityDetailComponent.

protected void composeCarePlanCarePlanActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "detail", name, element, index);
    if (element.hasCategory())
        composeCodeableConcept(t, "CarePlan", "category", element.getCategory(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "CarePlan", "code", element.getCode(), -1);
    for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "CarePlan", "reasonCode", element.getReasonCode().get(i), i);
    for (int i = 0; i < element.getReasonReference().size(); i++) composeReference(t, "CarePlan", "reasonReference", element.getReasonReference().get(i), i);
    for (int i = 0; i < element.getGoal().size(); i++) composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
    if (element.hasStatusReason())
        composeCodeableConcept(t, "CarePlan", "statusReason", element.getStatusReason(), -1);
    if (element.hasProhibitedElement())
        composeBoolean(t, "CarePlan", "prohibited", element.getProhibitedElement(), -1);
    if (element.hasScheduled())
        composeType(t, "CarePlan", "scheduled", element.getScheduled(), -1);
    if (element.hasLocation())
        composeReference(t, "CarePlan", "location", element.getLocation(), -1);
    for (int i = 0; i < element.getPerformer().size(); i++) composeReference(t, "CarePlan", "performer", element.getPerformer().get(i), i);
    if (element.hasProduct())
        composeType(t, "CarePlan", "product", element.getProduct(), -1);
    if (element.hasDailyAmount())
        composeQuantity(t, "CarePlan", "dailyAmount", element.getDailyAmount(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "CarePlan", "quantity", element.getQuantity(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 44 with CarePlan

use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCarePlanCarePlanRelatedPlanComponent.

protected void composeCarePlanCarePlanRelatedPlanComponent(Complex parent, String parentType, String name, CarePlan.CarePlanRelatedPlanComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "relatedPlan", name, element, index);
    if (element.hasCodeElement())
        composeEnum(t, "CarePlan", "code", element.getCodeElement(), -1);
    if (element.hasPlan())
        composeReference(t, "CarePlan", "plan", element.getPlan(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 45 with CarePlan

use of org.hl7.fhir.r4.model.CarePlan in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCarePlanCarePlanActivityDetailComponent.

protected void composeCarePlanCarePlanActivityDetailComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityDetailComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "detail", name, element, index);
    if (element.hasCategory())
        composeCodeableConcept(t, "CarePlan", "category", element.getCategory(), -1);
    if (element.hasDefinition())
        composeReference(t, "CarePlan", "definition", element.getDefinition(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "CarePlan", "code", element.getCode(), -1);
    for (int i = 0; i < element.getReasonCode().size(); i++) composeCodeableConcept(t, "CarePlan", "reasonCode", element.getReasonCode().get(i), i);
    for (int i = 0; i < element.getReasonReference().size(); i++) composeReference(t, "CarePlan", "reasonReference", element.getReasonReference().get(i), i);
    for (int i = 0; i < element.getGoal().size(); i++) composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
    if (element.hasStatusReasonElement())
        composeString(t, "CarePlan", "statusReason", element.getStatusReasonElement(), -1);
    if (element.hasProhibitedElement())
        composeBoolean(t, "CarePlan", "prohibited", element.getProhibitedElement(), -1);
    if (element.hasScheduled())
        composeType(t, "CarePlan", "scheduled", element.getScheduled(), -1);
    if (element.hasLocation())
        composeReference(t, "CarePlan", "location", element.getLocation(), -1);
    for (int i = 0; i < element.getPerformer().size(); i++) composeReference(t, "CarePlan", "performer", element.getPerformer().get(i), i);
    if (element.hasProduct())
        composeType(t, "CarePlan", "product", element.getProduct(), -1);
    if (element.hasDailyAmount())
        composeQuantity(t, "CarePlan", "dailyAmount", element.getDailyAmount(), -1);
    if (element.hasQuantity())
        composeQuantity(t, "CarePlan", "quantity", element.getQuantity(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

Test (org.junit.jupiter.api.Test)14 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)10 CarePlan (org.hl7.fhir.dstu3.model.CarePlan)8 Reference (org.hl7.fhir.dstu3.model.Reference)7 ArrayList (java.util.ArrayList)6 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)5 Reference (org.hl7.fhir.r4.model.Reference)4 Date (java.util.Date)3 Composition (org.hl7.fhir.dstu3.model.Composition)3 DomainResource (org.hl7.fhir.dstu3.model.DomainResource)3 Encounter (org.hl7.fhir.dstu3.model.Encounter)3 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)3 CarePlan (org.hl7.fhir.r4.model.CarePlan)3 CarePlan (org.mitre.synthea.world.concepts.HealthRecord.CarePlan)3 SystemRequestDetails (ca.uhn.fhir.jpa.partition.SystemRequestDetails)2 Operation (ca.uhn.fhir.rest.annotation.Operation)2 JsonObject (com.google.gson.JsonObject)2 IOException (java.io.IOException)2 Bundle (org.hl7.fhir.dstu3.model.Bundle)2 BundleEntryComponent (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent)2