Search in sources :

Example 66 with Complex

use of org.hl7.fhir.r4.utils.formats.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeConformanceConformanceContactComponent.

protected void composeConformanceConformanceContactComponent(Complex parent, String parentType, String name, Conformance.ConformanceContactComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "contact", name, element, index);
    if (element.hasNameElement())
        composeString(t, "Conformance", "name", element.getNameElement(), -1);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Conformance", "telecom", element.getTelecom().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 67 with Complex

use of org.hl7.fhir.r4.utils.formats.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composePractitionerRole.

protected void composePractitionerRole(Complex parent, String parentType, String name, PractitionerRole element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "PractitionerRole", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "PractitionerRole", "identifier", element.getIdentifier().get(i), i);
    if (element.hasActiveElement())
        composeBoolean(t, "PractitionerRole", "active", element.getActiveElement(), -1);
    if (element.hasPractitioner())
        composeReference(t, "PractitionerRole", "practitioner", element.getPractitioner(), -1);
    if (element.hasOrganization())
        composeReference(t, "PractitionerRole", "organization", element.getOrganization(), -1);
    for (int i = 0; i < element.getRole().size(); i++) composeCodeableConcept(t, "PractitionerRole", "role", element.getRole().get(i), i);
    for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "PractitionerRole", "specialty", element.getSpecialty().get(i), i);
    for (int i = 0; i < element.getLocation().size(); i++) composeReference(t, "PractitionerRole", "location", element.getLocation().get(i), i);
    for (int i = 0; i < element.getHealthcareService().size(); i++) composeReference(t, "PractitionerRole", "healthcareService", element.getHealthcareService().get(i), i);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "PractitionerRole", "telecom", element.getTelecom().get(i), i);
    if (element.hasPeriod())
        composePeriod(t, "PractitionerRole", "period", element.getPeriod(), -1);
    for (int i = 0; i < element.getAvailableTime().size(); i++) composePractitionerRolePractitionerRoleAvailableTimeComponent(t, "PractitionerRole", "availableTime", element.getAvailableTime().get(i), i);
    for (int i = 0; i < element.getNotAvailable().size(); i++) composePractitionerRolePractitionerRoleNotAvailableComponent(t, "PractitionerRole", "notAvailable", element.getNotAvailable().get(i), i);
    if (element.hasAvailabilityExceptionsElement())
        composeString(t, "PractitionerRole", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 68 with Complex

use of org.hl7.fhir.r4.utils.formats.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeProtocolProtocolStepPreconditionComponent.

protected void composeProtocolProtocolStepPreconditionComponent(Complex parent, String parentType, String name, Protocol.ProtocolStepPreconditionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "precondition", name, element, index);
    if (element.hasDescriptionElement())
        composeString(t, "Protocol", "description", element.getDescriptionElement(), -1);
    if (element.hasCondition())
        composeProtocolProtocolStepPreconditionConditionComponent(t, "Protocol", "condition", element.getCondition(), -1);
    for (int i = 0; i < element.getIntersection().size(); i++) composeProtocolProtocolStepPreconditionComponent(t, "Protocol", "intersection", element.getIntersection().get(i), i);
    for (int i = 0; i < element.getUnion().size(); i++) composeProtocolProtocolStepPreconditionComponent(t, "Protocol", "union", element.getUnion().get(i), i);
    for (int i = 0; i < element.getExclude().size(); i++) composeProtocolProtocolStepPreconditionComponent(t, "Protocol", "exclude", element.getExclude().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 69 with Complex

use of org.hl7.fhir.r4.utils.formats.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeUnsignedInt.

protected void composeUnsignedInt(Complex parent, String parentType, String name, UnsignedIntType value, int index) {
    if (value == null)
        return;
    Complex t = parent.predicate("fhir:" + parentType + "." + name);
    t.predicate("fhir:value", ttlLiteral(value.asStringValue()));
    composeElement(t, parentType, name, value, index);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 70 with Complex

use of org.hl7.fhir.r4.utils.formats.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeParameters.

protected void composeParameters(Complex parent, String parentType, String name, Parameters element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeResource(t, "Parameters", name, element, index);
    for (int i = 0; i < element.getParameter().size(); i++) composeParametersParametersParameterComponent(t, "Parameters", "parameter", element.getParameter().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)679 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)506 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)504 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)12 FHIRException (org.hl7.fhir.exceptions.FHIRException)9 Cell (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell)9 ArrayList (java.util.ArrayList)7 Piece (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece)7 Row (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Row)7 URISyntaxException (java.net.URISyntaxException)6 JsonElement (com.google.gson.JsonElement)5 IOException (java.io.IOException)5 HashSet (java.util.HashSet)5 TypeRefComponent (org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent)5 URI (java.net.URI)4 FHIRFormatError (org.hl7.fhir.exceptions.FHIRFormatError)3 MalformedURLException (java.net.MalformedURLException)2 ElementDefinition (org.hl7.fhir.dstu2.model.ElementDefinition)2 StructureDefinition (org.hl7.fhir.dstu2.model.StructureDefinition)2 ElementDefinition (org.hl7.fhir.dstu2016may.model.ElementDefinition)2