Search in sources :

Example 1 with AdditionalBindingDetail

use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.

the class AdditionalBindingsRenderer method seeMaxBinding.

public void seeMaxBinding(Extension ext) {
    AdditionalBindingDetail abr = new AdditionalBindingDetail();
    abr.purpose = "maximum";
    abr.valueSet = ext.getValue().primitiveValue();
    abr.unchanged = ext.hasUserData(ProfileUtilities.DERIVATION_EQUALS);
    bindings.add(abr);
}
Also used : AdditionalBindingDetail(org.hl7.fhir.r4b.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail)

Example 2 with AdditionalBindingDetail

use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.

the class AdditionalBindingsRenderer method makeNullBr.

private BindingResolution makeNullBr(AdditionalBindingDetail binding) {
    BindingResolution br = new BindingResolution();
    br.url = "http://none.none/none";
    br.display = "todo";
    return br;
}
Also used : BindingResolution(org.hl7.fhir.r4b.conformance.ProfileUtilities.ProfileKnowledgeProvider.BindingResolution)

Example 3 with AdditionalBindingDetail

use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.

the class AdditionalBindingsRenderer method render.

private void render(List<XhtmlNode> children, boolean doDoco) throws FHIRFormatError, DefinitionException, IOException {
    boolean doco = false;
    boolean usage = false;
    boolean any = false;
    for (AdditionalBindingDetail binding : bindings) {
        doco = doco || (doDoco && binding.doco != null);
        usage = usage || binding.usage != null;
        any = any || binding.any;
    }
    XhtmlNode tr = new XhtmlNode(NodeType.Element, "tr");
    children.add(tr);
    tr.td().style("font-size: 11px").b().tx("Additional Bindings");
    tr.td().style("font-size: 11px").tx("Purpose");
    if (usage) {
        tr.td().style("font-size: 11px").tx("Usage");
    }
    if (any) {
        tr.td().style("font-size: 11px").tx("Any");
    }
    if (doco) {
        tr.td().style("font-size: 11px").tx("Documentation");
    }
    for (AdditionalBindingDetail binding : bindings) {
        tr = new XhtmlNode(NodeType.Element, "tr");
        if (binding.unchanged) {
            tr.style("opacity: 0.5");
        }
        children.add(tr);
        BindingResolution br = pkp == null ? makeNullBr(binding) : pkp.resolveBinding(profile, binding.valueSet, path);
        if (br.url != null) {
            tr.td().style("font-size: 11px").ah(Utilities.isAbsoluteUrl(br.url) || !pkp.prependLinks() ? br.url : corePath + br.url, binding.valueSet).tx(br.display);
        } else {
            tr.td().style("font-size: 11px").span(null, binding.valueSet).tx(br.display);
        }
        renderPurpose(tr.td().style("font-size: 11px"), binding.purpose);
        if (usage) {
            if (binding.usage != null) {
                new DataRenderer(context).render(tr.td(), binding.usage);
            } else {
                tr.td();
            }
        }
        if (any) {
            if (binding.any) {
                tr.td().style("font-size: 11px").tx("Any repeat");
            } else {
                tr.td().style("font-size: 11px").tx("All repeats");
            }
        }
        if (doco) {
            if (binding.doco != null) {
                String d = md.processMarkdown("Binding.description", binding.doco);
                tr.td().style("font-size: 11px").innerHTML(d);
            } else {
                tr.td().style("font-size: 11px");
            }
        }
    }
}
Also used : BindingResolution(org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider.BindingResolution) DataRenderer(org.hl7.fhir.r5.renderers.DataRenderer) AdditionalBindingDetail(org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail) XhtmlNode(org.hl7.fhir.utilities.xhtml.XhtmlNode)

Example 4 with AdditionalBindingDetail

use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.

the class AdditionalBindingsRenderer method seeMaxBinding.

public void seeMaxBinding(Extension ext) {
    AdditionalBindingDetail abr = new AdditionalBindingDetail();
    abr.purpose = "maximum";
    abr.valueSet = ext.getValue().primitiveValue();
    abr.unchanged = ext.hasUserData(ProfileUtilities.DERIVATION_EQUALS);
    bindings.add(abr);
}
Also used : AdditionalBindingDetail(org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail)

Example 5 with AdditionalBindingDetail

use of org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail in project org.hl7.fhir.core by hapifhir.

the class AdditionalBindingsRenderer method makeNullBr.

private BindingResolution makeNullBr(AdditionalBindingDetail binding) {
    BindingResolution br = new BindingResolution();
    br.url = "http://none.none/none";
    br.display = "todo";
    return br;
}
Also used : BindingResolution(org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider.BindingResolution)

Aggregations

AdditionalBindingDetail (org.hl7.fhir.r4b.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail)4 AdditionalBindingDetail (org.hl7.fhir.r5.conformance.AdditionalBindingsRenderer.AdditionalBindingDetail)4 BindingResolution (org.hl7.fhir.r4b.conformance.ProfileUtilities.ProfileKnowledgeProvider.BindingResolution)2 BindingResolution (org.hl7.fhir.r5.conformance.ProfileUtilities.ProfileKnowledgeProvider.BindingResolution)2 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)2 Extension (org.hl7.fhir.r4b.model.Extension)1 DataRenderer (org.hl7.fhir.r4b.renderers.DataRenderer)1 Extension (org.hl7.fhir.r5.model.Extension)1 DataRenderer (org.hl7.fhir.r5.renderers.DataRenderer)1