Search in sources :

Example 81 with Complex

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

the class RdfParser method composeModuleDefinition.

protected void composeModuleDefinition(Complex parent, String parentType, String name, ModuleDefinition element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "ModuleDefinition", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "ModuleDefinition", "identifier", element.getIdentifier().get(i), i);
    if (element.hasVersionElement())
        composeString(t, "ModuleDefinition", "version", element.getVersionElement(), -1);
    for (int i = 0; i < element.getModel().size(); i++) composeModuleDefinitionModuleDefinitionModelComponent(t, "ModuleDefinition", "model", element.getModel().get(i), i);
    for (int i = 0; i < element.getLibrary().size(); i++) composeModuleDefinitionModuleDefinitionLibraryComponent(t, "ModuleDefinition", "library", element.getLibrary().get(i), i);
    for (int i = 0; i < element.getCodeSystem().size(); i++) composeModuleDefinitionModuleDefinitionCodeSystemComponent(t, "ModuleDefinition", "codeSystem", element.getCodeSystem().get(i), i);
    for (int i = 0; i < element.getValueSet().size(); i++) composeModuleDefinitionModuleDefinitionValueSetComponent(t, "ModuleDefinition", "valueSet", element.getValueSet().get(i), i);
    for (int i = 0; i < element.getParameter().size(); i++) composeModuleDefinitionModuleDefinitionParameterComponent(t, "ModuleDefinition", "parameter", element.getParameter().get(i), i);
    for (int i = 0; i < element.getData().size(); i++) composeModuleDefinitionModuleDefinitionDataComponent(t, "ModuleDefinition", "data", element.getData().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 82 with Complex

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

the class RdfParser method composePatientAnimalComponent.

protected void composePatientAnimalComponent(Complex parent, String parentType, String name, Patient.AnimalComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "animal", name, element, index);
    if (element.hasSpecies())
        composeCodeableConcept(t, "Patient", "species", element.getSpecies(), -1);
    if (element.hasBreed())
        composeCodeableConcept(t, "Patient", "breed", element.getBreed(), -1);
    if (element.hasGenderStatus())
        composeCodeableConcept(t, "Patient", "genderStatus", element.getGenderStatus(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 83 with Complex

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

the class RdfParser method composeLibraryLibraryValueSetComponent.

protected void composeLibraryLibraryValueSetComponent(Complex parent, String parentType, String name, Library.LibraryValueSetComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "valueSet", name, element, index);
    if (element.hasNameElement())
        composeString(t, "Library", "name", element.getNameElement(), -1);
    if (element.hasIdentifierElement())
        composeString(t, "Library", "identifier", element.getIdentifierElement(), -1);
    if (element.hasVersionElement())
        composeString(t, "Library", "version", element.getVersionElement(), -1);
    for (int i = 0; i < element.getCodeSystem().size(); i++) composeString(t, "Library", "codeSystem", element.getCodeSystem().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 84 with Complex

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

the class RdfParser method composeSearchParameter.

protected void composeSearchParameter(Complex parent, String parentType, String name, SearchParameter element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "SearchParameter", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "SearchParameter", "url", element.getUrlElement(), -1);
    if (element.hasNameElement())
        composeString(t, "SearchParameter", "name", element.getNameElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "SearchParameter", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "SearchParameter", "experimental", element.getExperimentalElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "SearchParameter", "date", element.getDateElement(), -1);
    if (element.hasPublisherElement())
        composeString(t, "SearchParameter", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeSearchParameterSearchParameterContactComponent(t, "SearchParameter", "contact", element.getContact().get(i), i);
    for (int i = 0; i < element.getUseContext().size(); i++) composeCodeableConcept(t, "SearchParameter", "useContext", element.getUseContext().get(i), i);
    if (element.hasRequirementsElement())
        composeString(t, "SearchParameter", "requirements", element.getRequirementsElement(), -1);
    if (element.hasCodeElement())
        composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1);
    if (element.hasBaseElement())
        composeCode(t, "SearchParameter", "base", element.getBaseElement(), -1);
    if (element.hasTypeElement())
        composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "SearchParameter", "description", element.getDescriptionElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1);
    if (element.hasXpathElement())
        composeString(t, "SearchParameter", "xpath", element.getXpathElement(), -1);
    if (element.hasXpathUsageElement())
        composeEnum(t, "SearchParameter", "xpathUsage", element.getXpathUsageElement(), -1);
    for (int i = 0; i < element.getTarget().size(); i++) composeCode(t, "SearchParameter", "target", element.getTarget().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 85 with Complex

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

the class RdfParser method composeTiming.

protected void composeTiming(Complex parent, String parentType, String name, Timing element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "Timing", name, element, index);
    for (int i = 0; i < element.getEvent().size(); i++) composeDateTime(t, "Timing", "event", element.getEvent().get(i), i);
    if (element.hasRepeat())
        composeTimingTimingRepeatComponent(t, "Timing", "repeat", element.getRepeat(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "Timing", "code", element.getCode(), -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