{% if PlanDefinition.id.exists() %} {% endif %} {% if PlanDefinition.url.exists() %} {% endif %} {% if PlanDefinition.version.exists() %} {% endif %} {% for identifier in PlanDefinition.identifier %} {% endfor %} {% if PlanDefinition.title.exists() %} {% endif %} {% if PlanDefinition.subtitle.exists() %} {% endif %} {% if PlanDefinition.status.exists() and PlanDefinition.status.value != 'active' %} {% endif %} {% if PlanDefinition.experimental.exists() and PlanDefinition.experimental.value = 'true' %} {% endif %} {% if PlanDefinition.type.exists() %} {% endif %} {% if PlanDefinition.subject.exists() %} {% if PlanDefinition.subject is CodeableConcept %} {% endif %} {% if PlanDefinition.subject is Reference %} {% endif %} {% endif %} {% if PlanDefinition.date.exists() %} {% endif %} {% if PlanDefinition.publisher.exists() %} {% endif %} {% if PlanDefinition.description.exists() %} {% endif %} {% if PlanDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} {% endif %} {% if PlanDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} {% endif %} {% if PlanDefinition.useContext.exists() %} {% endif %} {% if PlanDefinition.jurisdiction.exists() %} {% endif %} {% if PlanDefinition.topic.exists() %} {% endif %} {% if PlanDefinition.purpose.exists() %} {% endif %} {% if PlanDefinition.usage.exists() %} {% endif %} {% if PlanDefinition.copyright.exists() %} {% endif %} {% if PlanDefinition.approvalDate.exists() %} {% endif %} {% if PlanDefinition.effectivePeriod.exists() %} {% endif %} {% if PlanDefinition.relatedArtifact.exists() %} {% endif %} {% if PlanDefinition.library.exists() %} {% endif %} {% if PlanDefinition.action.exists() %} {% endif %}
Id: {{PlanDefinition.id}}
Url: {{PlanDefinition.url}}
Version: {{PlanDefinition.version}}
{% 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 %}
Title: {{PlanDefinition.title}}
Subtitle: {{PlanDefinition.subtitle}}
Status: {{PlanDefinition.status.value}}
Experimental: {{PlanDefinition.experimental.value}}
Type: {% if PlanDefinition.type.coding.exists() %} {% for coding in PlanDefinition.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 PlanDefinition.type.coding.exists().not() and PlanDefinition.type.text.exists() %} {{PlanDefinition.type.text}} {% endif %}
Subject: {% if PlanDefinition.subject.coding.exists() %} {% for coding in PlanDefinition.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 PlanDefinition.subject.coding.exists().not() and PlanDefinition.subject.text.exists() %} {{PlanDefinition.subject.text}} {% endif %}
{% if PlanDefinition.subject.reference.exists() %}

reference: {{PlanDefinition.subject.reference}}

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

type: {{PlanDefinition.subject.type}}

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

code: {{PlanDefinition.subject.display}}

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

Documentation

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

References

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

Dependencies

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

Components

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

Derived From

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

Successor

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

Predecessor

    {% for artifact in PlanDefinition.relatedArtifact.where(type = 'predecessor') %}
  • {{artifact.resource}}
  • {% endfor %}
{% endif %}
Libraries: {% for library in PlanDefinition.library %} {% endfor %}
{{library}}
Actions: {% for action in PlanDefinition.action %} {% endfor %}
{% if action.textEquivalent.exists() %} {{action.textEquivalent}} {% else %} {{action.prefix}} {{action.title}}: {{action.description}} {% endif %}
{% if action.trigger.exists() %} When: {% for trigger in action.trigger %} {{trigger.type}}: {{trigger.name}}
{% endfor %} {% endif %} {% if action.condition.exists() %} If: {% for condition in action.condition %} {{condition.kind}}: {% if condition.expression.description.exists() %} {{condition.expression.description}} {% endif %} ({{condition.expression.expression}})
{% endfor %} {% endif %} {% if action.action.exists() %} Then: {% for action in action.action %} {% endfor %}
{% if action.textEquivalent.exists() %} {{action.textEquivalent}} {% else %} {{action.prefix}} {{action.title}}: {{action.description}} {% endif %}
{% if action.trigger.exists() %} When: {% for trigger in action.trigger %} {{trigger.type}}: {{trigger.name}}
{% endfor %} {% endif %} {% if action.condition.exists() %} If: {% for condition in action.condition %} {{condition.kind}}: {% if condition.expression.description.exists() %} {{condition.expression.description}} {% endif %} ({{condition.expression.expression}})
{% endfor %} {% endif %} {% if action.action.exists() %} Then: Additional sub-actions not displayed {% else %} {% if action.definition.exists() %} Then: Definition: {{action.definition}}
{% if action.dynamicValue.exists() %} Dynamic Values:
{% for dynamicValue in action.dynamicValue %} {{dynamicValue.path}}: ({{dynamicValue.expression.expression}})
{% endfor %} {% endif %} {% endif %} {% endif %}
{% else %} {% if action.definition.exists() %} Then: Definition: {{action.definition}}
{% if action.dynamicValue.exists() %} Dynamic Values:
{% for dynamicValue in action.dynamicValue %} {{dynamicValue.path}}: ({{dynamicValue.expression.expression}})
{% endfor %} {% endif %} {% endif %} {% endif %}