Search in sources :

Example 31 with CapabilityStatement

use of org.hl7.fhir.r5.model.CapabilityStatement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCapabilityStatementCapabilityStatementRestSecurityComponent.

protected void composeCapabilityStatementCapabilityStatementRestSecurityComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "security", name, element, index);
    if (element.hasCorsElement())
        composeBoolean(t, "CapabilityStatement", "cors", element.getCorsElement(), -1);
    for (int i = 0; i < element.getService().size(); i++) composeCodeableConcept(t, "CapabilityStatement", "service", element.getService().get(i), i);
    if (element.hasDescriptionElement())
        composeString(t, "CapabilityStatement", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getCertificate().size(); i++) composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(t, "CapabilityStatement", "certificate", element.getCertificate().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 32 with CapabilityStatement

use of org.hl7.fhir.r5.model.CapabilityStatement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent.

protected void composeCapabilityStatementCapabilityStatementRestSecurityCertificateComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestSecurityCertificateComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "certificate", name, element, index);
    if (element.hasTypeElement())
        composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1);
    if (element.hasBlobElement())
        composeBase64Binary(t, "CapabilityStatement", "blob", element.getBlobElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 33 with CapabilityStatement

use of org.hl7.fhir.r5.model.CapabilityStatement in project org.hl7.fhir.core by hapifhir.

the class NarrativeGenerator method generate.

public boolean generate(ResourceContext rcontext, CapabilityStatement conf) throws FHIRFormatError, DefinitionException, IOException {
    XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
    x.h2().addText(conf.getName());
    addMarkdown(x, conf.getDescription());
    if (conf.getRest().size() > 0) {
        CapabilityStatementRestComponent rest = conf.getRest().get(0);
        XhtmlNode t = x.table(null);
        addTableRow(t, "Mode", rest.getMode().toString());
        addTableRow(t, "Description", rest.getDocumentation());
        addTableRow(t, "Transaction", showOp(rest, SystemRestfulInteraction.TRANSACTION));
        addTableRow(t, "System History", showOp(rest, SystemRestfulInteraction.HISTORYSYSTEM));
        addTableRow(t, "System Search", showOp(rest, SystemRestfulInteraction.SEARCHSYSTEM));
        t = x.table(null);
        XhtmlNode tr = t.tr();
        tr.th().b().tx("Resource Type");
        tr.th().b().tx("Profile");
        tr.th().b().tx("Read");
        tr.th().b().tx("V-Read");
        tr.th().b().tx("Search");
        tr.th().b().tx("Update");
        tr.th().b().tx("Updates");
        tr.th().b().tx("Create");
        tr.th().b().tx("Delete");
        tr.th().b().tx("History");
        for (CapabilityStatementRestResourceComponent r : rest.getResource()) {
            tr = t.tr();
            tr.td().addText(r.getType());
            if (r.hasProfile()) {
                tr.td().ah(prefix + r.getProfile().getReference()).addText(r.getProfile().getReference());
            }
            tr.td().addText(showOp(r, TypeRestfulInteraction.READ));
            tr.td().addText(showOp(r, TypeRestfulInteraction.VREAD));
            tr.td().addText(showOp(r, TypeRestfulInteraction.SEARCHTYPE));
            tr.td().addText(showOp(r, TypeRestfulInteraction.UPDATE));
            tr.td().addText(showOp(r, TypeRestfulInteraction.HISTORYINSTANCE));
            tr.td().addText(showOp(r, TypeRestfulInteraction.CREATE));
            tr.td().addText(showOp(r, TypeRestfulInteraction.DELETE));
            tr.td().addText(showOp(r, TypeRestfulInteraction.HISTORYTYPE));
        }
    }
    inject(conf, x, NarrativeStatus.GENERATED);
    return true;
}
Also used : CapabilityStatementRestComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestComponent) CapabilityStatementRestResourceComponent(org.hl7.fhir.dstu3.model.CapabilityStatement.CapabilityStatementRestResourceComponent) XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode)

Example 34 with CapabilityStatement

use of org.hl7.fhir.r5.model.CapabilityStatement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCapabilityStatementCapabilityStatementRestResourceComponent.

