Search in sources :

Example 96 with Element

use of org.hl7.fhir.dstu2.model.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDiagnosticOrderDiagnosticOrderItemComponent.

protected void composeDiagnosticOrderDiagnosticOrderItemComponent(Complex parent, String parentType, String name, DiagnosticOrder.DiagnosticOrderItemComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "item", name, element, index);
    if (element.hasCode())
        composeCodeableConcept(t, "DiagnosticOrder", "code", element.getCode(), -1);
    for (int i = 0; i < element.getSpecimen().size(); i++) composeReference(t, "DiagnosticOrder", "specimen", element.getSpecimen().get(i), i);
    if (element.hasBodySite())
        composeCodeableConcept(t, "DiagnosticOrder", "bodySite", element.getBodySite(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "DiagnosticOrder", "status", element.getStatusElement(), -1);
    for (int i = 0; i < element.getEvent().size(); i++) composeDiagnosticOrderDiagnosticOrderEventComponent(t, "DiagnosticOrder", "event", element.getEvent().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 97 with Element

use of org.hl7.fhir.dstu2.model.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeImagingExcerptInstanceComponent.

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

Example 98 with Element

use of org.hl7.fhir.dstu2.model.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTaskTaskOutputComponent.

protected void composeTaskTaskOutputComponent(Complex parent, String parentType, String name, Task.TaskOutputComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "output", name, element, index);
    if (element.hasNameElement())
        composeString(t, "Task", "name", element.getNameElement(), -1);
    if (element.hasValue())
        composeType(t, "Task", "value", element.getValue(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 99 with Element

use of org.hl7.fhir.dstu2.model.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeSignature.

protected void composeSignature(Complex parent, String parentType, String name, Signature element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "Signature", name, element, index);
    for (int i = 0; i < element.getType().size(); i++) composeCoding(t, "Signature", "type", element.getType().get(i), i);
    if (element.hasWhenElement())
        composeInstant(t, "Signature", "when", element.getWhenElement(), -1);
    if (element.hasWho())
        composeType(t, "Signature", "who", element.getWho(), -1);
    if (element.hasContentTypeElement())
        composeCode(t, "Signature", "contentType", element.getContentTypeElement(), -1);
    if (element.hasBlobElement())
        composeBase64Binary(t, "Signature", "blob", element.getBlobElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 100 with Element

use of org.hl7.fhir.dstu2.model.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCodeSystemCodeSystemFilterComponent.

protected void composeCodeSystemCodeSystemFilterComponent(Complex parent, String parentType, String name, CodeSystem.CodeSystemFilterComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "filter", name, element, index);
    if (element.hasCodeElement())
        composeCode(t, "CodeSystem", "code", element.getCodeElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "CodeSystem", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getOperator().size(); i++) composeCode(t, "CodeSystem", "operator", element.getOperator().get(i), i);
    if (element.hasValueElement())
        composeString(t, "CodeSystem", "value", element.getValueElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Aggregations

Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)659 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)488 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)486 ArrayList (java.util.ArrayList)240 FHIRException (org.hl7.fhir.exceptions.FHIRException)162 Element (org.hl7.fhir.r5.elementmodel.Element)98 IOException (java.io.IOException)97 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)91 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)84 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)84 Element (org.w3c.dom.Element)74 JsonElement (com.google.gson.JsonElement)62 FHIRFormatError (org.hl7.fhir.exceptions.FHIRFormatError)61 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)60 HashSet (java.util.HashSet)53 SpecialElement (org.hl7.fhir.r5.elementmodel.Element.SpecialElement)49 NamedElement (org.hl7.fhir.r5.elementmodel.ParserBase.NamedElement)48 Cell (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell)47 CommaSeparatedStringBuilder (org.hl7.fhir.utilities.CommaSeparatedStringBuilder)46 IndexedElement (org.hl7.fhir.validation.instance.utils.IndexedElement)43