{% if Library.title.exists() %} {% endif %} {% if Library.id.exists() %} {% endif %} {% if Library.version.exists() %} {% endif %} {% if Library.url.exists() %} {% endif %} {% for identifier in Library.identifier %} {% endfor %} {% if Library.subtitle.exists() %} {% endif %} {% if Library.status.exists() and Library.status.value != 'active' %} {% endif %} {% if Library.experimental.exists() and Library.experimental.value = 'true' %} {% 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.topic.exists() %} {% endif %} {% if Library.purpose.exists() %} {% endif %} {% if Library.usage.exists() %} {% endif %} {% if Library.copyright.exists() %} {% endif %} {% if Library.approvalDate.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 %}
Title: {{Library.title}}
Id: {{Library.id}}
Version: {{Library.version}}
Url: {{Library.url}}
{% if identifier.type.coding.exists() %} {% if identifier.type.coding.display.exists() %} {{identifier.type.coding.display}}{% if identifier.assigner.display.exists() %} ({{identifier.assigner.display}}){% endif %} Identifier: {% else %} {{identifier.type.coding.code}}{% if identifier.assigner.display.exists() %} ({{identifier.assigner.display}}){% endif %} identifier: {% endif %} {% else %} {{identifier.use}} {% endif %} {% if identifier.value.exists() %}

{{identifier.value}}

{% endif %}
Subtitle: {{Library.subtitle}}
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}}

{% 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}}

{% 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}}

{% endif %}
Date: {{Library.date}}
Publisher: {{Library.publisher}}
Description: {{Library.description}}
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 %}
code value
{{useContext.code.code}} {{useContext.value.text}}
Jurisdiction: {{Library.jurisdiction.first().coding.first().code}}
Topic: {{Library.topic.first().coding.first().code}}
Purpose: {{Library.purpose}}
Usage: {{Library.usage}}
Copyright: {{Library.copyright}}
Approval Date: {{Library.approvalDate}}
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}}

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