Search in sources :

Example 26 with Complex

use of org.hl7.fhir.utilities.turtle.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCode.

protected void composeCode(Complex parent, String parentType, String name, CodeType 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);
    decorateCode(t, value);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 27 with Complex

use of org.hl7.fhir.utilities.turtle.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeConformanceConformanceMessagingEndpointComponent.

protected void composeConformanceConformanceMessagingEndpointComponent(Complex parent, String parentType, String name, Conformance.ConformanceMessagingEndpointComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "endpoint", name, element, index);
    if (element.hasProtocol())
        composeCoding(t, "Conformance", "protocol", element.getProtocol(), -1);
    if (element.hasAddressElement())
        composeUri(t, "Conformance", "address", element.getAddressElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 28 with Complex

use of org.hl7.fhir.utilities.turtle.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeMedicationDispenseMedicationDispenseSubstitutionComponent.

protected void composeMedicationDispenseMedicationDispenseSubstitutionComponent(Complex parent, String parentType, String name, MedicationDispense.MedicationDispenseSubstitutionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "substitution", name, element, index);
    if (element.hasType())
        composeCodeableConcept(t, "MedicationDispense", "type", element.getType(), -1);
    for (int i = 0; i < element.getReason().size(); i++) composeCodeableConcept(t, "MedicationDispense", "reason", element.getReason().get(i), i);
    for (int i = 0; i < element.getResponsibleParty().size(); i++) composeReference(t, "MedicationDispense", "responsibleParty", element.getResponsibleParty().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 29 with Complex

use of org.hl7.fhir.utilities.turtle.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeImagingExcerptSeriesComponent.

protected void composeImagingExcerptSeriesComponent(Complex parent, String parentType, String name, ImagingExcerpt.SeriesComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "series", name, element, index);
    if (element.hasUidElement())
        composeOid(t, "ImagingExcerpt", "uid", element.getUidElement(), -1);
    for (int i = 0; i < element.getDicom().size(); i++) composeImagingExcerptSeriesDicomComponent(t, "ImagingExcerpt", "dicom", element.getDicom().get(i), i);
    for (int i = 0; i < element.getInstance().size(); i++) composeImagingExcerptInstanceComponent(t, "ImagingExcerpt", "instance", element.getInstance().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 30 with Complex

use of org.hl7.fhir.utilities.turtle.Turtle.Complex in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeEncounterEncounterStatusHistoryComponent.

protected void composeEncounterEncounterStatusHistoryComponent(Complex parent, String parentType, String name, Encounter.EncounterStatusHistoryComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "statusHistory", name, element, index);
    if (element.hasStatusElement())
        composeEnum(t, "Encounter", "status", element.getStatusElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Encounter", "period", element.getPeriod(), -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