diff --git a/templates/liquid/ActivityDefinition.liquid b/templates/liquid/ActivityDefinition.liquid index 62bb7d2..7cbbcb5 100644 --- a/templates/liquid/ActivityDefinition.liquid +++ b/templates/liquid/ActivityDefinition.liquid @@ -71,26 +71,26 @@ {%if ActivityDefinition.subject is CodeableConcept %} {% if ActivityDefinition.subject.coding.exists() %} - {% for coding in ActivityDefinition.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 %} + {% for coding in ActivityDefinition.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 ActivityDefinition.subject.coding.exists().not and ActivityDefinition.subject.text.exists() %} - {{ActivityDefinition.subject.text}} + {{ActivityDefinition.subject.text}} {% endif %} {% endif %} @@ -133,20 +133,26 @@ {{ActivityDefinition.description.escape('html')}} {% endif %} - {% if ActivityDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} + {% if ActivityDefinition.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} - Knowledge Capability: - - {% for extension in ActivityDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %}{{extension.value}} {% endfor %} - + Knowledge Capability: + + {% for extension in ActivityDefinition.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %}{{extension.value}} {% + endfor %} + {% endif %} - {% if ActivityDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} + {% if ActivityDefinition.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} - Knowledge Representation Level: - - {% for extension in ActivityDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') %}{{extension.value}}{% endfor %} - + Knowledge Representation Level: + + {% for extension in ActivityDefinition.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') + %}{{extension.value}}{% endfor %} + {% endif %} {% if ActivityDefinition.useContext.exists() %} @@ -154,13 +160,17 @@ Use Context: - + + + + + {% for useContext in ActivityDefinition.useContext %} - + - + {% endfor %}
codevaluedisplay
codevaluedisplay
{{useContext.code.code}} {{(useContext.value as CodeableConcept).coding.first().code}} {{(useContext.value as CodeableConcept).coding.first().display.escape('html')}}
@@ -205,82 +215,98 @@ {% if ActivityDefinition.effectivePeriod.exists() %} Effective Period: - {{ActivityDefinition.effectivePeriod.start}}..{{ActivityDefinition.effectivePeriod.end}} + + {{ActivityDefinition.effectivePeriod.start}}..{{ActivityDefinition.effectivePeriod.end}} {% endif %} {% if ActivityDefinition.relatedArtifact.exists() %} - Related Artifacts: - - {% if ActivityDefinition.relatedArtifact.where(type = 'documentation' or type = 'justification').exists() %} -

Documentation

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

References

- - {% endif %} - {% if ActivityDefinition.relatedArtifact.where(type = 'depends-on').exists() %} -

Dependencies

- - {% endif %} - {% if ActivityDefinition.relatedArtifact.where(type = 'composed-of').exists() %} -

Components

- - {% endif %} - {% if ActivityDefinition.relatedArtifact.where(type = 'derived-from').exists() %} -

Derived From

- - {% endif %} - {% if ActivityDefinition.relatedArtifact.where(type = 'successor').exists() %} -

Successor

- - {% endif %} - {% if ActivityDefinition.relatedArtifact.where(type = 'predecessor').exists() %} -

Predecessor

- - {% endif %} - + Related Artifacts: + + {% if ActivityDefinition.relatedArtifact.where(type = 'documentation' or type = + 'justification').exists() %} +

Documentation

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

References

+ + {% endif %} + {% if ActivityDefinition.relatedArtifact.where(type = 'depends-on').exists() %} +

Dependencies

+ + + + + + {% for artifact in ActivityDefinition.relatedArtifact.where(type = 'depends-on') %} + + + + + {% endfor %} +
DisplayResource Identifier & Version
+ {{artifact.display}} + + {{artifact.resource}} +
+ {% endif %} + {% if ActivityDefinition.relatedArtifact.where(type = 'composed-of').exists() %} +

Components

+ + {% endif %} + {% if ActivityDefinition.relatedArtifact.where(type = 'derived-from').exists() %} +

Derived From

+ + {% endif %} + {% if ActivityDefinition.relatedArtifact.where(type = 'successor').exists() %} +

Successor

+ + {% endif %} + {% if ActivityDefinition.relatedArtifact.where(type = 'predecessor').exists() %} +

Predecessor

