Search in sources :

Example 41 with Complex

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

the class RdfParser method composeDateTime.

protected void composeDateTime(Complex parent, String parentType, String name, DateTimeType 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 42 with Complex

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

the class RdfParser method composeImplementationGuideImplementationGuideContactComponent.

protected void composeImplementationGuideImplementationGuideContactComponent(Complex parent, String parentType, String name, ImplementationGuide.ImplementationGuideContactComponent 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, "ImplementationGuide", "name", element.getNameElement(), -1);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "ImplementationGuide", "telecom", element.getTelecom().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 43 with Complex

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

the class RdfParser method composeBundleBundleLinkComponent.

protected void composeBundleBundleLinkComponent(Complex parent, String parentType, String name, Bundle.BundleLinkComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "link", name, element, index);
    if (element.hasRelationElement())
        composeString(t, "Bundle", "relation", element.getRelationElement(), -1);
    if (element.hasUrlElement())
        composeUri(t, "Bundle", "url", element.getUrlElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 44 with Complex

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

the class RdfParser method composePeriod.

protected void composePeriod(Complex parent, String parentType, String name, Period element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "Period", name, element, index);
    if (element.hasStartElement())
        composeDateTime(t, "Period", "start", element.getStartElement(), -1);
    if (element.hasEndElement())
        composeDateTime(t, "Period", "end", element.getEndElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 45 with Complex

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

the class RdfParser method composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent.

protected void composeFamilyMemberHistoryFamilyMemberHistoryConditionComponent(Complex parent, String parentType, String name, FamilyMemberHistory.FamilyMemberHistoryConditionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "condition", name, element, index);
    if (element.hasCode())
        composeCodeableConcept(t, "FamilyMemberHistory", "code", element.getCode(), -1);
    if (element.hasOutcome())
        composeCodeableConcept(t, "FamilyMemberHistory", "outcome", element.getOutcome(), -1);
    if (element.hasOnset())
        composeType(t, "FamilyMemberHistory", "onset", element.getOnset(), -1);
    if (element.hasNote())
        composeAnnotation(t, "FamilyMemberHistory", "note", element.getNote(), -1);
}
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