Search in sources :

Example 76 with Complex

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

the class RdfParser method composeCoverage.

protected void composeCoverage(Complex parent, String parentType, String name, Coverage element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "Coverage", name, element, index);
    if (element.hasIssuer())
        composeType(t, "Coverage", "issuer", element.getIssuer(), -1);
    if (element.hasBinElement())
        composeString(t, "Coverage", "bin", element.getBinElement(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Coverage", "period", element.getPeriod(), -1);
    if (element.hasType())
        composeCoding(t, "Coverage", "type", element.getType(), -1);
    if (element.hasPlanholder())
        composeType(t, "Coverage", "planholder", element.getPlanholder(), -1);
    if (element.hasBeneficiary())
        composeType(t, "Coverage", "beneficiary", element.getBeneficiary(), -1);
    if (element.hasRelationship())
        composeCoding(t, "Coverage", "relationship", element.getRelationship(), -1);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Coverage", "identifier", element.getIdentifier().get(i), i);
    if (element.hasGroupElement())
        composeString(t, "Coverage", "group", element.getGroupElement(), -1);
    if (element.hasPlanElement())
        composeString(t, "Coverage", "plan", element.getPlanElement(), -1);
    if (element.hasSubPlanElement())
        composeString(t, "Coverage", "subPlan", element.getSubPlanElement(), -1);
    if (element.hasDependentElement())
        composePositiveInt(t, "Coverage", "dependent", element.getDependentElement(), -1);
    if (element.hasSequenceElement())
        composePositiveInt(t, "Coverage", "sequence", element.getSequenceElement(), -1);
    for (int i = 0; i < element.getException().size(); i++) composeCoding(t, "Coverage", "exception", element.getException().get(i), i);
    if (element.hasSchoolElement())
        composeString(t, "Coverage", "school", element.getSchoolElement(), -1);
    if (element.hasNetworkElement())
        composeString(t, "Coverage", "network", element.getNetworkElement(), -1);
    for (int i = 0; i < element.getContract().size(); i++) composeReference(t, "Coverage", "contract", element.getContract().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 77 with Complex

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

the class RdfParser method composeImagingExcerptStudyViewableComponent.

protected void composeImagingExcerptStudyViewableComponent(Complex parent, String parentType, String name, ImagingExcerpt.StudyViewableComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "viewable", name, element, index);
    if (element.hasContentTypeElement())
        composeCode(t, "ImagingExcerpt", "contentType", element.getContentTypeElement(), -1);
    if (element.hasHeightElement())
        composePositiveInt(t, "ImagingExcerpt", "height", element.getHeightElement(), -1);
    if (element.hasWidthElement())
        composePositiveInt(t, "ImagingExcerpt", "width", element.getWidthElement(), -1);
    if (element.hasFramesElement())
        composePositiveInt(t, "ImagingExcerpt", "frames", element.getFramesElement(), -1);
    if (element.hasDurationElement())
        composeUnsignedInt(t, "ImagingExcerpt", "duration", element.getDurationElement(), -1);
    if (element.hasSizeElement())
        composeUnsignedInt(t, "ImagingExcerpt", "size", element.getSizeElement(), -1);
    if (element.hasTitleElement())
        composeString(t, "ImagingExcerpt", "title", element.getTitleElement(), -1);
    if (element.hasUrlElement())
        composeUri(t, "ImagingExcerpt", "url", element.getUrlElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 78 with Complex

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

the class RdfParser method composeModuleDefinitionModuleDefinitionParameterComponent.

protected void composeModuleDefinitionModuleDefinitionParameterComponent(Complex parent, String parentType, String name, ModuleDefinition.ModuleDefinitionParameterComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "parameter", name, element, index);
    if (element.hasNameElement())
        composeCode(t, "ModuleDefinition", "name", element.getNameElement(), -1);
    if (element.hasUseElement())
        composeCode(t, "ModuleDefinition", "use", element.getUseElement(), -1);
    if (element.hasDocumentationElement())
        composeString(t, "ModuleDefinition", "documentation", element.getDocumentationElement(), -1);
    if (element.hasTypeElement())
        composeCode(t, "ModuleDefinition", "type", element.getTypeElement(), -1);
    if (element.hasProfile())
        composeReference(t, "ModuleDefinition", "profile", element.getProfile(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 79 with Complex

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

the class RdfParser method composeOrderSet.

protected void composeOrderSet(Complex parent, String parentType, String name, OrderSet element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "OrderSet", name, element, index);
    if (element.hasModuleMetadata())
        composeModuleMetadata(t, "OrderSet", "moduleMetadata", element.getModuleMetadata(), -1);
    for (int i = 0; i < element.getLibrary().size(); i++) composeReference(t, "OrderSet", "library", element.getLibrary().get(i), i);
    for (int i = 0; i < element.getAction().size(); i++) composeActionDefinition(t, "OrderSet", "action", element.getAction().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 80 with Complex

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

the class RdfParser method composeLinkageLinkageItemComponent.

protected void composeLinkageLinkageItemComponent(Complex parent, String parentType, String name, Linkage.LinkageItemComponent 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.hasTypeElement())
        composeEnum(t, "Linkage", "type", element.getTypeElement(), -1);
    if (element.hasResource())
        composeReference(t, "Linkage", "resource", element.getResource(), -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