Search in sources :

Example 91 with Element

use of org.hl7.fhir.r5.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDocumentManifestDocumentManifestRelatedComponent.

protected void composeDocumentManifestDocumentManifestRelatedComponent(Complex parent, String parentType, String name, DocumentManifest.DocumentManifestRelatedComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "related", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "DocumentManifest", "identifier", element.getIdentifier(), -1);
    if (element.hasRef())
        composeReference(t, "DocumentManifest", "ref", element.getRef(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 92 with Element

use of org.hl7.fhir.r5.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDetectedIssue.

protected void composeDetectedIssue(Complex parent, String parentType, String name, DetectedIssue element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "DetectedIssue", name, element, index);
    if (element.hasPatient())
        composeReference(t, "DetectedIssue", "patient", element.getPatient(), -1);
    if (element.hasCategory())
        composeCodeableConcept(t, "DetectedIssue", "category", element.getCategory(), -1);
    if (element.hasSeverityElement())
        composeEnum(t, "DetectedIssue", "severity", element.getSeverityElement(), -1);
    for (int i = 0; i < element.getImplicated().size(); i++) composeReference(t, "DetectedIssue", "implicated", element.getImplicated().get(i), i);
    if (element.hasDetailElement())
        composeString(t, "DetectedIssue", "detail", element.getDetailElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "DetectedIssue", "date", element.getDateElement(), -1);
    if (element.hasAuthor())
        composeReference(t, "DetectedIssue", "author", element.getAuthor(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "DetectedIssue", "identifier", element.getIdentifier(), -1);
    if (element.hasReferenceElement())
        composeUri(t, "DetectedIssue", "reference", element.getReferenceElement(), -1);
    for (int i = 0; i < element.getMitigation().size(); i++) composeDetectedIssueDetectedIssueMitigationComponent(t, "DetectedIssue", "mitigation", element.getMitigation().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 93 with Element

use of org.hl7.fhir.r5.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTestScriptTestScriptDestinationComponent.

protected void composeTestScriptTestScriptDestinationComponent(Complex parent, String parentType, String name, TestScript.TestScriptDestinationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "destination", name, element, index);
    if (element.hasIndexElement())
        composeInteger(t, "TestScript", "index", element.getIndexElement(), -1);
    if (element.hasProfile())
        composeCoding(t, "TestScript", "profile", element.getProfile(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 94 with Element

use of org.hl7.fhir.r5.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeAuditEventAuditEventEntityComponent.

protected void composeAuditEventAuditEventEntityComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventEntityComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "entity", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "AuditEvent", "identifier", element.getIdentifier(), -1);
    if (element.hasReference())
        composeReference(t, "AuditEvent", "reference", element.getReference(), -1);
    if (element.hasType())
        composeCoding(t, "AuditEvent", "type", element.getType(), -1);
    if (element.hasRole())
        composeCoding(t, "AuditEvent", "role", element.getRole(), -1);
    if (element.hasLifecycle())
        composeCoding(t, "AuditEvent", "lifecycle", element.getLifecycle(), -1);
    for (int i = 0; i < element.getSecurityLabel().size(); i++) composeCoding(t, "AuditEvent", "securityLabel", element.getSecurityLabel().get(i), i);
    if (element.hasNameElement())
        composeString(t, "AuditEvent", "name", element.getNameElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "AuditEvent", "description", element.getDescriptionElement(), -1);
    if (element.hasQueryElement())
        composeBase64Binary(t, "AuditEvent", "query", element.getQueryElement(), -1);
    for (int i = 0; i < element.getDetail().size(); i++) composeAuditEventAuditEventEntityDetailComponent(t, "AuditEvent", "detail", element.getDetail().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 95 with Element

use of org.hl7.fhir.r5.elementmodel.Element in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composePatientContactComponent.

protected void composePatientContactComponent(Complex parent, String parentType, String name, Patient.ContactComponent 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);
    for (int i = 0; i < element.getRelationship().size(); i++) composeCodeableConcept(t, "Patient", "relationship", element.getRelationship().get(i), i);
    if (element.hasName())
        composeHumanName(t, "Patient", "name", element.getName(), -1);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i);
    if (element.hasAddress())
        composeAddress(t, "Patient", "address", element.getAddress(), -1);
    if (element.hasGenderElement())
        composeEnum(t, "Patient", "gender", element.getGenderElement(), -1);
    if (element.hasOrganization())
        composeReference(t, "Patient", "organization", element.getOrganization(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Patient", "period", element.getPeriod(), -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