{% if PlanDefinition.id.exists() %} {% endif %} {% if PlanDefinition.url.exists() %} {% endif %} {% if PlanDefinition.version.exists() %} {% endif %} {% for identifier in PlanDefinition.identifier %} {% endfor %} {% if PlanDefinition.name.exists() %} {% endif %} {% if PlanDefinition.title.exists() %} {% endif %} {% if PlanDefinition.subtitle.exists() %} {% endif %} {% if PlanDefinition.status.exists() %} {% endif %} {% if PlanDefinition.experimental.exists() %} {% 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.purpose.exists() %} {% endif %} {% if PlanDefinition.usage.exists() %} {% endif %} {% if PlanDefinition.copyright.exists() %} {% endif %} {% if PlanDefinition.approvalDate.exists() %} {% endif %} {% if PlanDefinition.lastReviewDate.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}}
Identifier: {% if identifier.type.exists() %}

type: {{identifier.type.value}}

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

value: {{identifier.value}}

{% endif %}
Name: {{PlanDefinition.name}}
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.escape('html')}}
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 %}
codevaluedisplay
{{useContext.code.code}} {{(useContext.value as CodeableConcept).coding.first().code}} {{(useContext.value as CodeableConcept).coding.first().display.escape('html')}}
Jurisdiction: {{PlanDefinition.jurisdiction.first().coding.first().code}}
Purpose: {{PlanDefinition.purpose.escape('html')}}
Usage: {{PlanDefinition.usage.escape('html')}}
Copyright: {{PlanDefinition.copyright.escape('html')}}
Approval Date: {{PlanDefinition.approvalDate}}
Last Review Date: {{PlanDefinition.lastReviewDate}}
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.escape('html')}}{% else %}{{action.prefix}} {{action.title.escape('html')}}: {{action.description.escape('html')}}{% endif %}
{% if action.trigger.exists() %}When: {% for trigger in action.trigger %}{{trigger.type}}: {{trigger.name.escape('html')}}
{% endfor %}{% endif %} {% if action.condition.exists() %}If: {% for condition in action.condition %}{{condition.kind}}: {% if condition.expression.description.exists() %}{{condition.expression.description.escape('html')}}{% endif %} ({{condition.expression.expression.escape('html')}})
{% endfor %}{% endif %} {% if action.action.exists() %} Then: {% for action in action.action %} {% endfor %}
{% if action.textEquivalent.exists() %}{{action.textEquivalent.escape('html')}}{% else %}{{action.prefix}} {{action.title.escape('html')}}: {{action.description.escape('html')}}{% endif %}
{% if action.trigger.exists() %}When: {% for trigger in action.trigger %}{{trigger.type}}: {{trigger.name.escape('html')}}
{% endfor %}{% endif %} {% if action.condition.exists() %}If: {% for condition in action.condition %}{{condition.kind}}: {% if condition.expression.description.exists() %}{{condition.expression.description.escape('html')}}{% endif %} ({{condition.expression.expression.escape('html')}})
{% endfor %}{% endif %} {% if action.action.exists() %} Then: {% for action in action.action %} {% endfor %}
{% if action.textEquivalent.exists() %}{{action.textEquivalent.escape('html')}}{% else %}{{action.prefix}} {{action.title.escape('html')}}: {{action.description.escape('html')}}{% endif %}
{% if action.trigger.exists() %}When: {% for trigger in action.trigger %}{{trigger.type}}: {{trigger.name.escape('html')}}
{% endfor %}{% endif %} {% if action.condition.exists() %}If: {% for condition in action.condition %}{{condition.kind}}: {% if condition.expression.description.exists() %}{{condition.expression.description.escape('html')}}{% endif %} ({{condition.expression.expression.escape('html')}})
{% 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.escape('html')}})
{% 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.escape('html')}})
{% 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.escape('html')}})
{% endfor %} {% endif %} {% endif %} {% endif %}