diff --git a/src/main/resources/templates/Measure.liquid b/src/main/resources/templates/Measure.liquid index c15e8fe..8ea66df 100644 --- a/src/main/resources/templates/Measure.liquid +++ b/src/main/resources/templates/Measure.liquid @@ -1,1027 +1,8 @@ -
- - {% if Measure.title.exists() %} - - - - - {% endif %} - - {% if Measure.subtitle.exists() %} - - - - - {% endif %} - - {% if Measure.id.exists() %} - - - - - {% endif %} - - {% if Measure.version.exists() %} - - - - - {% endif %} - - {% if Measure.url.exists() %} - - - - - {% endif %} - - {% for identifier in Measure.identifier %} - - - - - - {% endfor %} - - {% if Measure.effectivePeriod.exists() %} - - - - - {% endif %} - - {% if Measure.status.exists() and Measure.status.value != 'active' %} - - - - - {% endif %} - - {% if Measure.experimental.exists() and Measure.experimental.value = 'true' %} - - - - - {% endif %} - - {% if Measure.publisher.exists() %} - - - - - {% endif %} - - {% if Measure.author.exists() and Measure.author.name.exists() %} - - - - - {% endif %} - - {% if Measure.endorser.exists() and Measure.endorser.name.exists() %} - - - - - {% endif %} - - {% if Measure.description.exists() %} - - - - - {% 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.useContext.exists() %} - - - - - {% endif %} - - {% if Measure.jurisdiction.exists() %} - - - - - {% endif %} - - {% if Measure.topic.exists() %} - - - - - {% endif %} - - {% if Measure.purpose.exists() %} - - - - - {% endif %} - - {% if Measure.copyright.exists() %} - - - - - {% endif %} - - {% if Measure.disclaimer.exists() %} - - - - - {% endif %} - - {% if Measure.subject.exists() %} - - - {% if Measure.subject is CodeableConcept %} - - {% endif %} - {% if Measure.subject is Reference %} - - {% endif %} - - {% endif %} - - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis').exists() %} - - - - - {% endif %} - - {% if Measure.scoring.exists() %} - - - - - {% endif %} - - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit').exists() %} - - - - - {% endif %} - - {% if Measure.type.exists() %} - - - - - {% endif %} - - {% if Measure.riskAdjustment.exists() %} - - - - - {% endif %} - - {% if Measure.rateAggregation.exists() %} - - - - - {% endif %} - - {% if Measure.rationale.exists() %} - - - - - {% endif %} - - {% if Measure.clinicalRecommendationStatement.exists() %} - - - - - {% endif %} - - {% if Measure.improvementNotation.exists() %} - - - - - {% endif %} - - {% if Measure.usage.exists() %} - - - - - {% endif %} - - {% if Measure.group.exists() %} - {% if Measure.group[0].population.description.exists() %} - - - - - {% endif %} - {% endif %} - - {% if Measure.supplementalData.usage.coding.where(code = 'supplemental-data').exists() %} - - - - - {% endif %} - - {% if Measure.supplementalData.usage.coding.where(code = 'risk-adjustment-factor').exists() %} - - - - - {% endif %} - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance') %} - - - - - {% endfor %} - - {% if Measure.library.exists() %} - - - - - {% endif %} - - {% if Measure.relatedArtifact.exists() %} - - - - - {% endif %} - - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements').exists() or - Measure.extension.where(url = 'http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements').exists() %} - {% for contained in Measure.contained.where(id.contains('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/StructureDefinition/cqf-directReferenceCode').exists() %} - - - - - {% endif %} - - {% if contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() or - contained.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/cqf-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() %} - - - - - {% 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.group.exists() %} - - - - - {% endif %} - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition').exists() %} - - - - - {% endif %} - {% endif %} - {% endif %} - -
Title: {{Measure.title}}
Subtitle: {{Measure.subtitle}}
Id: {{Measure.id}}
Version: {{Measure.version}}
Url: {{Measure.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 %} -
Effective Period: {{Measure.effectivePeriod.start}}..{{Measure.effectivePeriod.end}}
Status: {{Measure.status.value}}
Experimental: {{Measure.experimental.value}}
Publisher: {{Measure.publisher}}
Author: {{Measure.author.name}}
Endorser: {{Measure.endorser.name}}
Description: {{Measure.description}}
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 %} -
Use Context: - - - - - - {% for useContext in Measure.useContext %} - - - - - {% endfor %} -
codevalue
{{useContext.code.code}}{{useContext.value.text}}
-
Jurisdiction: {{Measure.jurisdiction.first().coding.first().code}}
Topic: {{Measure.topic.first().coding.first().code}}
Purpose: {{Measure.purpose}}
Copyright: {{Measure.copyright}}
Disclaimer: {{Measure.disclaimer}}
Subject: - {% if Measure.subject.coding.exists() %} - {% for coding in Measure.subject.coding %} -

- {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system.exists(), '(' + coding.system + ')', '')}} -

- {% endfor %} - {% endif %} - {% if Measure.subject.coding.exists().not() and Measure.subject.text.exists() %} - {{Measure.subject.text}} - {% 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}} -

