Search in sources :

Example 51 with Complex

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

the class RdfParser method composeFlag.

protected void composeFlag(Complex parent, String parentType, String name, Flag element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Flag", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Flag", "identifier", element.getIdentifier().get(i), i);
    if (element.hasCategory())
        composeCodeableConcept(t, "Flag", "category", element.getCategory(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "Flag", "status", element.getStatusElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Flag", "period", element.getPeriod(), -1);
    if (element.hasSubject())
        composeReference(t, "Flag", "subject", element.getSubject(), -1);
    if (element.hasEncounter())
        composeReference(t, "Flag", "encounter", element.getEncounter(), -1);
    if (element.hasAuthor())
        composeReference(t, "Flag", "author", element.getAuthor(), -1);
    if (element.hasCode())
        composeCodeableConcept(t, "Flag", "code", element.getCode(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 52 with Complex

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

the class RdfParser method composeCommunicationRequestCommunicationRequestPayloadComponent.

protected void composeCommunicationRequestCommunicationRequestPayloadComponent(Complex parent, String parentType, String name, CommunicationRequest.CommunicationRequestPayloadComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "payload", name, element, index);
    if (element.hasContent())
        composeType(t, "CommunicationRequest", "content", element.getContent(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 53 with Complex

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

the class RdfParser method composeProvenanceProvenanceAgentRelatedAgentComponent.

protected void composeProvenanceProvenanceAgentRelatedAgentComponent(Complex parent, String parentType, String name, Provenance.ProvenanceAgentRelatedAgentComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "relatedAgent", name, element, index);
    if (element.hasType())
        composeCodeableConcept(t, "Provenance", "type", element.getType(), -1);
    if (element.hasTargetElement())
        composeUri(t, "Provenance", "target", element.getTargetElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 54 with Complex

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

the class RdfParser method composeStructureDefinitionStructureDefinitionMappingComponent.

protected void composeStructureDefinitionStructureDefinitionMappingComponent(Complex parent, String parentType, String name, StructureDefinition.StructureDefinitionMappingComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "mapping", name, element, index);
    if (element.hasIdentityElement())
        composeId(t, "StructureDefinition", "identity", element.getIdentityElement(), -1);
    if (element.hasUriElement())
        composeUri(t, "StructureDefinition", "uri", element.getUriElement(), -1);
    if (element.hasNameElement())
        composeString(t, "StructureDefinition", "name", element.getNameElement(), -1);
    if (element.hasCommentsElement())
        composeString(t, "StructureDefinition", "comments", element.getCommentsElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 55 with Complex

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

the class RdfParser method composeConformanceConformanceRestSecurityComponent.

protected void composeConformanceConformanceRestSecurityComponent(Complex parent, String parentType, String name, Conformance.ConformanceRestSecurityComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "security", name, element, index);
    if (element.hasCorsElement())
        composeBoolean(t, "Conformance", "cors", element.getCorsElement(), -1);
    for (int i = 0; i < element.getService().size(); i++) composeCodeableConcept(t, "Conformance", "service", element.getService().get(i), i);
    if (element.hasDescriptionElement())
        composeString(t, "Conformance", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getCertificate().size(); i++) composeConformanceConformanceRestSecurityCertificateComponent(t, "Conformance", "certificate", element.getCertificate().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