+ + {% endif %} + {% endif %} {% if ActivityDefinition.library.exists() %} - Libraries: - - - {% for library in ActivityDefinition.library %} - - {% endfor %} -
{{library}}
- + Libraries: + + + {% for library in ActivityDefinition.library %} + + + + {% endfor %} +
{{library}}
+ {% endif %} {% if ActivityDefinition.kind.exists() %} @@ -300,26 +326,26 @@ Type: {% if ActivityDefinition.code.coding.exists() %} - {% for coding in ActivityDefinition.code.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 %} + {% for coding in ActivityDefinition.code.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 ActivityDefinition.code.coding.exists().not and ActivityDefinition.code.text.exists() %} - {{ActivityDefinition.code.text}} + {{ActivityDefinition.code.text}} {% endif %} @@ -348,26 +374,26 @@ {%if ActivityDefinition.product is CodeableConcept %} {% if ActivityDefinition.product.coding.exists() %} - {% for coding in ActivityDefinition.product.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 %} + {% for coding in ActivityDefinition.product.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 ActivityDefinition.product.coding.exists().not and ActivityDefinition.product.text.exists() %} - {{ActivityDefinition.product.text}} + {{ActivityDefinition.product.text}} {% endif %} {% endif %} @@ -396,7 +422,7 @@ Quantity: - {{ActivityDefinition.quantity.value}} ({{ActivityDefinition.quantity.unit.escape('html')}})
+ {{ActivityDefinition.quantity.value}} ({{ActivityDefinition.quantity.unit.escape('html')}})
{% endif %} @@ -405,12 +431,15 @@ Body Site(s): - + + + + {% for bodySite in ActivityDefinition.bodySite %} - + - + {% endfor %}
codedisplay
codedisplay
{{bodySite.coding.first().code}} {{bodySite.coding.first().display.escape('html')}}
@@ -420,13 +449,13 @@ Dynamic Values: - {% for dynamicValue in ActivityDefinition.dynamicValue %} + {% for dynamicValue in ActivityDefinition.dynamicValue %}
  • - {{dynamicValue.path}}: ({{dynamicValue.expression.expression.escape('html')}})
    + {{dynamicValue.path}}: ({{dynamicValue.expression.expression.escape('html')}})
  • - {% endfor %} + {% endfor %} {% endif %} - + \ No newline at end of file diff --git a/templates/liquid/Library.liquid b/templates/liquid/Library.liquid index ba38232..8432c45 100644 --- a/templates/liquid/Library.liquid +++ b/templates/liquid/Library.liquid @@ -258,12 +258,20 @@ {% endif %} {% if Library.relatedArtifact.where(type = 'depends-on').exists() %} -

    Dependencies

    - +

    Dependencies

    + + + {% for artifact in Library.relatedArtifact.where(type = 'depends-on') %} + + + + + {% endfor %} +
    DisplayResource Identifier & Version
    + {{artifact.display}} + + {{artifact.resource}} +
    {% endif %} {% if Library.relatedArtifact.where(type = 'composed-of').exists() %}

    Components

    diff --git a/templates/liquid/Measure.liquid b/templates/liquid/Measure.liquid index 99f173a..a41a71e 100644 --- a/templates/liquid/Measure.liquid +++ b/templates/liquid/Measure.liquid @@ -1,716 +1,842 @@
    {% if Measure.id.exists() %} - - - - - - - - + + + + + + + + {% endif %} {% if Measure.url.exists() %} - - - - + + + + {% endif %} {% if Measure.version.exists() %} - - - - + + + + {% endif %} {% for identifier in Measure.identifier %} - - - - + + + + {% endfor %} {% if Measure.name.exists() %} - - - - + + + + {% endif %} {% if Measure.title.exists() %} - - - - + + + + {% endif %} {% if Measure.subtitle.exists() %} - - - - + + + + {% endif %} {% if Measure.status.exists() %} - - - - + + + + {% endif %} {% if Measure.experimental.exists() %} - - - - + + + + {% endif %} {% if Measure.scoring.exists() %} - - - - + + + + {% endif %} {% if Measure.improvementNotation.exists() %} - - - - + + + + {% endif %} {% if Measure.type.exists() %} - - - - + + + + {% endif %} {% if Measure.subject.exists() %} - - - {%if Measure.subject is CodeableConcept %} - + + + {%if Measure.subject is CodeableConcept %} + + {% if coding.code.exists() %} +

    + code: {{coding.code}} +

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

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

    + {% endif %} + {% endfor %} + {% endif %} + {% if Measure.subject.coding.exists().not and Measure.subject.text.exists() %} + {{Measure.subject.text}} {% endif %} - + + {% endif %} + {% if Measure.subject is Reference %} + + {% endif %} + {% endif %} {% if Measure.date.exists() %} - - - - + + + + {% endif %} {% if Measure.publisher.exists() %} - - - - + + + + {% endif %} {% if Measure.description.exists() %} - - - - + + + + {% endif %} {% if Measure.group.exists() %} - {% if Measure.group[0].population.description.exists() %} - - - - - {% endif %} - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} - - - - - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} - - - - - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements').exists() %} - {% for contained in Measure.contained.where(id = 'effective-data-requirements') %} - - - - - - - + + {% if contained.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode').exists() %} + + + + + {% endif %} + {% if contained.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() %} + + + + + {% endif %} + {% endfor %} {% else %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement').exists() %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-parameter').exists() %} - - - + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement').exists() %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-parameter').exists() %} + + + + + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement').exists() %} + + + + + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode').exists() %} + + + + + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() %} + + + + + {% endif %} + {% endif %} {% endif %} {% if Measure.supplementalData.exists() %} - - - - + + + + {% endif %} {% if Measure.useContext.exists() %} - - - - + + + + {% endif %} {% if Measure.jurisdiction.exists() %} - - - - + + + + {% endif %} {% if Measure.topic.exists() %} - - - - + + + + {% endif %} {% if Measure.purpose.exists() %} - - - - + + + + {% endif %} {% if Measure.usage.exists() %} - - - - + + + + {% endif %} {% if Measure.copyright.exists() %} - - - - + + + + {% endif %} {% if Measure.disclaimer.exists() %} - - - - + + + + {% endif %} {% if Measure.approvalDate.exists() %} - - - - + + + + {% endif %} {% if Measure.lastReviewDate.exists() %} - - - - + + + + {% endif %} {% if Measure.effectivePeriod.exists() %} - - - - + + + + {% endif %} {% if Measure.relatedArtifact.exists() %} - - - - + + + + {% endif %} {% if Measure.parameter.exists() %} - - - - + + + + {% endif %} {% if Measure.dataRequirement.exists() %} - - - - + + + + {% endif %} {% for c in Measure.content %} - {% if c.contentType = 'text/cql' %} - - - - {% endif %} - {% if c.contentType != 'text/cql' %} - - - - {% endif %} + {% if c.contentType = 'text/cql' %} + + + + {% endif %} + {% if c.contentType != 'text/cql' %} + + + + {% endif %} {% endfor %} {% if Measure.library.exists() %} - - - - + + + + {% endif %}
    Id: {{Measure.id}}
    Download cql: Library-{{Measure.id}}.cql
    Id: {{Measure.id}}
    Download cql: Library-{{Measure.id}}.cql
    Url: {{Measure.url}}
    Url: {{Measure.url}}
    Version: {{Measure.version}}
    Version: {{Measure.version}}
    Identifier: - {% if identifier.type.exists() %} -

    - type: {{identifier.type.value}} -

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

    - value: {{identifier.value}} -

    - {% endif %} -
    Identifier: + {% if identifier.type.exists() %} +

    + type: {{identifier.type.value}} +

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

    + value: {{identifier.value}} +

    + {% endif %} +
    Name: {{Measure.name}}
    Name: {{Measure.name}}
    Title: {{Measure.title.escape('html')}}
    Title: {{Measure.title.escape('html')}}
    Subtitle: {{Measure.subtitle.escape('html')}}
    Subtitle: {{Measure.subtitle.escape('html')}}
    Status: {{Measure.status.value}}
    Status: {{Measure.status.value}}
    Experimental: {{Measure.experimental.value}}
    Experimental: {{Measure.experimental.value}}
    Scoring: - {% if Measure.scoring.coding.exists() %} - {% for coding in Measure.scoring.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 Measure.scoring.coding.exists().not and Measure.scoring.text.exists() %} - {{Measure.scoring.text}} - {% endif %} -
    Scoring: + {% if Measure.scoring.coding.exists() %} + {% for coding in Measure.scoring.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 Measure.scoring.coding.exists().not and Measure.scoring.text.exists() %} + {{Measure.scoring.text}} + {% endif %} +
    Improvement Notation: - {% if Measure.improvementNotation.coding.exists() %} - {% for coding in Measure.improvementNotation.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 Measure.improvementNotation.coding.exists().not and Measure.improvementNotation.text.exists() %} - {{Measure.improvementNotation.text}} - {% endif %} -
    Improvement Notation: + {% if Measure.improvementNotation.coding.exists() %} + {% for coding in Measure.improvementNotation.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 Measure.improvementNotation.coding.exists().not and Measure.improvementNotation.text.exists() %} + {{Measure.improvementNotation.text}} + {% endif %} +
    Type: - {% if Measure.type.coding.exists() %} - {% for coding in Measure.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 Measure.type.coding.exists().not and Measure.type.text.exists() %} - {{Measure.type.text}} - {% endif %} -
    Type: + {% if Measure.type.coding.exists() %} + {% for coding in Measure.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 Measure.type.coding.exists().not and Measure.type.text.exists() %} + {{Measure.type.text}} + {% endif %} +
    Subject: - {% if Measure.subject.coding.exists() %} - {% for coding in Measure.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 Measure.subject.coding.exists().not and Measure.subject.text.exists() %} - {{Measure.subject.text}} - {% endif %} -
    Subject: + {% if Measure.subject.coding.exists() %} + {% for coding in Measure.subject.coding %} + {% if coding.system.exists() %} +

    + system: {{coding.system}} +

    {% endif %} - {% if Measure.subject is Reference %} -
    - {% if Measure.subject.reference.exists() %} -

    - reference: {{Measure.subject.reference}} -

    - {% endif %} - {% if Measure.subject.type.exists() %} -

    - type: {{Measure.subject.type}} -

    - {% endif %} - {% if Measure.subject.display.exists() %} -

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

    - {% endif %} -
    + {% if Measure.subject.reference.exists() %} +

    + reference: {{Measure.subject.reference}} +

    + {% endif %} + {% if Measure.subject.type.exists() %} +

    + type: {{Measure.subject.type}} +

    + {% endif %} + {% if Measure.subject.display.exists() %} +

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

    + {% endif %} +
    Date: {{Measure.date}}
    Date: {{Measure.date}}
    Publisher: {{Measure.publisher.escape('html')}}
    Publisher: {{Measure.publisher.escape('html')}}
    Description: {{Measure.description.escape('html')}}
    Description: {{Measure.description.escape('html')}}
    Population Criteria: - {% for group in Measure.group %} - - {% if group.id.exists() %} - - - - {% endif %} - {% for population in group.population %} - - - - - {% endfor %} -
    {{group.id}}
    {{population.code.coding[0].display}}: {{population.description}}
    - {% endfor %} -
    Knowledge Capability: - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %}{{extension.value}} {% endfor %} -
    Knowledge Representation Level: - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') %}{{extension.value}}{% endfor %} -
    Related Artifact Dependencies: - {% for relatedArtifact in contained.relatedArtifact.where(type= 'depends-on') %} -
  • {{relatedArtifact.resource}}
  • - {% endfor %} -
    Parameters: - - - {% for parameter in contained.parameter %} - - - - - - - + {% if Measure.group[0].population.description.exists() %} + + + + + {% endif %} + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} + + + + + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} + + + + + {% endif %} + {% if Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements').exists() %} + {% for contained in Measure.contained.where(id = 'effective-data-requirements') %} + + + + + + + + + + + - - - - - - {% if contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode').exists() %} - - - + - {% endif %} - {% if contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() %} - - -
    nameuseminmaxtype
    {{parameter.name}}{{parameter.use}}{{parameter.min}}{{parameter.max}}{{parameter.type}}
    Population Criteria: + {% for group in Measure.group %} + + {% if group.id.exists() %} + + + + {% endif %} + {% for population in group.population %} + + + + + {% endfor %} +
    {{group.id}}
    {{population.code.coding[0].display}}: {{population.description}}
    + {% endfor %} +
    Knowledge Capability: + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %}{{extension.value}} {% + endfor %} +
    Knowledge Representation Level: + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') + %}{{extension.value}}{% endfor %} +
    Related Artifact Dependencies: + + + + + + {% for relatedArtifact in contained.relatedArtifact.where(type= 'depends-on') %} + + + + + {% endfor %} +
    DisplayResource Identifier & Version
    + {{relatedArtifact.display}} + + {{relatedArtifact.resource}} +
    +
    Parameters: + + + + + + + + + {% for parameter in contained.parameter %} + + + + + + + + {% endfor %} +
    nameuseminmaxtype
    {{parameter.name}}{{parameter.use}}{{parameter.min}}{{parameter.max}}{{parameter.type}}
    +
    DataRequirements: + + + + + + + + {% for dataRequirement in contained.dataRequirement %} + + +
    TypeMust SupportValueset NameValueset
    {{dataRequirement.type}} + {% for mustSupport in dataRequirement.mustSupport %} + {{ mustSupport }} {% endfor %} -
    -
    DataRequirements: - - - {% for dataRequirement in contained.dataRequirement %} - - - - - - + +
    TypeMust SupportValueset NameValueset
    {{dataRequirement.type}} - {% for mustSupport in dataRequirement.mustSupport %} - {{ mustSupport }} - {% endfor %} - - {% for relatedArtifact in contained.relatedArtifact.where(resource = dataRequirement.codeFilter.first().valueSet) %} - {% if relatedArtifact.display.startsWith("Value set ") %} - {{ relatedArtifact.display.substring(9).replace(' &', ',') }} - {% else %} - {{ relatedArtifact.display.replace(' &', ',') }} - {% endif %} - {% endfor %} - {{dataRequirement.codeFilter.first().valueSet}}
    + {% for relatedArtifact in contained.relatedArtifact.where(resource = + dataRequirement.codeFilter.first().valueSet) %} + {% if relatedArtifact.display.startsWith("Value set ") %} + {{ relatedArtifact.display.substring(9).replace(' &', ',') }} + {% else %} + {{ relatedArtifact.display.replace(' &', ',') }} + {% endif %} {% endfor %} -
    -
    Direct Reference Codes: - - - {% for extension in contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %} - - - - - - {% endfor %} -
    displaycodesystem
    {{extension.valueCoding.display.escape('html')}}{{extension.valueCoding.code}}{{extension.valueCoding.version}}
    {{dataRequirement.codeFilter.first().valueSet}}
    Logic Definitions: - - {% for extension in contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition') %} - - - {% for lNameExtension in extension.extension.where(url = 'libraryName') %} - - {% endfor %} - {% for nameExtension in extension.extension.where(url = 'name') %} - - {% endfor %} - {% if extension.extension.where(url = 'displaySequence').exists() %} - {% for sequenceExtension in extension.extension.where(url = 'displaySequence') %} - - {% endfor %} - {% else %} - {% endif %} - - - {% for statementExtension in extension.extension.where(url = 'statement') %} - - - {% endfor %} - - {% endfor %} -
    Library NameNamesequence
    {{lNameExtension.value}}{{nameExtension.value}}{{sequenceExtension.value}}{{nameExtension.value}}
    {{statementExtension.value.escape('html')}}
    + {% endfor %} +
    +
    Direct Reference Codes: + + + + + + + {% for extension in contained.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %} + + + + + + {% endfor %} +
    displaycodesystem
    {{extension.valueCoding.display.escape('html')}}{{extension.valueCoding.code}}{{extension.valueCoding.version}}
    +
    Logic Definitions: + + {% for extension in contained.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition') %} + + + + + + + {% for lNameExtension in extension.extension.where(url = 'libraryName') %} + + {% endfor %} + {% for nameExtension in extension.extension.where(url = 'name') %} + + {% endfor %} + {% if extension.extension.where(url = 'displaySequence').exists() %} + {% for sequenceExtension in extension.extension.where(url = 'displaySequence') %} + + {% endfor %} + {% else %} + {% endif %} + + + {% for statementExtension in extension.extension.where(url = 'statement') %} + + + {% endfor %} - {% endif %} - {% endfor %} + {% endfor %} +
    Library NameNamesequence
    {{lNameExtension.value}}{{nameExtension.value}}{{sequenceExtension.value}}{{nameExtension.value}}
    +
    {{statementExtension.value.escape('html')}}
    +
    Parameters: - - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-parameter') %} - - - - - - - - {% endfor %} -
    nameuseminmaxtype
    {{extension.valueParameterDefinition.name}}{{extension.valueParameterDefinition.use}}{{extension.valueParameterDefinition.min}}{{extension.valueParameterDefinition.max}}{{extension.valueParameterDefinition.type}}
    -
    Parameters: + + + + + + + - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement').exists() %} - - - + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-parameter') %} + + + + + + - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode').exists() %} - - - + {% endfor %} +
    nameuseminmaxtype
    Data Requirements: - - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement') %} - - - - {% if extension.valueDataRequirement.codeFilter.first().valueSet.exists() %} - - - {% endif%} - {% if extension.valueDataRequirement.codeFilter.first().code.exists() %} - - - {% endif%} - - {% endfor %} -
    typepathvalueSet or systemcode
    {{extension.valueDataRequirement.type}}{{extension.valueDataRequirement.codeFilter.first().path}}{{extension.valueDataRequirement.codeFilter.first().valueSet}}{{extension.valueDataRequirement.codeFilter.first().code.first().version}}{{extension.valueDataRequirement.codeFilter.first().code.first().code}}
    -
    {{extension.valueParameterDefinition.name}}{{extension.valueParameterDefinition.use}}{{extension.valueParameterDefinition.min}}{{extension.valueParameterDefinition.max}}{{extension.valueParameterDefinition.type}}
    Direct Reference Codes: - - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %} - - - - - - {% endfor %} -
    displaycodesystem
    {{extension.valueCoding.display.escape('html')}}{{extension.valueCoding.code}}{{extension.valueCoding.version}}
    -
    +
    Data Requirements: + + + + + + - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() %} - - - + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement') %} + + + + {% if extension.valueDataRequirement.codeFilter.first().valueSet.exists() %} + + + {% endif%} + {% if extension.valueDataRequirement.codeFilter.first().code.exists() %} + + + {% endif%} - {% endif %} - {% endif %} + {% endfor %} +
    typepathvalueSet or systemcode
    Logic Definitions: - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition') %} - - - - {% for lNameExtension in extension.extension.where(url = 'libraryName') %} - - {% endfor %} - {% for nameExtension in extension.extension.where(url = 'name') %} - - {% endfor %} - {% for sequenceExtension in extension.extension.where(url = 'sequence') %} - - {% endfor %} - -
    Library NameNamesequence
    {{lNameExtension.value}}{{nameExtension.value}}{{sequenceExtension.value}}
    - {% for statementExtension in extension.extension.where(url = 'statement') %} -
    {{statementExtension.value.escape('html')}}
    - {% endfor %} -

    - {% endfor %} -
    {{extension.valueDataRequirement.type}}{{extension.valueDataRequirement.codeFilter.first().path}}{{extension.valueDataRequirement.codeFilter.first().valueSet}}{{extension.valueDataRequirement.codeFilter.first().code.first().version}}{{extension.valueDataRequirement.codeFilter.first().code.first().code}}
    +
    Direct Reference Codes: + + + + + + + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %} + + + + + + {% endfor %} +
    displaycodesystem
    {{extension.valueCoding.display.escape('html')}}{{extension.valueCoding.code}}{{extension.valueCoding.version}}
    +
    Logic Definitions: + {% for extension in Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition') %} + + + + + + + + {% for lNameExtension in extension.extension.where(url = 'libraryName') %} + + {% endfor %} + {% for nameExtension in extension.extension.where(url = 'name') %} + + {% endfor %} + {% for sequenceExtension in extension.extension.where(url = 'sequence') %} + + {% endfor %} + +
    Library NameNamesequence
    {{lNameExtension.value}}{{nameExtension.value}}{{sequenceExtension.value}}
    + {% for statementExtension in extension.extension.where(url = 'statement') %} +
    {{statementExtension.value.escape('html')}}
    + {% endfor %} +

    + {% endfor %} +
    Supplemental Data: - - - {% for supplementalData in Measure.supplementalData %} - - - - - {% endfor %} -
    expressionsystem
    {{supplementalData.criteria.expression}}{{(supplementalData.usage.first() as CodeableConcept).coding.first().system}}
    -
    Supplemental Data: + + + + + + {% for supplementalData in Measure.supplementalData %} + + + + + {% endfor %} +
    expressionsystem
    {{supplementalData.criteria.expression}}{{(supplementalData.usage.first() as CodeableConcept).coding.first().system}}
    +
    Use Context: - - - {% for useContext in Measure.useContext %} - - - - - {% endfor %} -
    codevalue
    {{useContext.code.code}}{{(useContext.valueCodeableConcept).text}}
    -
    Use Context: + + + + + + {% for useContext in Measure.useContext %} + + + + + {% endfor %} +
    codevalue
    {{useContext.code.code}}{{(useContext.valueCodeableConcept).text}}
    +
    Jurisdiction: {{Measure.jurisdiction.first().coding.first().code}}
    Jurisdiction: {{Measure.jurisdiction.first().coding.first().code}}
    Topic: {{Measure.topic.first().coding.first().code}}
    Topic: {{Measure.topic.first().coding.first().code}}
    Purpose: {{Measure.purpose.escape('html')}}
    Purpose: {{Measure.purpose.escape('html')}}
    Usage: {{Measure.usage.escape('html')}}
    Usage: {{Measure.usage.escape('html')}}
    Copyright: {{Measure.copyright.escape('html')}}
    Copyright: {{Measure.copyright.escape('html')}}
    Disclaimer: {{Measure.disclaimer.escape('html')}}
    Disclaimer: {{Measure.disclaimer.escape('html')}}
    Approval Date: {{Measure.approvalDate}}
    Approval Date: {{Measure.approvalDate}}
    Last Review Date: {{Measure.lastReviewDate}}
    Last Review Date: {{Measure.lastReviewDate}}
    Effective Period: {{Measure.effectivePeriod.start}}..{{Measure.effectivePeriod.end}}
    Effective Period: {{Measure.effectivePeriod.start}}..{{Measure.effectivePeriod.end}}
    Related Artifacts: - {% if Measure.relatedArtifact.where(type = 'documentation' or type = 'justification').exists() %} -

    Documentation

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

    References

    -
      - {% for artifact in Measure.relatedArtifact.where(type = 'citation') %} -
    • {{artifact.citation}}
      {{artifact.url}}
    • - {% endfor %} -
    - {% endif %} - {% if Measure.relatedArtifact.where(type = 'depends-on').exists() and - Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements').exists().not %} -

    Dependencies

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

    Components

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

    Derived From

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

    Successor

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

    Predecessor

    -
      - {% for artifact in Measure.relatedArtifact.where(type = 'predecessor') %} -
    • {{artifact.resource}}
    • - {% endfor %} -
    - {% endif %} -
    Related Artifacts: + {% if Measure.relatedArtifact.where(type = 'documentation' or type = 'justification').exists() %} +

    Documentation

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

    References

    +
      + {% for artifact in Measure.relatedArtifact.where(type = 'citation') %} +
    • {{artifact.citation}}
      {{artifact.url}}
    • + {% endfor %} +
    + {% endif %} + {% if Measure.relatedArtifact.where(type = 'depends-on').exists() and + Measure.extension.where(url = + 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements').exists().not %} +

    Dependencies

    + + + + + + {% for artifact in Measure.relatedArtifact.where(type = 'depends-on') %} + + + + + {% endfor %} +
    DisplayResource Identifier & Version
    + {{artifact.display}} + + {{artifact.resource}} +
    + {% endif %} + {% if Measure.relatedArtifact.where(type = 'composed-of').exists() %} +

    Components

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

    Derived From

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

    Successor

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

    Predecessor

    +
      + {% for artifact in Measure.relatedArtifact.where(type = 'predecessor') %} +
    • {{artifact.resource}}
    • + {% endfor %} +
    + {% endif %} +
    Parameters: - - - {% for param in Measure.parameter %} - - {% endfor %} -
    NameTypeMinMaxIn/Out
    {{param.name}}{{param.type}}{{param.min}}{{param.max}}{{param.use}}
    -
    Parameters: + + + + + + + + + {% for param in Measure.parameter %} + + + + + + + + {% endfor %} +
    NameTypeMinMaxIn/Out
    {{param.name}}{{param.type}}{{param.min}}{{param.max}}{{param.use}}
    +
    Data Requirements: - - - {% for requirement in Measure.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 %} -
    -
    Data Requirements: + + + + + + + + {% for requirement in Measure.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').escape('html')}}
    -
    - - - -
    Content: {{c.contentType}}
    {{'Encoded data (' + c.data.length().toString() + ' characters)'}}
    -
    + + + + + + + +
    Content: {{c.contentType}}
    +
    {{c.data.decode('base64').escape('html')}}
    +
    +
    + + + + + + + +
    Content: {{c.contentType}}
    +
    {{'Encoded data (' + c.data.length().toString() + ' characters)'}}
    +
    +
    Libraries: - - {% for library in Measure.library %} - - {% endfor %} -
    {{library}}
    -
    Libraries: + + {% for library in Measure.library %} + + + + {% endfor %} +
    {{library}}
    +
    -
    + \ No newline at end of file diff --git a/templates/liquid/PlanDefinition.liquid b/templates/liquid/PlanDefinition.liquid index 72e1bf0..51ad236 100644 --- a/templates/liquid/PlanDefinition.liquid +++ b/templates/liquid/PlanDefinition.liquid @@ -1,397 +1,438 @@
    - - {% if PlanDefinition.id.exists() %} - - - - +
    Id: {{PlanDefinition.id}}
    + {% if PlanDefinition.id.exists() %} + + + + + {% endif %} + {% if PlanDefinition.url.exists() %} + + + + + {% endif %} + {% if PlanDefinition.version.exists() %} + + + + + {% endif %} + {% for identifier in PlanDefinition.identifier %} + + + - - - + {% if identifier.value.exists() %} +

    + value: {{identifier.value}} +

    {% endif %} - {% if PlanDefinition.version.exists() %} - - - - + + + {% 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() %} + + + - - - - {% endfor %} - {% if PlanDefinition.name.exists() %} - - - - + {% if coding.code.exists() %} +

    + code: {{coding.code}} +

    {% endif %} - {% if PlanDefinition.title.exists() %} - - - - + {% if coding.display.exists() %} +

    + display: {{coding.display}} +

    {% endif %} - {% if PlanDefinition.subtitle.exists() %} - - - - + {% endfor %} {% endif %} - {% if PlanDefinition.status.exists() %} - - - - + {% if PlanDefinition.type.coding.exists().not and PlanDefinition.type.text.exists() %} + {{PlanDefinition.type.text}} {% endif %} - {% if PlanDefinition.experimental.exists() %} - - - - + + + {% endif %} + {% if PlanDefinition.subject.exists() %} + + + {%if PlanDefinition.subject is CodeableConcept %} + - - - - {% endif %} - {% if PlanDefinition.subject.exists() %} - - - {%if PlanDefinition.subject is CodeableConcept %} - - {% endif %} - {% if PlanDefinition.subject is Reference %} - - {% endif %} - + {% if coding.code.exists() %} +

    + code: {{coding.code}} +

    {% endif %} - {% if PlanDefinition.date.exists() %} - - - - + {% if coding.display.exists() %} +

    + display: {{coding.display}} +

    {% endif %} - {% if PlanDefinition.publisher.exists() %} - - - - + {% endfor %} {% endif %} - {% if PlanDefinition.description.exists() %} - - - - + {% if PlanDefinition.subject.coding.exists().not and PlanDefinition.subject.text.exists() %} + {{PlanDefinition.subject.text}} {% endif %} - {% if PlanDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability').exists() %} - - - - + + {% endif %} + {% if PlanDefinition.subject is Reference %} + - - - + {% if PlanDefinition.subject.type.exists() %} +

    + type: {{PlanDefinition.subject.type}} +

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

    + code: {{PlanDefinition.subject.display}} +

    {% endif %} - {% if PlanDefinition.jurisdiction.exists() %} - - - - + + {% 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() %} + + + - - - + {% if PlanDefinition.relatedArtifact.where(type = 'citation').exists() %} +

    References

    + {% endif %} - {% if PlanDefinition.usage.exists() %} - - - - + {% if PlanDefinition.relatedArtifact.where(type = 'depends-on').exists() %} +

    Dependencies

    +
    Id: {{PlanDefinition.id}}
    Url: {{PlanDefinition.url}}
    Version: {{PlanDefinition.version}}
    Identifier: + {% if identifier.type.exists() %} +

    + type: {{identifier.type.value}} +

    {% endif %} - {% if PlanDefinition.url.exists() %} -
    Url: {{PlanDefinition.url}}
    Version: {{PlanDefinition.version}}
    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 %} - {% for identifier in PlanDefinition.identifier %} -
    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}}
    Subject: + {% if PlanDefinition.subject.coding.exists() %} + {% for coding in PlanDefinition.subject.coding %} + {% if coding.system.exists() %} +

    + system: {{coding.system}} +

    {% endif %} - {% if PlanDefinition.type.exists() %} -
    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 %} -
    + {% if PlanDefinition.subject.reference.exists() %} +

    + reference: {{PlanDefinition.subject.reference}} +

    {% endif %} - {% if PlanDefinition.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel').exists() %} -
    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}}
    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.purpose.exists() %} -
    Purpose: {{PlanDefinition.purpose.escape('html')}}
    Usage: {{PlanDefinition.usage.escape('html')}}
    + + + + + {% for artifact in PlanDefinition.relatedArtifact.where(type = 'depends-on') %} + + + + + {% endfor %} +
    DisplayResource Identifier & Version
    + {{artifact.display}} + + {{artifact.resource}} +
    {% endif %} - {% if PlanDefinition.copyright.exists() %} - - Copyright: - {{PlanDefinition.copyright.escape('html')}} - + {% if PlanDefinition.relatedArtifact.where(type = 'composed-of').exists() %} +

    Components

    + {% endif %} - {% if PlanDefinition.approvalDate.exists() %} - - Approval Date: - {{PlanDefinition.approvalDate}} - + {% if PlanDefinition.relatedArtifact.where(type = 'derived-from').exists() %} +

    Derived From

    + {% endif %} - {% if PlanDefinition.lastReviewDate.exists() %} - - Last Review Date: - {{PlanDefinition.lastReviewDate}} - + {% if PlanDefinition.relatedArtifact.where(type = 'successor').exists() %} +

    Successor

    + {% endif %} - {% if PlanDefinition.effectivePeriod.exists() %} - - Effective Period: - {{PlanDefinition.effectivePeriod.start}}..{{PlanDefinition.effectivePeriod.end}} - - {% endif %} - {% if PlanDefinition.relatedArtifact.exists() %} - - Related Artifacts: - - {% if PlanDefinition.relatedArtifact.where(type = 'documentation' or type = 'justification').exists() %} -

    Documentation

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

    References

    - - {% endif %} - {% if PlanDefinition.relatedArtifact.where(type = 'depends-on').exists() %} -

    Dependencies

    - - {% endif %} - {% if PlanDefinition.relatedArtifact.where(type = 'composed-of').exists() %} -

    Components

    - - {% endif %} - {% if PlanDefinition.relatedArtifact.where(type = 'derived-from').exists() %} -

    Derived From

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

    Successor

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

    Predecessor

    - - {% endif %} - - + {% if PlanDefinition.relatedArtifact.where(type = 'predecessor').exists() %} +

    Predecessor

    + {% endif %} + + + {% endif %} - {% if PlanDefinition.library.exists() %} - - Libraries: - - - {% for library in PlanDefinition.library %} - - {% endfor %} -
    {{library}}
    - - - {% endif %} + {% if PlanDefinition.library.exists() %} + + Libraries: + + + {% for library in PlanDefinition.library %} + + + + {% endfor %} +
    {{library}}
    + + + {% endif %} - {% if PlanDefinition.action.exists() %} - - Actions: - - - {% for action in PlanDefinition.action %} + {% if PlanDefinition.action.exists() %} + + + - - {% endif %} -
    Actions: + + {% for action in PlanDefinition.action %} + +
    + {% 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.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:
    + 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')}})
    + {{dynamicValue.path}}: ({{dynamicValue.expression.expression.escape('html')}})
    {% endfor %} - {% endif %} - {% endif %} + {% 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 %} + + + {% endfor %} + + + + {% endif %} + + \ No newline at end of file