protected void composeCapabilityStatementCapabilityStatementRestResourceComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestResourceComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "resource", name, element, index);
    if (element.hasTypeElement())
        composeCode(t, "CapabilityStatement", "type", element.getTypeElement(), -1);
    if (element.hasProfileElement())
        composeCanonical(t, "CapabilityStatement", "profile", element.getProfileElement(), -1);
    for (int i = 0; i < element.getSupportedProfile().size(); i++) composeCanonical(t, "CapabilityStatement", "supportedProfile", element.getSupportedProfile().get(i), i);
    if (element.hasDocumentationElement())
        composeMarkdown(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1);
    for (int i = 0; i < element.getInteraction().size(); i++) composeCapabilityStatementResourceInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i);
    if (element.hasVersioningElement())
        composeEnum(t, "CapabilityStatement", "versioning", element.getVersioningElement(), -1);
    if (element.hasReadHistoryElement())
        composeBoolean(t, "CapabilityStatement", "readHistory", element.getReadHistoryElement(), -1);
    if (element.hasUpdateCreateElement())
        composeBoolean(t, "CapabilityStatement", "updateCreate", element.getUpdateCreateElement(), -1);
    if (element.hasConditionalCreateElement())
        composeBoolean(t, "CapabilityStatement", "conditionalCreate", element.getConditionalCreateElement(), -1);
    if (element.hasConditionalReadElement())
        composeEnum(t, "CapabilityStatement", "conditionalRead", element.getConditionalReadElement(), -1);
    if (element.hasConditionalUpdateElement())
        composeBoolean(t, "CapabilityStatement", "conditionalUpdate", element.getConditionalUpdateElement(), -1);
    if (element.hasConditionalDeleteElement())
        composeEnum(t, "CapabilityStatement", "conditionalDelete", element.getConditionalDeleteElement(), -1);
    for (int i = 0; i < element.getReferencePolicy().size(); i++) composeEnum(t, "CapabilityStatement", "referencePolicy", element.getReferencePolicy().get(i), i);
    for (int i = 0; i < element.getSearchInclude().size(); i++) composeString(t, "CapabilityStatement", "searchInclude", element.getSearchInclude().get(i), i);
    for (int i = 0; i < element.getSearchRevInclude().size(); i++) composeString(t, "CapabilityStatement", "searchRevInclude", element.getSearchRevInclude().get(i), i);
    for (int i = 0; i < element.getSearchParam().size(); i++) composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i);
    for (int i = 0; i < element.getOperation().size(); i++) composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(t, "CapabilityStatement", "operation", element.getOperation().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 35 with CapabilityStatement

use of org.hl7.fhir.r5.model.CapabilityStatement in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeCapabilityStatementCapabilityStatementRestComponent.

protected void composeCapabilityStatementCapabilityStatementRestComponent(Complex parent, String parentType, String name, CapabilityStatement.CapabilityStatementRestComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "rest", name, element, index);
    if (element.hasModeElement())
        composeEnum(t, "CapabilityStatement", "mode", element.getModeElement(), -1);
    if (element.hasDocumentationElement())
        composeMarkdown(t, "CapabilityStatement", "documentation", element.getDocumentationElement(), -1);
    if (element.hasSecurity())
        composeCapabilityStatementCapabilityStatementRestSecurityComponent(t, "CapabilityStatement", "security", element.getSecurity(), -1);
    for (int i = 0; i < element.getResource().size(); i++) composeCapabilityStatementCapabilityStatementRestResourceComponent(t, "CapabilityStatement", "resource", element.getResource().get(i), i);
    for (int i = 0; i < element.getInteraction().size(); i++) composeCapabilityStatementSystemInteractionComponent(t, "CapabilityStatement", "interaction", element.getInteraction().get(i), i);
    for (int i = 0; i < element.getSearchParam().size(); i++) composeCapabilityStatementCapabilityStatementRestResourceSearchParamComponent(t, "CapabilityStatement", "searchParam", element.getSearchParam().get(i), i);
    for (int i = 0; i < element.getOperation().size(); i++) composeCapabilityStatementCapabilityStatementRestResourceOperationComponent(t, "CapabilityStatement", "operation", element.getOperation().get(i), i);
    for (int i = 0; i < element.getCompartment().size(); i++) composeCanonical(t, "CapabilityStatement", "compartment", element.getCompartment().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Aggregations

CapabilityStatement (org.hl7.fhir.r4.model.CapabilityStatement)39 Test (org.junit.Test)24 Patient (org.hl7.fhir.r4.model.Patient)22 Library (org.hl7.fhir.r4.model.Library)20 Measure (org.hl7.fhir.r4.model.Measure)20 MeasureReport (org.hl7.fhir.r4.model.MeasureReport)18 ArrayList (java.util.ArrayList)17 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)16 MeasureEvidenceOptions (com.ibm.cohort.engine.measure.evidence.MeasureEvidenceOptions)15 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)14 CapabilityStatement (org.hl7.fhir.dstu3.model.CapabilityStatement)13 HashMap (java.util.HashMap)12 Test (org.junit.jupiter.api.Test)11 Date (java.util.Date)10 DefinitionException (org.hl7.fhir.exceptions.DefinitionException)10 StringType (org.hl7.fhir.r4.model.StringType)10 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)9 Coding (org.hl7.fhir.r4.model.Coding)9 CapabilityStatement (org.hl7.fhir.r5.model.CapabilityStatement)9 Extension (org.hl7.fhir.r4.model.Extension)8