Search in sources :

Example 36 with CarePlan

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

the class RdfParser method composeCarePlan.

protected void composeCarePlan(Complex parent, String parentType, String name, CarePlan element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "CarePlan", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "CarePlan", "identifier", element.getIdentifier().get(i), i);
    for (int i = 0; i < element.getDefinition().size(); i++) composeReference(t, "CarePlan", "definition", element.getDefinition().get(i), i);
    for (int i = 0; i < element.getBasedOn().size(); i++) composeReference(t, "CarePlan", "basedOn", element.getBasedOn().get(i), i);
    for (int i = 0; i < element.getReplaces().size(); i++) composeReference(t, "CarePlan", "replaces", element.getReplaces().get(i), i);
    for (int i = 0; i < element.getPartOf().size(); i++) composeReference(t, "CarePlan", "partOf", element.getPartOf().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "CarePlan", "status", element.getStatusElement(), -1);
    if (element.hasIntentElement())
        composeEnum(t, "CarePlan", "intent", element.getIntentElement(), -1);
    for (int i = 0; i < element.getCategory().size(); i++) composeCodeableConcept(t, "CarePlan", "category", element.getCategory().get(i), i);
    if (element.hasTitleElement())
        composeString(t, "CarePlan", "title", element.getTitleElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "CarePlan", "description", element.getDescriptionElement(), -1);
    if (element.hasSubject())
        composeReference(t, "CarePlan", "subject", element.getSubject(), -1);
    if (element.hasContext())
        composeReference(t, "CarePlan", "context", element.getContext(), -1);
    if (element.hasPeriod())
        composePeriod(t, "CarePlan", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getAuthor().size(); i++) composeReference(t, "CarePlan", "author", element.getAuthor().get(i), i);
    for (int i = 0; i < element.getCareTeam().size(); i++) composeReference(t, "CarePlan", "careTeam", element.getCareTeam().get(i), i);
    for (int i = 0; i < element.getAddresses().size(); i++) composeReference(t, "CarePlan", "addresses", element.getAddresses().get(i), i);
    for (int i = 0; i < element.getSupportingInfo().size(); i++) composeReference(t, "CarePlan", "supportingInfo", element.getSupportingInfo().get(i), i);
    for (int i = 0; i < element.getGoal().size(); i++) composeReference(t, "CarePlan", "goal", element.getGoal().get(i), i);
    for (int i = 0; i < element.getActivity().size(); i++) composeCarePlanCarePlanActivityComponent(t, "CarePlan", "activity", element.getActivity().get(i), i);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "CarePlan", "note", element.getNote().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 37 with CarePlan

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

the class RdfParser method composeCarePlanCarePlanActivityComponent.

protected void composeCarePlanCarePlanActivityComponent(Complex parent, String parentType, String name, CarePlan.CarePlanActivityComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "activity", name, element, index);
    for (int i = 0; i < element.getOutcomeCodeableConcept().size(); i++) composeCodeableConcept(t, "CarePlan", "outcomeCodeableConcept", element.getOutcomeCodeableConcept().get(i), i);
    for (int i = 0; i < element.getOutcomeReference().size(); i++) composeReference(t, "CarePlan", "outcomeReference", element.getOutcomeReference().get(i), i);
    for (int i = 0; i < element.getProgress().size(); i++) composeAnnotation(t, "CarePlan", "progress", element.getProgress().get(i), i);
    if (element.hasReference())
        composeReference(t, "CarePlan", "reference", element.getReference(), -1);
    if (element.hasDetail())
        composeCarePlanCarePlanActivityDetailComponent(t, "CarePlan", "detail", element.getDetail(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 38 with CarePlan

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

the class TurtleTests method test_careplan_example_f201_renal.

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

Example 39 with CarePlan

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

the class TurtleTests method test_careplan_example.

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

Example 40 with CarePlan

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

the class TurtleTests method test_careplan_example_f003_pharynx.

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

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