Search in sources :

Example 26 with DataRequirement

use of org.hl7.fhir.r4b.model.DataRequirement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDataRequirement.

protected void composeDataRequirement(Complex parent, String parentType, String name, DataRequirement element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "DataRequirement", name, element, index);
    if (element.hasTypeElement())
        composeCode(t, "DataRequirement", "type", element.getTypeElement(), -1);
    if (element.hasProfile())
        composeReference(t, "DataRequirement", "profile", element.getProfile(), -1);
    for (int i = 0; i < element.getMustSupport().size(); i++) composeString(t, "DataRequirement", "mustSupport", element.getMustSupport().get(i), i);
    for (int i = 0; i < element.getCodeFilter().size(); i++) composeDataRequirementDataRequirementCodeFilterComponent(t, "DataRequirement", "codeFilter", element.getCodeFilter().get(i), i);
    for (int i = 0; i < element.getDateFilter().size(); i++) composeDataRequirementDataRequirementDateFilterComponent(t, "DataRequirement", "dateFilter", element.getDateFilter().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 27 with DataRequirement

use of org.hl7.fhir.r4b.model.DataRequirement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeLibrary.

protected void composeLibrary(Complex parent, String parentType, String name, Library element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Library", name, element, index);
    if (element.hasModuleMetadata())
        composeModuleMetadata(t, "Library", "moduleMetadata", element.getModuleMetadata(), -1);
    for (int i = 0; i < element.getModel().size(); i++) composeLibraryLibraryModelComponent(t, "Library", "model", element.getModel().get(i), i);
    for (int i = 0; i < element.getLibrary().size(); i++) composeLibraryLibraryLibraryComponent(t, "Library", "library", element.getLibrary().get(i), i);
    for (int i = 0; i < element.getCodeSystem().size(); i++) composeLibraryLibraryCodeSystemComponent(t, "Library", "codeSystem", element.getCodeSystem().get(i), i);
    for (int i = 0; i < element.getValueSet().size(); i++) composeLibraryLibraryValueSetComponent(t, "Library", "valueSet", element.getValueSet().get(i), i);
    for (int i = 0; i < element.getParameter().size(); i++) composeParameterDefinition(t, "Library", "parameter", element.getParameter().get(i), i);
    for (int i = 0; i < element.getDataRequirement().size(); i++) composeDataRequirement(t, "Library", "dataRequirement", element.getDataRequirement().get(i), i);
    if (element.hasDocument())
        composeAttachment(t, "Library", "document", element.getDocument(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 28 with DataRequirement

use of org.hl7.fhir.r4b.model.DataRequirement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDataRequirementDataRequirementDateFilterComponent.

protected void composeDataRequirementDataRequirementDateFilterComponent(Complex parent, String parentType, String name, DataRequirement.DataRequirementDateFilterComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "dateFilter", name, element, index);
    if (element.hasPathElement())
        composeString(t, "DataRequirement", "path", element.getPathElement(), -1);
    if (element.hasValue())
        composeType(t, "DataRequirement", "value", element.getValue(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 29 with DataRequirement

use of org.hl7.fhir.r4b.model.DataRequirement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeDataRequirement.

protected void composeDataRequirement(Complex parent, String parentType, String name, DataRequirement element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "DataRequirement", name, element, index);
    if (element.hasTypeElement())
        composeCode(t, "DataRequirement", "type", element.getTypeElement(), -1);
    for (int i = 0; i < element.getProfile().size(); i++) composeUri(t, "DataRequirement", "profile", element.getProfile().get(i), i);
    for (int i = 0; i < element.getMustSupport().size(); i++) composeString(t, "DataRequirement", "mustSupport", element.getMustSupport().get(i), i);
    for (int i = 0; i < element.getCodeFilter().size(); i++) composeDataRequirementDataRequirementCodeFilterComponent(t, "DataRequirement", "codeFilter", element.getCodeFilter().get(i), i);
    for (int i = 0; i < element.getDateFilter().size(); i++) composeDataRequirementDataRequirementDateFilterComponent(t, "DataRequirement", "dateFilter", element.getDateFilter().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 30 with DataRequirement

use of org.hl7.fhir.r4b.model.DataRequirement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeGuidanceResponse.

protected void composeGuidanceResponse(Complex parent, String parentType, String name, GuidanceResponse element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "GuidanceResponse", name, element, index);
    if (element.hasRequestIdElement())
        composeId(t, "GuidanceResponse", "requestId", element.getRequestIdElement(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "GuidanceResponse", "identifier", element.getIdentifier(), -1);
    if (element.hasModule())
        composeReference(t, "GuidanceResponse", "module", element.getModule(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "GuidanceResponse", "status", element.getStatusElement(), -1);
    if (element.hasSubject())
        composeReference(t, "GuidanceResponse", "subject", element.getSubject(), -1);
    if (element.hasContext())
        composeReference(t, "GuidanceResponse", "context", element.getContext(), -1);
    if (element.hasOccurrenceDateTimeElement())
        composeDateTime(t, "GuidanceResponse", "occurrenceDateTime", element.getOccurrenceDateTimeElement(), -1);
    if (element.hasPerformer())
        composeReference(t, "GuidanceResponse", "performer", element.getPerformer(), -1);
    if (element.hasReason())
        composeType(t, "GuidanceResponse", "reason", element.getReason(), -1);
    for (int i = 0; i < element.getNote().size(); i++) composeAnnotation(t, "GuidanceResponse", "note", element.getNote().get(i), i);
    for (int i = 0; i < element.getEvaluationMessage().size(); i++) composeReference(t, "GuidanceResponse", "evaluationMessage", element.getEvaluationMessage().get(i), i);
    if (element.hasOutputParameters())
        composeReference(t, "GuidanceResponse", "outputParameters", element.getOutputParameters(), -1);
    if (element.hasResult())
        composeReference(t, "GuidanceResponse", "result", element.getResult(), -1);
    for (int i = 0; i < element.getDataRequirement().size(); i++) composeDataRequirement(t, "GuidanceResponse", "dataRequirement", element.getDataRequirement().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Aggregations

DataRequirement (org.hl7.fhir.r4.model.DataRequirement)7 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)6 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)6 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)6 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)6 FhirContext (ca.uhn.fhir.context.FhirContext)4 IParser (ca.uhn.fhir.parser.IParser)4 IOException (java.io.IOException)4 Library (org.hl7.fhir.r4.model.Library)4 org.hl7.fhir.r5.model (org.hl7.fhir.r5.model)4 FHIRFormatError (org.hl7.fhir.exceptions.FHIRFormatError)3 Bundle (org.hl7.fhir.r4.model.Bundle)3 IdType (org.hl7.fhir.r4.model.IdType)3 Parameters (org.hl7.fhir.r4.model.Parameters)3 StringType (org.hl7.fhir.r4.model.StringType)3 Attachment (org.hl7.fhir.r4b.model.Attachment)3 ContactPoint (org.hl7.fhir.r4b.model.ContactPoint)3 Attachment (org.hl7.fhir.r5.model.Attachment)3 ContactPoint (org.hl7.fhir.r5.model.ContactPoint)3 Test (org.junit.jupiter.api.Test)3