{% if Library.id.exists() %} {% endif %} {% if Library.url.exists() %} {% endif %} {% if Library.version.exists() %} {% endif %} {% for identifier in Library.identifier %} {% endfor %} {% if Library.name.exists() %} {% endif %} {% if Library.title.exists() %} {% endif %} {% if Library.subtitle.exists() %} {% endif %} {% if Library.status.exists() %} {% endif %} {% if Library.experimental.exists() %} {% endif %} {% if Library.type.exists() %} {% endif %} {% if Library.subject.exists() %} {%if Library.subject is CodeableConcept %} {% endif %} {% if Library.subject is Reference %} {% endif %} {% endif %} {% if Library.date.exists() %} {% endif %} {% if Library.publisher.exists() %} {% endif %} {% if Library.description.exists() %} {% endif %} {% if Library.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} {% endif %} {% if Library.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} {% endif %} {% if Library.useContext.exists() %} {% endif %} {% if Library.jurisdiction.exists() %} {% endif %} {% if Library.purpose.exists() %} {% endif %} {% if Library.usage.exists() %} {% endif %} {% if Library.copyright.exists() %} {% endif %} {% if Library.approvalDate.exists() %} {% endif %} {% if Library.lastReviewDate.exists() %} {% endif %} {% if Library.effectivePeriod.exists() %} {% endif %} {% if Library.relatedArtifact.exists() %} {% endif %} {% if Library.parameter.exists() %} {% endif %} {% if Library.dataRequirement.exists() %} {% endif %} {% for c in Library.content %} {% if c.contentType = 'text/cql' %} {% endif %} {% if c.contentType != 'text/cql' %} {% endif %} {% endfor %}
Id: {{Library.id}}
Url: {{Library.url}}
Version: {{Library.version}}
Identifier: {% if identifier.type.exists() %}

type: {{identifier.type.value}}

{% endif %} {% if identifier.value.exists() %}

value: {{identifier.value}}

{% endif %}
Name: {{Library.name}}
Title: {{Library.title.escape('html')}}
Subtitle: {{Library.subtitle.escape('html')}}
Status: {{Library.status.value}}
Experimental: {{Library.experimental.value}}
Type: {% if Library.type.coding.exists() %} {% for coding in Library.type.coding %} {% if coding.system.exists() %}

system: {{coding.system}}

{% endif %} {% if coding.code.exists() %}

code: {{coding.code}}

{% endif %} {% if coding.display.exists() %}

display: {{coding.display.escape('html')}}

{% endif %} {% endfor %} {% endif %} {% if Library.type.coding.exists().not and Library.type.text.exists() %} {{Library.type.text}} {% endif %}
Subject: {% if Library.subject.coding.exists() %} {% for coding in Library.subject.coding %} {% if coding.system.exists() %}

system: {{coding.system}}

{% endif %} {% if coding.code.exists() %}

code: {{coding.code}}

{% endif %} {% if coding.display.exists() %}

display: {{coding.display.escape('html')}}

{% endif %} {% endfor %} {% endif %} {% if Library.subject.coding.exists().not and Library.subject.text.exists() %} {{Library.subject.text}} {% endif %}
{% if Library.subject.reference.exists() %}

reference: {{Library.subject.reference}}

{% endif %} {% if Library.subject.type.exists() %}

type: {{Library.subject.type}}

{% endif %} {% if Library.subject.display.exists() %}

code: {{Library.subject.display.escape('html')}}

{% endif %}
Date: {{Library.date}}
Publisher: {{Library.publisher.escape('html')}}
Description: {{Library.description.escape('html')}}
Knowledge Capability: {% for extension in Library.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %}{{extension.value}} {% endfor %}
Knowledge Representation Level: {% for extension in Library.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') %}{{extension.value}}{% endfor %}
Use Context: {% for useContext in Library.useContext %} {% endfor %}
codevaluedisplay
{{useContext.code.code}} {{(useContext.value as CodeableConcept).coding.first().code}} {{(useContext.value as CodeableConcept).coding.first().display.escape('html')}}
Jurisdiction: {{Library.jurisdiction.first().coding.first().code}}
Purpose: {{Library.purpose.escape('html')}}
Usage: {{Library.usage.escape('html')}}
Copyright: {{Library.copyright.escape('html')}}
Approval Date: {{Library.approvalDate}}
Last Review Date: {{Library.lastReviewDate}}
Effective Period: {{Library.effectivePeriod.start}}..{{Library.effectivePeriod.end}}
Related Artifacts: {% if Library.relatedArtifact.where(type = 'documentation' or type = 'justification').exists() %}

Documentation

{% endif %} {% if Library.relatedArtifact.where(type = 'citation').exists() %}

References

    {% for artifact in Library.relatedArtifact.where(type = 'citation') %}
  • {{artifact.citation}}
    {{artifact.url}}
  • {% endfor %}
{% endif %} {% if Library.relatedArtifact.where(type = 'depends-on').exists() %}

Dependencies

    {% for artifact in Library.relatedArtifact.where(type = 'depends-on') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %} {% if Library.relatedArtifact.where(type = 'composed-of').exists() %}

Components

    {% for artifact in Library.relatedArtifact.where(type = 'composed-of') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %} {% if Library.relatedArtifact.where(type = 'derived-from').exists() %}

Derived From

    {% for artifact in Library.relatedArtifact.where(type = 'derived-from') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %} {% if Library.relatedArtifact.where(type = 'successor').exists() %}

Successor

    {% for artifact in Library.relatedArtifact.where(type = 'successor') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %} {% if Library.relatedArtifact.where(type = 'predecessor').exists() %}

Predecessor

    {% for artifact in Library.relatedArtifact.where(type = 'predecessor') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %}
Parameters: {% for param in Library.parameter %} {% endfor %}
NameTypeMinMaxIn/Out
{{param.name}}{{param.type}}{{param.min}}{{param.max}}{{param.use}}
Data Requirements: {% for requirement in Library.dataRequirement %} {% endfor %}
TypeProfileMSCode Filter
{{requirement.type.value}} {% for profile in requirement.profile %}{{profile.value}}{% endfor %} {% for support in requirement.mustSupport %}{{mustSupport}};{% endfor %} {% for cfilter in requirement.codeFilter %} code filter: {% if cfilter.path.exists() or cfilter.valueSet.exists() or cfilter.code.exists() %}
{% endif %} {% if cfilter.path.exists() %} path: {{cfilter.path}} {% if cfilter.valueSet.exists() or cfilter.code.exists() %}
{% endif %} {% endif %} {% if cfilter.valueSet.exists() %} value set: {{cfilter.valueSet.value}} {% endif %} {% for coding in cfilter.code %} {% if coding.system.exists() %}

system: {{coding.system}}

{% endif %} {% if coding.code.exists() %}

code: {{coding.code}}

{% endif %} {% if coding.display.exists() %}

display: {{coding.display.escape('html')}}

{% endif %} {% endfor %} {% endfor %}
Content: {{c.contentType}}
{{c.data.decode('base64').escape('html')}}
Content: {{c.contentType}}
{{'Encoded data (' + c.data.length().toString() + ' characters)'}}