- {% endif %} -
Basis: - {{Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis').first().value}} -
Scoring: - {% if Measure.scoring.coding.exists() %} - {% for coding in Measure.scoring.coding %} -

- {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://terminology.hl7.org/CodeSystem/measure-scoring', '(' + coding.system + ')', '')}} -

- {% endfor %} - {% endif %} - {% if Measure.scoring.coding.exists().not() and Measure.scoring.text.exists() %} - {{Measure.scoring.text}} - {% endif %} -
Scoring unit: - {% for scoringUnit in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit') %} - {% if scoringUnit.coding.exists() %} - {% for coding in scoringUnit.coding %} -

- {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://unitsofmeasure.org', '(' + coding.system + ')', '')}} -

- {% endfor %} - {% endif %} - {% if scoringUnit.coding.exists().not() and scoringUnit.text.exists() %} - {{scoringUnit.text}} - {% endif %} - {% endfor %} -
Type: - {% if Measure.type.coding.exists() %} - {% for coding in Measure.type.coding %} -

- {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://terminology.hl7.org/CodeSystem/measure-type', '(' + coding.system + ')', '')}} -

- {% endfor %} - {% endif %} - {% if Measure.type.coding.exists().not() and Measure.type.text.exists() %} - {{Measure.type.text}} - {% endif %} -
Risk Adjustment: {{Measure.riskAdjustment}}
Rate Aggregation: {{Measure.rateAggregation}}
Rationale: {{Measure.rationale}}
Clinical recommendation statement: {{Measure.clinicalRecommendationStatement}}
Improvement Notation: - {% if Measure.improvementNotation.coding.exists() %} - {% for coding in Measure.improvementNotation.coding %} -

- {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://terminology.hl7.org/CodeSystem/measure-improvement-notation', '(' + coding.system + ')', '')}} -

- {% endfor %} - {% endif %} - {% if Measure.improvementNotation.coding.exists().not() and Measure.improvementNotation.text.exists() %} - {{Measure.improvementNotation.text}} - {% endif %} -
Guidance (Usage): {{Measure.usage}}
Population Criteria: - {% for group in Measure.group %} - - {% if group.id.exists() %} - - - - {% endif %} - {% for population in group.population %} - - - - {% if population.criteria.expression.exists().not() %} - - {% else %} - {% if population.description.exists() %} - - {% else %} - - {% endif %} - {% endif %} - - - {% endfor %} - {% if group.stratifier.exists() %} - Stratifier Criteria: - {% for stratifier in group.stratifier %} - - {% if stratifier.code.coding[0].display.exists() %} - - {% elsif stratifier.code.coding[0].code.exists() %} - - {% else %} - - {% endif %} - - {% if stratifier.description.exists() %} - - {% else %} - - {% endif %} - - {% endfor %} - {% endif %} -
{{group.id}}
{{population.code.coding[0].display}}:None{{population.description}}None
{{stratifier.code.coding[0].display}}:{{stratifier.code.coding[0].code}}:Stratum:{{stratifier.description}}None
- {% endfor %} -
Supplemental Data Elements: - {% for supplementalData in Measure.supplementalData.where(usage.coding.where(code = 'supplemental-data').exists()) %} - {% if supplementalData.code.exists() %} - {{iif(supplementalData.code.text.exists(), supplementalData.code.text, iif(supplementalData.code.coding.first().display.exists(), supplementalData.code.coding.first().display, supplementalData.code.coding.first().code))}} - {% else %} - {% if supplementalData.description.exists() %} -

{{supplementalData.description}}

- {% else %} - {% if supplementalData.criteria.description.exists() %} -

{{supplementalData.criteria.description}}

- {% else %} -

{{supplementalData.criteria.expression}}

- {% endif %} - {% endif %} - {% endif %} - {% endfor %} -
Risk Adjustment Variable: - {% for supplementalData in Measure.supplementalData.where(usage.coding.where(code = 'risk-adjustment-factor').exists()) %} - {% if supplementalData.code.exists() %} - {{iif(supplementalData.code.text.exists(), supplementalData.code.text, iif(supplementalData.code.coding.first().display.exists(), supplementalData.code.coding.first().display, supplementalData.code.coding.first().code))}} - {% else %} - {% if supplementalData.description.exists() %} -

{{supplementalData.description}}

- {% else %} - {% if supplementalData.criteria.description.exists() %} -

{{supplementalData.criteria.description}}

- {% else %} -

{{supplementalData.criteria.expression}}

- {% endif %} - {% endif %} - {% endif %} - {% endfor %} -
- {{iif(extension.extension.where(url = 'usage').value.text.exists(), extension.extension.where(url = 'usage').value.text, iif(extension.extension.where(url = 'usage').coding.first().display.exists(), extension.extension.where(url = 'usage').coding.first().display, extension.extension.where(url = 'usage').coding.first().code))}} - : {{extension.extension.where(url = 'guidance').value}}
Libraries: - - {% for library in Measure.library %} - - - - {% endfor %} -
{{library}}
-
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() and - Measure.extension.where(url = 'http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements').exists().not() %} -

Dependencies

-
    - {% for artifact in Measure.relatedArtifact.where(type = 'depends-on') %} -
  • {{artifact.display}}
  • - {% 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 %} -
Terminology and Other Dependencies: - {% for relatedArtifact in contained.relatedArtifact.where(type = 'depends-on') %} -
  • {{relatedArtifact.resource}}
  • - {% endfor %} -
    Parameters: - - - - - - - - - {% for parameter in contained.parameter %} - - - - - - - - {% endfor %} -
    nameuseminmaxtype
    {{parameter.name}}{{parameter.use}}{{parameter.min}}{{parameter.max}}{{parameter.type}}
    -
    DataRequirements: - - - - - - - - {% for dataRequirement in contained.dataRequirement %} - - - - - - - {% endfor %} -
    Resource TypeResource ElementsValueset NameValueset
    {{dataRequirement.type}}{% if dataRequirement.profile.exists() %}({{dataRequirement.profile.first()}}){% endif %} - {% 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}}
    -
    Direct Reference Codes: - - - - - - - {% for extension in contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %} - - - - - - {% endfor %} -
    displaycodesystem
    {{extension.value.display}}{{extension.value.code}}{{extension.value.system}}
    -
    Direct Reference Codes: - - - - - - - {% for extension in contained.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode') %} - - - - - - {% endfor %} -
    displaycodesystem
    {{extension.value.display}}{{extension.value.code}}{{extension.value.system}}
    -
    Logic Definitions: - {% if Measure.group.exists() %} - - - - - - - - - {% for group in Measure.group %} - - - - - - {% endif %} - - {% if Measure.scoring.exists() %} - Measure scoring: - {% for coding in Measure.scoring.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} -

    - {% endfor %} - {% endif %} - - {% if Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit').exists() %} - - - - - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type').exists() %} - - {% for extension in group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type') %} - - - {% endfor %} - - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-riskAdjustment').exists() %} - - - - - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation').exists() %} - - - - - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation').exists() %} - - - - - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo').exists() %} - - - - - {% endif %} - - - {% for population in group.population %} - - - - - {% endfor %} - {% for stratifier in group.stratifier %} - - - - - {% endfor %} - {% endfor %} - -
    GroupScoringPopulation CriteriaExpression
    {{group.id}} - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring').exists() %} - Group scoring: - {% for extension in group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring') %} - {{extension.value.coding.code}} - {% endfor %} - {% endif %} - - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit').exists() %} -
    Scoring unit: - {% for scoringUnit in group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit') %} - {% if scoringUnit.coding.exists() %} - {% for coding in scoringUnit.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://unitsofmeasure.org', '(' + coding.system + ')', '')}} -

    - {% endfor %} - {% endif %} - {% if scoringUnit.coding.exists().not() and scoringUnit.text.exists() %} - {% endif %} - {% endfor %} -
    Scoring unit: - {% for scoringUnit in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit') %} - {% if scoringUnit.coding.exists() %} - {% for coding in scoringUnit.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://unitsofmeasure.org', '(' + coding.system + ')', '')}} -

    - {% endfor %} - {% endif %} - {% if scoringUnit.coding.exists().not() and scoringUnit.text.exists() %} - {% endif %} - {% endfor %} -
    Type: - {% if extension.value.coding.exists() %} - {% for coding in extension.value.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://terminology.hl7.org/CodeSystem/measure-type', '(' + coding.system + ')', '')}} -

    - {% endfor %} - {% endif %} - {% if extension.value.coding.exists().not() and extension.text.exists() %} - {{extension.text}} - {% endif %} -
    Risk Adjustment: {{group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-riskAdjustment').value}}
    Rate Aggregation: {{group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation').value}}
    Improvement Notation: - {% for extension in group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation') %} - {% if extension.value.coding.exists() %} - {% for coding in extension.value.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} {{iif(coding.system != 'http://terminology.hl7.org/CodeSystem/measure-improvement-notation', '(' + coding.system + ')', '')}} -

    - {% endfor %} - {% endif %} - {% if extension.value.coding.exists().not() and extension.text.exists() %} - {{extension.text}} - {% endif %} - {% endfor %} -
    Applies To: {{group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-appliesTo').value}}
    - - {{population.code.first().coding.first().display}} - {% if population.criteria.expression %} -
    {{(Measure.contained.where(id.contains('effective-data-requirements')).extension.where((url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition') and extension.where(url = 'name' and value = population.criteria.expression)).extension.where(url = 'statement').value)}}
    - {% else %} - None - {% endif %} -
    - - {{stratifier.code.first().coding.first().display}} - {% if stratifier.criteria.expression %} -
    {{(Measure.contained.where(id.contains('effective-data-requirements')).extension.where((url = 'http://http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition') and extension.where(url = 'name' and value = stratifier.criteria.expression)).extension.where(url = 'statement').value)}}
    - {% else %} - None - {% endif %} -
    - {% endif %} - - - {% for extension in contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition') %} - - - - - - {% for lNameExtension in extension.extension.where(url = 'libraryName') %} - - {% endfor %} - {% for nameExtension in extension.extension.where(url = 'name') %} - - {% endfor %} - - - {% for statementExtension in extension.extension.where(url = 'statement') %} - - - {% endfor %} - - {% endfor %} -
    Library NameName
    {{lNameExtension.value}}{{nameExtension.value}}
    -
    {{statementExtension.value}}
    -
    -
    Parameters: - - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-parameter') %} - - - - - - - - {% endfor %} -
    nameuseminmaxtype
    {{extension.value.name}}{{extension.value.use}}{{extension.value.min}}{{extension.value.max}}{{extension.value.type}}
    -
    Data Requirements: - - - {% for extension in Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-dataRequirement') %} - - - - {% if extension.value.codeFilter.first().valueSet.exists() %} - - - {% endif %} - {% if extension.value.codeFilter.first().code.exists() %} - - - {% endif %} - - {% endfor %} -
    typepathvalueSet or systemcode
    {{extension.value.type}}{{extension.value.codeFilter.first().path}}{{extension.value.codeFilter.first().valueSet}}{{extension.value.codeFilter.first().code.first().system}}{{extension.value.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.value.display}}{{extension.value.code}}{{extension.value.system}}
    -
    Populations: - - - {% for group in Measure.group %} - - - {% for population in group.population %} - - - - - {% endfor %} - {% for stratifier in group.stratifier %} - - - - - {% endfor %} - - {% endfor %} -
    GroupPopulationDescription
    {{group.id}}
    - {{population.code.first().coding.first().display}} - {% if population.description %} - {{(population.description)}} - {% endif %} -
    - {{stratifier.code.first().coding.first().display}} - {% if stratifier.description %} - {{(stratifier.description)}} - {% endif %} -
    -
    Logic Definitions: - {% if Measure.group.exists() %} - - - - - - {% for group in Measure.group %} - - - {% for population in group.population %} - - - - - - {% endfor %} - {% for stratifier in group.stratifier %} - - - - - - {% endfor %} - {% endfor %} - -
    GroupScoringPopulation CriteriaExpression
    {{group.id}} - {% if group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring').exists() %} - Group scoring: - {% for extension in group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring') %} - {{extension.value.coding.code}} - {% endfor %} - {% endif %} - {% if Measure.scoring.exists() %} - Measure scoring: - {% for coding in Measure.scoring.coding %} -

    - {{iif(coding.display.exists(), coding.display, coding.code)}} -

    - {% endfor %} - {% endif %} -
    Should be empty - - {{population.code.first().coding.first().display}} - {% if population.criteria.expression %} -
    {{(Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' and extension.where(url = 'name' and value = population.criteria.expression)).extension.where(url = 'statement').value)}}
    - {% else %} - None - {% endif %} -
    Should be empty - - {{stratifier.code.first().coding.first().display}} - {% if stratifier.criteria.expression %} -
    {{(Measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' and extension.where(url = 'name' and value = stratifier.criteria.expression)).extension.where(url = 'statement').value)}}
    - {% else %} - None - {% endif %} -
    - {% endif %} - {% 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 %} - -
    Library NameName
    {{lNameExtension.value}}{{nameExtension.value}}
    - {% for statementExtension in extension.extension.where(url = 'statement') %} -
    {{statementExtension.value}}
    - {% endfor %} -

    - {% endfor %} -
    -
    +{%include narrative-start.html %} +{%include knowledge-artifact-metadata.html %} +{%include measure-metadata.html measure=Measure %} +{%include measure-population-criteria.html measure=Measure %} +{%include measure-supplementaldata.html measure=Measure %} +{%include measure-logic.html measure=Measure %} +{%include version.html %} +{%include narrative-end.html %} \ No newline at end of file diff --git a/src/main/resources/templates/datarequirement.html b/src/main/resources/templates/datarequirement.html new file mode 100644 index 0000000..cab1405 --- /dev/null +++ b/src/main/resources/templates/datarequirement.html @@ -0,0 +1,42 @@ +{% for dataRequirement in include.dataRequirement.distinct() %} + + {{include.header}} + + Type: {{dataRequirement.type}} +
    + {% if dataRequirement.profile.exists() %} + Profile(s): + {% for profile in dataRequirement.profile %} + {{profile}} +
    + {% endfor %} + {% endif %} + {% if dataRequirement.mustSupport.exists() %} + Must Support Elements: {{dataRequirement.mustSupport.join(', ')}} +
    + {% endif %} + {% if dataRequirement.codeFilter.exists() %} + Code Filter(s): +
    + {% for codeFilter in dataRequirement.codeFilter %} + {% if codeFilter.path.exists() %} + Path: {{codeFilter.path}} +
    + {% endif %} + {% if codeFilter.searchParam.exists() %} + Search Parameter: {{codeFilter.searchParam}} +
    + {% endif %} + {% if codeFilter.valueSet.exists() %} + ValueSet: {{codeFilter.valueSet}} +
    + {% endif %} + {% if codeFilter.code.exists() %} + Code: {{codeFilter.code.join(', ')}} +
    + {% endif %} + {% endfor %} + {% endif %} + + +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/default-list.html b/src/main/resources/templates/default-list.html new file mode 100644 index 0000000..e0c30ae --- /dev/null +++ b/src/main/resources/templates/default-list.html @@ -0,0 +1,3 @@ +{% for item in include.content %} +{%include row-new.html header=include.header content=item %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html new file mode 100644 index 0000000..0222ce6 --- /dev/null +++ b/src/main/resources/templates/default.html @@ -0,0 +1,3 @@ +{% if include.content.exists() %} +{%include row-new.html header=include.header content=include.content %} +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/direct-reference-code.html b/src/main/resources/templates/direct-reference-code.html new file mode 100644 index 0000000..4c6a000 --- /dev/null +++ b/src/main/resources/templates/direct-reference-code.html @@ -0,0 +1,14 @@ +{% for directReferenceCode in include.contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode') %} + + Direct Reference Code + + {% if directReferenceCode.value.display.exists() %} + Display: {{directReferenceCode.value.display}} +
    + {% endif %} + Code: {{directReferenceCode.value.code}} +
    + System: {{directReferenceCode.value.system.toString()}} + + +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/knowledge-artifact-metadata-extensions.html b/src/main/resources/templates/knowledge-artifact-metadata-extensions.html new file mode 100644 index 0000000..4bb783b --- /dev/null +++ b/src/main/resources/templates/knowledge-artifact-metadata-extensions.html @@ -0,0 +1,22 @@ +{% for cqfmComment in include.resource.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-artifactComment') %} + {% if cqfmComment.extension.where(url = 'text').exists() %} + {%include default.html header='Comment' content=cqfmComment.extension.where(url = 'text').value %} + {% endif %} +{% endfor %} +{% for cqfComment in include.resource.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/cqf-artifactComment') %} + {% if cqfComment.extension.where(url = 'text').exists() %} + {%include default.html header='Comment' content=cqfComment.extension.where(url = 'text').value %} + {% endif %} +{% endfor %} +{% for cqfKnowledgeCap in include.resource.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/cqf-knowledgeCapability') %} + {%include default.html header='Knowledge Capability' content=cqfKnowledgeCap.value %} +{% endfor %} +{% for cpgKnowledgeCap in include.resource.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability') %} + {%include default.html header='Knowledge Capability' content=cpgKnowledgeCap.value %} +{% endfor %} +{% for cpgKnowledgeRepLevel in include.resource.extension.where(url = 'http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeRepresentationLevel') %} + {%include default.html header='Knowledge Representation Level' content=cpgKnowledgeRepLevel.value %} +{% endfor %} +{% for cqfKnowledgeRepLevel in include.resource.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/cqf-knowledgeRepresentationLevel') %} + {%include default.html header='Knowledge Representation Level' content=cqfKnowledgeRepLevel.value %} +{% endfor %} diff --git a/src/main/resources/templates/knowledge-artifact-metadata.html b/src/main/resources/templates/knowledge-artifact-metadata.html new file mode 100644 index 0000000..f4b85f0 --- /dev/null +++ b/src/main/resources/templates/knowledge-artifact-metadata.html @@ -0,0 +1,22 @@ +{%include section-header.html header='Knowledge Artifact Metadata' %} +{%include default.html header='Name (machine-readable)' content=Resource.name %} +{%include default.html header='Title (human-readable)' content=Resource.title %} +{%include default.html header='Subtitle' content=Resource.subtitle %} +{%include default.html header='Status' content=Resource.status %} +{%include default.html header='Experimental' content=Resource.experimental %} +{%include default.html header='Description' content=Resource.description %} +{%include default.html header='Purpose' content=Resource.purpose %} +{%include default.html header='Clinical Usage' content=Resource.usage %} +{%include default.html header='Approval Date' content=Resource.approvalDate %} +{%include period.html header='Effective Period' period=Resource.effectivePeriod %} +{%include default-list.html header='Use Context' content=Resource.useContext %} +{%include default-list.html header='Topic' content=Resource.topic %} +{%include default-list.html header='Measure Developer' content=Resource.author %} +{%include default-list.html header='Measure Editor' content=Resource.editor %} +{%include default-list.html header='Measure Reviewer' content=Resource.reviewer %} +{%include default-list.html header='Measure Endorser' content=Resource.endorser %} +{%include default.html header='Measure Steward' content=Resource.publisher %} +{%include default-list.html header='Steward Contact Details' content=Resource.contact %} +{%include default.html header='Copyright' content=Resource.copyright %} +{%include related-artifact.html relatedArtifact=Resource.relatedArtifact %} +{%include knowledge-artifact-metadata-extensions.html resource=Resource %} \ No newline at end of file diff --git a/src/main/resources/templates/logic-definition.html b/src/main/resources/templates/logic-definition.html new file mode 100644 index 0000000..ded13d8 --- /dev/null +++ b/src/main/resources/templates/logic-definition.html @@ -0,0 +1,21 @@ +{% for extension in include.contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition') %} + + + {% if extension.extension.where(url = 'name').exists() and extension.extension.where(url = 'libraryName') %} + {% assign logicDefUrl = extension.extension.where(url = 'libraryName').value.lower().replace(' ', '-') + '-' + extension.extension.where(url = 'name').value.lower().replace(' ', '-') %} + + {% endif %} + Logic Definition + +{% for lNameExtension in extension.extension.where(url = 'libraryName') %} + Library Name: {{lNameExtension.value}} +{% endfor %} + + +{% for statementExtension in extension.extension.where(url = 'statement') %} + +
    {{statementExtension.value}}
    + +{% endfor %} + +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-identifier.html b/src/main/resources/templates/measure-identifier.html new file mode 100644 index 0000000..8a59bd4 --- /dev/null +++ b/src/main/resources/templates/measure-identifier.html @@ -0,0 +1,20 @@ +{% for identifier in include.measure.identifier.where(type.coding.where(code = 'short-name').exists()) %} + {%include default.html header='Short Name Identifier' content=identifier.value %} +{% endfor %} +{% for identifier in include.measure.identifier.where(type.coding.where(code = 'version-independent').exists()) %} + {%include default.html header='Version Independent Identifier' content=identifier.value %} +{% endfor %} +{% for identifier in include.measure.identifier.where(type.coding.where(code = 'version-specific').exists()) %} + {%include default.html header='Version Specific Identifier' content=identifier.value %} +{% endfor %} +{% for identifier in include.measure.identifier.where(type.coding.where(code = 'publisher').exists()) %} + {% if identifier.assigner.display.exists() %} + {%assign pheader = 'Publisher (' + identifier.assigner.display.value + ') Identifier' %} + {%include default.html header=pheader content=identifier.value %} + {% else %} + {%include default.html header='Publisher Identifier' content=identifier.value %} + {% endif %} +{% endfor %} +{% for identifier in include.measure.identifier.where(type.coding.where(code != 'short-name' and code != 'version-independent' and code != 'version-specific' and code != 'publisher').exists()) %} + {%include default.html header='Identifier' content=identifier %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-logic.html b/src/main/resources/templates/measure-logic.html new file mode 100644 index 0000000..0802e1b --- /dev/null +++ b/src/main/resources/templates/measure-logic.html @@ -0,0 +1,24 @@ +{% if include.measure.library.exists() %} +{%include section-header.html header='Measure Logic' %} +{%include default.html header='Primary Library' content=include.measure.library %} +{% endif %} + +{% if include.measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements' or url = 'http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements').exists() %} + {% for contained in include.measure.contained.where(id.contains('effective-data-requirements')) %} + {%include related-artifact.html relatedArtifact=contained.relatedArtifact %} + {%include direct-reference-code.html contained=contained %} + {% for parameter in contained.parameter %} + {%include parameter.html header='Parameter' parameter=parameter %} + {% endfor %} + {% if contained.dataRequirement.exists() %} + + Measure Logic Data Requirements + + {% endif %} + {%include datarequirement.html header='Data Requirement' dataRequirement=contained.dataRequirement %} + {% if contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition' or url = 'http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition').exists() %} + {%include section-header.html header='Measure Logic Definitions' %} + {% endif %} + {%include logic-definition.html header='Data Requirement' contained=contained %} + {% endfor %} +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-metadata-extensions.html b/src/main/resources/templates/measure-metadata-extensions.html new file mode 100644 index 0000000..4380fc4 --- /dev/null +++ b/src/main/resources/templates/measure-metadata-extensions.html @@ -0,0 +1,11 @@ +{% for supplementalDataGuidance in include.measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance') %} + {% if supplementalDataGuidance.extension.where(url = 'guidance').exists() %} + {%include default.html header='Supplemental Data Guidance' content=supplementalDataGuidance.extension.where(url = 'guidance').value %} + {% endif %} +{% endfor %} +{% for populationBasis in include.measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis') %} + {%include default.html header='Population Basis' content=populationBasis.value %} +{% endfor %} +{% for scoringUnit in include.measure.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit') %} + {%include default.html header='Scoring Unit' content=scoringUnit.value %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-metadata.html b/src/main/resources/templates/measure-metadata.html new file mode 100644 index 0000000..2e432f9 --- /dev/null +++ b/src/main/resources/templates/measure-metadata.html @@ -0,0 +1,19 @@ +{% if include.measure.identifier.exists() or include.measure.version.exists() or include.measure.scoring.exists() or +include.measure.compositeScoring.exists() or include.measure.type.exists() or include.measure.riskAdjustment.exists() or +include.measure.rateAggregation.exists() or include.measure.rationale.exists() or include.measure.clinicalRecommendationStatement.exists() or +include.measure.improvementNotation.exists() or include.measure.definition.exists() or include.measure.guidance.exists() %} +{%include section-header.html header='Measure Metadata' %} +{%include measure-identifier.html measure=include.measure %} +{%include default.html header='Version Number' content=include.measure.version %} +{%include default.html header='Measure Scoring' content=include.measure.scoring %} +{%include default.html header='Measure Composite Scoring' content=include.measure.compositeScoring %} +{%include default-list.html header='Measure Type' content=include.measure.type %} +{%include default.html header='Risk Adjustment' content=include.measure.riskAdjustment %} +{%include default.html header='Rate Aggregation' content=include.measure.rateAggregation %} +{%include default.html header='Rationale' content=include.measure.rationale %} +{%include default.html header='Clinical Recommendation Statement' content=include.measure.clinicalRecommendationStatement %} +{%include default.html header='Improvement Notation' content=include.measure.improvementNotation %} +{%include default.html header='Definition' content=include.measure.definition %} +{%include default.html header='Guidance' content=include.measure.guidance %} +{%include measure-metadata-extensions.html measure=include.measure %} +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-population-criteria-extensions.html b/src/main/resources/templates/measure-population-criteria-extensions.html new file mode 100644 index 0000000..a1ae1ad --- /dev/null +++ b/src/main/resources/templates/measure-population-criteria-extensions.html @@ -0,0 +1,30 @@ +{% for populationBasis in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis') %} + {%include default.html header='Population Basis' content=populationBasis.value %} +{% endfor %} +{% for scoring in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring') %} + {%include default.html header='Scoring' content=scoring.value %} +{% endfor %} +{% for scoringUnit in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringUnit') %} + {%include default.html header='Scoring Unit' content=scoringUnit.value %} +{% endfor %} +{% for scoringPrecision in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoringPrecision') %} + {%include default.html header='Scoring Precision' content=scoringPrecision.value %} +{% endfor %} +{% for compositeScoring in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-compositeScoring') %} + {%include default.html header='Composite Scoring' content=compositeScoring.value %} +{% endfor %} +{% if include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-component').exists() %} + {%include related-artifact.html relatedArtifact=include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-component').value %} +{% endif %} +{% if include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type').exists() %} + {%include default-list.html header='Type' content=include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type').value %} +{% endif %} +{% for riskAdjustment in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-riskAdjustment') %} + {%include default.html header='Risk Adjustment' content=riskAdjustment.value %} +{% endfor %} +{% for rateAggregation in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation') %} + {%include default.html header='Rate Aggregation' content=rateAggregation.value %} +{% endfor %} +{% for improvementNotation in include.group.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation') %} + {%include default.html header='Improvement Notation' content=improvementNotation.value %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-population-criteria-population.html b/src/main/resources/templates/measure-population-criteria-population.html new file mode 100644 index 0000000..1425644 --- /dev/null +++ b/src/main/resources/templates/measure-population-criteria-population.html @@ -0,0 +1,59 @@ +{% for population in include.group.population %} + {% if population.code.exists() and population.code.coding.exists() %} + + {% if population.code.coding.first().display.exists() %} + {%include row-header.html header=population.code.coding.first().display %} + {% else %} + {% if population.code.coding.where(code = 'initial-population') or population.code.coding.where(code = 'numerator') or population.code.coding.where(code = 'numerator-exclusion') or population.code.coding.where(code = 'denominator') or population.code.coding.where(code = 'denominator-exclusion') or population.code.coding.where(code = 'denominator-exception') or population.code.coding.where(code = 'measure-population') or population.code.coding.where(code = 'measure-population-exclusion') or population.code.coding.where(code = 'measure-observation') %} + {% if population.code.coding.where(code = 'initial-population') %} + {%include row-header.html header='Initial Population' %} + {% endif %} + {% if population.code.coding.where(code = 'numerator') %} + {%include row-header.html header='Numerator' %} + {% endif %} + {% if population.code.coding.where(code = 'numerator-exclusion') %} + {%include row-header.html header='Numerator Exclusion' %} + {% endif %} + {% if population.code.coding.where(code = 'denominator') %} + {%include row-header.html header='Denominator' %} + {% endif %} + {% if population.code.coding.where(code = 'denominator-exclusion') %} + {%include row-header.html header='Denominator Exclusion' %} + {% endif %} + {% if population.code.coding.where(code = 'denominator-exception') %} + {%include row-header.html header='Denominator Exception' %} + {% endif %} + {% if population.code.coding.where(code = 'measure-population') %} + {%include row-header.html header='Measure Population' %} + {% endif %} + {% if population.code.coding.where(code = 'measure-population-exclusion') %} + {%include row-header.html header='Measure Population Exclusion' %} + {% endif %} + {% if population.code.coding.where(code = 'measure-observation') %} + {%include row-header.html header='Measure Observation' %} + {% endif %} + {% else %} + {%include row-header.html header='Unknown Population Type' %} + {% endif %} + {% endif %} + + {% if population.id.exists() %} + ID: {{population.id}} +
    + {% endif %} + {% if population.description.exists() %} + Description: +

    {{population.description}}

    + {% else %} + Description: No description provided + {% endif %} + {% if population.criteria.exists() %} + {% if population.criteria.language.startsWith('text/cql') and population.criteria.expression.exists() and include.library.exists() %} + {% assign logicDefAnchor = '#' + include.library.first().replaceMatches('.*/Library/', '').lower().replace(' ', '-') + '-' + population.criteria.expression.lower().replace(' ', '-') %} + Logic Definition: {{population.criteria.expression}} + {% endif %} + {% endif %} + + + {% endif %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-population-criteria-stratifier.html b/src/main/resources/templates/measure-population-criteria-stratifier.html new file mode 100644 index 0000000..93140cc --- /dev/null +++ b/src/main/resources/templates/measure-population-criteria-stratifier.html @@ -0,0 +1,26 @@ +{% for stratifier in include.group.stratifier %} + + {%include row-header.html header='Stratifier' %} + + {% if stratifier.id.exists() %} + ID: {{stratifier.id}} + {% if stratifier.code.exists() or stratifier.description.exists() %} +
    + {% endif %} + {% endif %} + {% if stratifier.code.exists() %} + {% if stratifier.code.coding.first().display.exists() %} + Code: {{stratifier.code.coding.first().display}} + {% else %} + Code: {{stratifier.code}} + {% endif %} + {% if stratifier.description.exists() %} +
    + {% endif %} + {% endif %} + {% if stratifier.description.exists() %} + Description: {{stratifier.description}} + {% endif %} + + +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-population-criteria.html b/src/main/resources/templates/measure-population-criteria.html new file mode 100644 index 0000000..7d103a3 --- /dev/null +++ b/src/main/resources/templates/measure-population-criteria.html @@ -0,0 +1,14 @@ +{% for group in include.measure.group %} + {% if group.id.exists() %} + {%assign groupid = 'Measure Population Criteria' + ' (ID: ' + group.id + ')' %} + {%include section-header.html header=groupid %} + {% else %} + {%include section-header.html header='Measure Population Criteria' %} + {% endif %} + {% if group.description.exists() %} + {%include default.html header='Summary' content=group.description %} + {% endif %} + {%include measure-population-criteria-population.html group=group library=include.measure.library %} + {%include measure-population-criteria-stratifier.html group=group %} + {%include measure-population-criteria-extensions.html group=group %} +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/measure-supplementaldata.html b/src/main/resources/templates/measure-supplementaldata.html new file mode 100644 index 0000000..acf7485 --- /dev/null +++ b/src/main/resources/templates/measure-supplementaldata.html @@ -0,0 +1,38 @@ +{% if include.measure.supplementalData.exists() %} + {%include section-header.html header='Supplemental Data Elements' %} +{% endif %} +{% for sde in include.measure.supplementalData %} + + {%include row-header.html header='Supplemental Data Element' %} + + {% if sde.id.exists() %} + ID: {{sde.id}} + {% if sde.usage.exists() or sde.description.exists() %} +
    + {% endif %} + {% endif %} + {% if sde.usage.exists() %} + {% for usage in sde.usage %} + {% if usage.coding.first().display.exists() %} + Usage Code: {{usage.coding.first().display}} + {% else %} + Usage Code: {{usage}} + {% endif %} +
    + {% endfor %} + {% endif %} + {% if sde.description.exists() %} + Description: {{sde.description}} + {% else %} + Description: No description provided + {% endif %} + {% if sde.criteria.exists() %} + {% if sde.criteria.language.startsWith('text/cql') and sde.criteria.expression.exists() and include.measure.library.exists() %} +
    + {% assign logicDefAnchor = '#' + include.measure.library.first().replaceMatches('.*/Library/', '').lower().replace(' ', '-') + '-' + sde.criteria.expression.lower().replace(' ', '-') %} + Logic Definition: {{sde.criteria.expression}} + {% endif %} + {% endif %} + + +{% endfor %} \ No newline at end of file diff --git a/src/main/resources/templates/narrative-end.html b/src/main/resources/templates/narrative-end.html new file mode 100644 index 0000000..173b6e0 --- /dev/null +++ b/src/main/resources/templates/narrative-end.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/main/resources/templates/narrative-start.html b/src/main/resources/templates/narrative-start.html new file mode 100644 index 0000000..851e858 --- /dev/null +++ b/src/main/resources/templates/narrative-start.html @@ -0,0 +1,3 @@ +
    + + \ No newline at end of file diff --git a/src/main/resources/templates/parameter.html b/src/main/resources/templates/parameter.html new file mode 100644 index 0000000..16b5d23 --- /dev/null +++ b/src/main/resources/templates/parameter.html @@ -0,0 +1,14 @@ + + {%include row-header.html header=include.header %} + + \ No newline at end of file diff --git a/src/main/resources/templates/period.html b/src/main/resources/templates/period.html new file mode 100644 index 0000000..6fec4e5 --- /dev/null +++ b/src/main/resources/templates/period.html @@ -0,0 +1,4 @@ +{% if include.period.exists() %} +{%assign period = include.period.start.toString() + '..' + include.period.end.toString() %} +{%include default.html header=include.header content=period %} +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/related-artifact.html b/src/main/resources/templates/related-artifact.html new file mode 100644 index 0000000..38ad6d0 --- /dev/null +++ b/src/main/resources/templates/related-artifact.html @@ -0,0 +1,47 @@ +{% if include.relatedArtifact.exists() %} +{% for relatedArtifact in include.relatedArtifact %} + + {% if relatedArtifact.where(type = 'documentation').exists() %} + {%include row-header.html header='Documentation' %} + {% endif %} + {% if relatedArtifact.where(type = 'justification').exists() %} + {%include row-header.html header='Justification' %} + {% endif %} + {% if relatedArtifact.where(type = 'citation').exists() %} + {%include row-header.html header='Citation' %} + {% endif %} + {% if relatedArtifact.where(type = 'depends-on').exists() %} + {%include row-header.html header='Dependency' %} + {% endif %} + + +{% endfor %} +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/row-content.html b/src/main/resources/templates/row-content.html new file mode 100644 index 0000000..d12db8a --- /dev/null +++ b/src/main/resources/templates/row-content.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/resources/templates/row-end.html b/src/main/resources/templates/row-end.html new file mode 100644 index 0000000..943be33 --- /dev/null +++ b/src/main/resources/templates/row-end.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/resources/templates/row-header.html b/src/main/resources/templates/row-header.html new file mode 100644 index 0000000..971154f --- /dev/null +++ b/src/main/resources/templates/row-header.html @@ -0,0 +1,5 @@ +{% if include.colspan.exists() %} + +{% else %} + +{% endif %} \ No newline at end of file diff --git a/src/main/resources/templates/row-new.html b/src/main/resources/templates/row-new.html new file mode 100644 index 0000000..00f5535 --- /dev/null +++ b/src/main/resources/templates/row-new.html @@ -0,0 +1,4 @@ +{%include row-start.html %} +{%include row-header.html header=include.header %} +{%include row-content.html content=include.content %} +{%include row-end.html %} \ No newline at end of file diff --git a/src/main/resources/templates/row-start.html b/src/main/resources/templates/row-start.html new file mode 100644 index 0000000..6e37a63 --- /dev/null +++ b/src/main/resources/templates/row-start.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/resources/templates/section-header.html b/src/main/resources/templates/section-header.html new file mode 100644 index 0000000..fcb2b7e --- /dev/null +++ b/src/main/resources/templates/section-header.html @@ -0,0 +1,3 @@ +{%include row-start.html %} +{%include row-header.html colspan='2' header=include.header %} +{%include row-end.html %} \ No newline at end of file diff --git a/src/main/resources/templates/type-primitive.html b/src/main/resources/templates/type-primitive.html new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/templates/version.html b/src/main/resources/templates/version.html new file mode 100644 index 0000000..0d6741b --- /dev/null +++ b/src/main/resources/templates/version.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file
    + Name: {{include.parameter.name}} +
    + Use: {{include.parameter.use}} +
    + Min Cardinality: {{include.parameter.min}} +
    + Max Cardinality: {{include.parameter.max}} +
    + Type: {{include.parameter.type}} +
    + {% if relatedArtifact.display.exists() %} + Description: {{relatedArtifact.display}} + {% if relatedArtifact.citation.exists() or relatedArtifact.url.exists() or relatedArtifact.document.exists() or + relatedArtifact.resource.exists() %} +
    + {% endif %} + {% endif %} + {% if relatedArtifact.citation.exists() %} + Citation: {{relatedArtifact.citation}} + {% endif %} + {% if relatedArtifact.url.exists() %} + Content URL: {{relatedArtifact.url}} + {% if relatedArtifact.document.exists() or relatedArtifact.resource.exists() %} +
    + {% endif %} + {% endif %} + {% if relatedArtifact.document.exists() %} + Document: {{relatedArtifact.document}} + {% if relatedArtifact.citation.resource.exists() %} +
    + {% endif %} + {% endif %} + {% if relatedArtifact.resource.exists() %} + Resource: {{relatedArtifact.resource}} +
    + Canonical URL: {{relatedArtifact.resource.toString()}} + {% endif %} +
    {{include.content}}
    {{include.header}}{{include.header}}
    Generated using version 0.4.6 of the sample-content-ig Liquid templates