Atrius India Core FHIR Implementation Guide
0.1.0 - ci-build
Atrius India Core FHIR Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
| Draft as of 2026-09-21 |
@prefix fhir: <http://hl7.org/fhir/> . @prefix loinc: <http://loinc.org/rdf#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix sct: <http://snomed.info/id/> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . # - resource ------------------------------------------------------------------- <http://hl7.org/fhir/Measure/AtriusCMS122DiabetesAssessGT9Pct> a fhir:Measure ; fhir:nodeRole fhir:treeRoot ; fhir:Resource.id [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct"] ; fhir:Resource.meta [ fhir:Meta.profile [ fhir:value "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure|2.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure|2.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm|4.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm|4.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm|4.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cql-measure-cqfm|4.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/elm-measure-cqfm|4.0.0> ], [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm|4.0.0" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm|4.0.0> ] ] ; fhir:Resource.language [ fhir:value "en"] ; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "extensions" ] ; fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table class=\"narrative-table\">\n <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n\n<td class=\"content-container\">Diabetes: HbA1c Poor Control >9% (Atrius CMS122)</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n\n<td class=\"content-container\">0.1.0</td>\n\n\n</tr>\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Short Name</th>\n\n\n\n<td class=\"content-container\">CMS122</td>\n\n\n</tr>\n\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">GUID (Version Independent)</th>\n\n\n\n<td class=\"content-container\">urn:uuid:babcc365-49df-5b17-988c-656c11cde8f9</td>\n\n\n</tr>\n\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">GUID (Version Specific)</th>\n\n\n\n<td class=\"content-container\">urn:uuid:655fe76d-924c-5ad6-8be8-a4b15f90990b</td>\n\n\n</tr>\n\n\n\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n\n<td class=\"content-container\">AtriusCMS122DiabetesAssessGT9Pct</td>\n\n\n</tr>\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Identifier</th>\n\n\n\n<td class=\"content-container\">urn:oid:1.3.6.1.4.1.66219.1.29.3</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Status</th>\n\n\n\n<td class=\"content-container\">Draft</td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Experimental</th>\n\n\n\n<td class=\"content-container\">true</td>\n\n\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n\n<td class=\"content-container\">Atrius</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward Contact</th>\n\n\n\n<td class=\"content-container\">Atrius</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n\n<td class=\"content-container\"><div><p>Proportion measure: adults 18–75 with diabetes and a qualifying outpatient encounter whose most recent glycemic status is >9%, missing, or unresulted. CMS labels this intermediate-outcome; THO measure-type 3.0.1 has no such code, so type is outcome. Improvement is decrease.</p>\n</div></td>\n\n\n</tr>\n\n\n\n\n\n\n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Basis</th>\n\n\n\n<td class=\"content-container\">boolean</td>\n\n\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring</th>\n\n\n\n<td class=\"content-container\">\n proportion from <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-measure-scoring.html\">http://terminology.hl7.org/CodeSystem/measure-scoring</a> \n\n\n</td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n\n<td class=\"content-container\">\n decrease from <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-measure-improvement-notation.html\">http://terminology.hl7.org/CodeSystem/measure-improvement-notation</a> \n\n\n</td>\n\n\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Type</th>\n\n\n\n<td class=\"content-container\">\n outcome from <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-measure-type.html\">http://terminology.hl7.org/CodeSystem/measure-type</a> \n\n\n</td>\n\n\n</tr>\n\n\n\n\n\n\n\n<tr>\n \n \n \n \n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Atrius CMS122 CQL Library\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"Library-AtriusCMS122DiabetesAssessGT9Pct.html\">Atrius CMS122 Diabetes HbA1c Poor Control CQL</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS122DiabetesAssessGT9Pct|0.1.0</tt>\n \n \n \n </td>\n</tr>\n\n\n\n\n\n\n\n\n\n \n \n \n \n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: group-1)</th>\n\n\n</tr>\n \n \n \n\n\n\n\n\n\n\n\n\n\n\n \n\n \n\n\n\n\n\n\n\n \n \n \n \n \n \n<tr>\n\n\n<th scope=\"row\" class=\"row-header\"/>\n\n\n\n<td class=\"content-container\"><div><p>SDE Sex uses Patient.gender mapped to the same SNOMED Male/Female findings as CMS. SDE Payer uses AtriusIn coverage payer type (PM-JAY, ESIS, private, public, self-pay). SDE Residence (state/district) and SDE Urban Rural replace US Core race and ethnicity and are not US-comparable. Direct CPT/HCPCS nutrition-therapy encounter codes are omitted; Nutrition Services ValueSet carries that intent.</p>\n</div></td>\n\n\n</tr>\n\n \n\n\n\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Logic</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Primary Library</th>\n\n\n\n<td class=\"content-container\"><a href=\"Library-AtriusCMS122DiabetesAssessGT9Pct.html\">Atrius CMS122 Diabetes HbA1c Poor Control CQL</a> version: 0.1.0</td>\n\n\n</tr>\n\n\n\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Contents</th>\n <td class=\"content-container\">\n <em><a href=\"#population-criteria\">Population Criteria</a></em>\n <br/>\n <em><a href=\"#definitions\">Logic Definitions</a></em>\n <br/>\n <em><a href=\"#terminology\">Terminology</a></em>\n <br/>\n <em><a href=\"#dependencies\">Dependencies</a></em>\n <br/>\n <em><a href=\"#data-requirements\">Data Requirements</a></em>\n <br/>\n <em><a href=\"#parameters\">Parameters</a></em>\n <br/>\n </td>\n</tr>\n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"population-criteria\"> </a>Population Criteria</th>\n\n\n</tr>\n \n \n \n\n \n \n \n \n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: group-1)</th>\n\n\n</tr>\n \n \n \n\n \n\n\n \n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"definitions\"> </a>Logic Definitions</th>\n\n\n</tr>\n \n \n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusHospice</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriushospice-has-hospice-services\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Hospice Services\":\n exists ( ( ( [Encounter: \"Encounter Inpatient\"] ).isEncounterPerformed() ) InpatientEncounter\n where FHIRHelpers.ToConcept(InpatientEncounter.hospitalization.dischargeDisposition) ~ \"Hospice (HL7 discharge)\"\n and FHIRHelpers.ToInterval(InpatientEncounter.period as FHIR.Period) ends during day of \"Measurement Period\"\n )\n or exists ( ( ( [Encounter: \"Hospice Encounter\"] ).isEncounterPerformed() ) HospiceEncounter\n where FHIRHelpers.ToInterval(HospiceEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )\n or exists ( ( ( [ObservationGeneralAssessment: \"Hospice care [Minimum Data Set]\"] ).isAssessmentPerformed() ) HospiceAssessment\n where FHIRHelpers.ToConcept(HospiceAssessment.value as FHIR.CodeableConcept) ~ \"Yes (qualifier value)\"\n and HospiceAssessment.effective.toObservationEffectiveInterval() overlaps day of \"Measurement Period\"\n )\n or exists ( ( ( [ServiceRequest: \"Hospice Care Ambulatory\"] ).isInterventionOrder() ) HospiceOrder\n where FHIRHelpers.ToDateTime(HospiceOrder.authoredOn) during day of \"Measurement Period\"\n )\n or exists ( ( ( [Procedure: \"Hospice Care Ambulatory\"] ).isInterventionPerformed() ) HospicePerformed\n where HospicePerformed.performed.toPerformedInterval() overlaps day of \"Measurement Period\"\n )\n or exists ( ( (\n [ConditionProblemsHealthConcerns: \"Hospice Diagnosis\"]\n union [ConditionEncounterDiagnosis: \"Hospice Diagnosis\"]\n ).verified() ) HospiceCareDiagnosis\n where HospiceCareDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-is-age-66-or-older-living-long-term-in-a-nursing-home\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Is Age 66 or Older Living Long Term in a Nursing Home\":\n AgeInYearsAt(date from end of \"Measurement Period\") >= 66\n and (\n (\n Last(\n [Observation: \"Housing status\"] HousingStatus\n where HousingStatus.status in { 'final', 'amended', 'corrected' }\n and end of HousingStatus.observationEffectiveInterval() on or before day of end of \"Measurement Period\"\n sort by end of observationEffectiveInterval() asc\n )\n ) LastHousingStatus\n where LastHousingStatus.value is FHIR.CodeableConcept\n and FHIRHelpers.ToConcept(LastHousingStatus.value as FHIR.CodeableConcept) ~ \"Lives in nursing home (finding)\"\n ) is not null</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-frailty-device-order\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Frailty Device Order\":\n exists (\n [DeviceRequest: \"Frailty Device\"] FrailtyDeviceOrder\n where FrailtyDeviceOrder.status in { 'active', 'completed' }\n and FrailtyDeviceOrder.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }\n and Interval[\n FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn),\n FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn)\n ] during day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-frailty-equipment-observation\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Frailty Equipment Observation\":\n exists (\n [Observation: \"Medical equipment used\"] EquipmentUsed\n where EquipmentUsed.status in { 'final', 'amended', 'corrected' }\n and EquipmentUsed.value is FHIR.CodeableConcept\n and FHIRHelpers.ToConcept(EquipmentUsed.value as FHIR.CodeableConcept) in \"Frailty Device\"\n and end of EquipmentUsed.observationEffectiveInterval() during day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-frailty-diagnosis\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Frailty Diagnosis\":\n exists (\n [ConditionProblemsHealthConcerns: \"Frailty Diagnosis\"] FrailtyProblem\n where (\n FrailtyProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"differential\"\n )\n and FrailtyProblem.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Frailty Diagnosis\"] FrailtyEncounterDiagnosis\n where (\n FrailtyEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and FrailtyEncounterDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-frailty-encounter\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Frailty Encounter\":\n exists (\n [Encounter: \"Frailty Encounter\"] FrailtyEncounter\n where FrailtyEncounter.status = 'finished'\n and FHIRHelpers.ToInterval(FrailtyEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-frailty-symptom-observation\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Frailty Symptom Observation\":\n exists (\n [Observation: \"Frailty Symptom\"] FrailtySymptom\n where FrailtySymptom.status in { 'preliminary', 'final', 'amended', 'corrected' }\n and FrailtySymptom.observationEffectiveInterval() overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-criteria-indicating-frailty\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Criteria Indicating Frailty\":\n \"Has Frailty Device Order\"\n or \"Has Frailty Equipment Observation\"\n or \"Has Frailty Diagnosis\"\n or \"Has Frailty Encounter\"\n or \"Has Frailty Symptom Observation\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-advanced-illness-in-year-before-or-during-measurement-period\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Advanced Illness in Year Before or During Measurement Period\":\n exists (\n [ConditionProblemsHealthConcerns: \"Advanced Illness\"] AdvancedIllnessProblem\n where (\n AdvancedIllnessProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"differential\"\n )\n and start of AdvancedIllnessProblem.prevalenceInterval() during day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Advanced Illness\"] AdvancedIllnessEncounterDiagnosis\n where (\n AdvancedIllnessEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and start of AdvancedIllnessEncounterDiagnosis.prevalenceInterval() during day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-has-dementia-medications-in-year-before-or-during-measurement-period\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Dementia Medications in Year Before or During Measurement Period\":\n exists (\n [MedicationRequest: \"Dementia Medications\"] DementiaMedication\n where DementiaMedication.status = 'active'\n and DementiaMedication.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }\n and DementiaMedication.medicationRequestPeriod() overlaps day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusAdvancedIllnessAndFrailty</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusadvancedillnessandfrailty-is-age-66-or-older-with-advanced-illness-and-frailty\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Is Age 66 or Older with Advanced Illness and Frailty\":\n AgeInYearsAt(date from end of \"Measurement Period\") >= 66\n and \"Has Criteria Indicating Frailty\"\n and (\n \"Has Advanced Illness in Year Before or During Measurement Period\"\n or \"Has Dementia Medications in Year Before or During Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusPalliativeCare</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuspalliativecare-has-palliative-care-in-the-measurement-period\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Palliative Care in the Measurement Period\":\n exists (\n [ObservationGeneralAssessment: \"Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)\"] PalliativeAssessment\n where PalliativeAssessment.status in { 'final', 'amended', 'corrected' }\n and PalliativeAssessment.effective.toObservationEffectiveInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionProblemsHealthConcerns: \"Palliative Care Diagnosis\"] PalliativeProblem\n where (\n PalliativeProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"differential\"\n )\n and PalliativeProblem.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Palliative Care Diagnosis\"] PalliativeEncounterDiagnosis\n where (\n PalliativeEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and PalliativeEncounterDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [Encounter: \"Palliative Care Encounter\"] PalliativeEncounter\n where PalliativeEncounter.status = 'finished'\n and FHIRHelpers.ToInterval(PalliativeEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )\n or exists (\n [Procedure: \"Palliative Care Intervention\"] PalliativeIntervention\n where PalliativeIntervention.status = 'completed'\n and PalliativeIntervention.performed.toPerformedInterval() overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-glycemic-status-assessment\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Glycemic Status Assessment\":\n ( [Observation: \"HbA1c Laboratory Test\"]\n union [Observation: \"Glucose management indicator\"]\n ) GlycemicStatus\n where GlycemicStatus.status in { 'final', 'amended', 'corrected' }\n and GlycemicStatus.effective.toObservationEffectiveInterval ( ) during day of \"Measurement Period\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-most-recent-glycemic-status-date\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Most Recent Glycemic Status Date\":\n Last((\"Glycemic Status Assessment\" QualifyingGlycemicStatus\n return date from end of QualifyingGlycemicStatus.effective.toObservationEffectiveInterval ( )) QualifyingGlycemicStatus\n sort asc\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-lowest-glycemic-status-assessment-reading-on-most-recent-day\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Lowest Glycemic Status Assessment Reading on Most Recent Day\":\n First(\"Glycemic Status Assessment\" QualifyingGlycemicStatus\n where end of QualifyingGlycemicStatus.effective.toObservationEffectiveInterval ( ) same day as \"Most Recent Glycemic Status Date\"\n return {\n QualifyingGlycemicStatusValue: QualifyingGlycemicStatus.value as Quantity,\n QualifyingGlycemicStatus: QualifyingGlycemicStatus\n }\n sort by QualifyingGlycemicStatusValue\n ).QualifyingGlycemicStatus</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-has-most-recent-glycemic-status-assessment-without-result\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Most Recent Glycemic Status Assessment Without Result\":\n \"Lowest Glycemic Status Assessment Reading on Most Recent Day\" is not null\n and \"Lowest Glycemic Status Assessment Reading on Most Recent Day\".value is null</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-has-most-recent-elevated-glycemic-status-assessment\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has Most Recent Elevated Glycemic Status Assessment\":\n \"Lowest Glycemic Status Assessment Reading on Most Recent Day\".value > 9 '%'</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-has-no-record-of-glycemic-status-assessment\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Has No Record Of Glycemic Status Assessment\":\n not exists \"Glycemic Status Assessment\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-numerator\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Numerator\":\n \"Has Most Recent Glycemic Status Assessment Without Result\"\n or \"Has Most Recent Elevated Glycemic Status Assessment\"\n or \"Has No Record Of Glycemic Status Assessment\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-qualifying-encounters\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Qualifying Encounters\":\n ( ( [Encounter: \"Office Visit\"]\n union [Encounter: \"Annual Wellness Visit\"]\n union [Encounter: \"Preventive Care Services Established Office Visit, 18 and Up\"]\n union [Encounter: \"Preventive Care Services Initial Office Visit, 18 and Up\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nutrition Services\"]\n union [Encounter: \"Telephone Visits\"]\n ).isEncounterPerformed ( ) ) ValidEncounters\n where ValidEncounters.period during day of \"Measurement Period\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-initial-population\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Initial Population\":\n AgeInYearsAt(date from\n end of \"Measurement Period\"\n ) in Interval[18, 75]\n and exists \"Qualifying Encounters\"\n and exists ( ( ( [ConditionEncounterDiagnosis: \"Diabetes\"] ).verified ( ) ) DiabetesDiagnosis\n where DiabetesDiagnosis.prevalenceInterval ( ) overlaps day of \"Measurement Period\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-denominator\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Denominator\":\n \"Initial Population\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCMS122DiabetesAssessGT9Pct</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscms122diabetesassessgt9pct-denominator-exclusions\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define \"Denominator Exclusions\":\n Hospice.\"Has Hospice Services\"\n or AIFrailLTCF.\"Is Age 66 or Older Living Long Term in a Nursing Home\"\n or AIFrailLTCF.\"Is Age 66 or Older with Advanced Illness and Frailty\"\n or PalliativeCare.\"Has Palliative Care in the Measurement Period\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusStatus</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusstatus-isencounterperformed\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isEncounterPerformed(Enc List<Encounter>):\n Enc E\n where E.status = 'finished'</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusStatus</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusstatus-verified\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function verified(\n conditions List<Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>>\n):\n conditions C\n where C.verificationStatus is not null implies (\n FHIRHelpers.ToConcept(C.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"differential\"\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusStatus</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusstatus-isassessmentperformed\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isAssessmentPerformed(Obs List<Observation>):\n Obs O\n where O.status in { 'final', 'amended', 'corrected' }</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusStatus</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusstatus-isinterventionorder\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isInterventionOrder(ServiceRequest List<ServiceRequest>):\n ServiceRequest S\n where S.status in { 'active', 'completed' }\n and S.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusStatus</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriusstatus-isinterventionperformed\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function isInterventionPerformed(Proc List<Procedure>):\n Proc P\n where P.status = 'completed'</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value ObservationStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-toquantity\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) \nvalue to a CQL Quantity\n@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity\nhas a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)\nan error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.\n@seealso: ToCalendarUnit\n*/\ndefine function ToQuantity(quantity FHIR.Quantity):\n case\n when quantity is null then null\n when quantity.value is null then null\n when quantity.comparator is not null then\n Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\n when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\n or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\n System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\n else\n Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')\n end</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tocalendarunit\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts a UCUM definite duration unit to a CQL calendar duration\nunit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) \ntopic of the CQL specification.\n@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate\n*/\ndefine function ToCalendarUnit(unit System.String):\n case unit\n when 'ms' then 'millisecond'\n when 's' then 'second'\n when 'min' then 'minute'\n when 'h' then 'hour'\n when 'd' then 'day'\n when 'wk' then 'week'\n when 'mo' then 'month'\n when 'a' then 'year'\n else unit\n end</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value EncounterStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tointerval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n if period is null then\n null\n else\n if period.\"start\" is null then\n Interval(period.\"start\".value, period.\"end\".value]\n else\n Interval[period.\"start\".value, period.\"end\".value]</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-toconcept\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n if concept is null then\n null\n else\n System.Concept {\n codes: concept.coding C return ToCode(C),\n display: concept.text.value\n }</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tocode\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value ServiceRequestStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value ServiceRequestIntent): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-todatetime\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToDateTime(value dateTime): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value ProcedureStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value DeviceRequestStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value RequestIntent): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value string): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value MedicationRequestStatus): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value MedicationRequestIntent): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value UnitsOfTime): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCumulativeMedicationDuration</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscumulativemedicationduration-medicationrequestperiod\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\nNow that we have a ToDaily function, we can approach calculation of the\nduration of medication for an order. First, consider the definitions\nfor each element:\n* 1 and only 1 dosageInstruction\n* 1 and only 1 doseAndRate\n* 1 timing with 1 repeat\n* frequency, frequencyMax, defaulting to 1\n* period, periodUnit, defaulting to 1 'd'\n* doseQuantity or doseRange\n* timeOfDay\n* authoredOn: The date the prescription was written\n* dispenseRequest.validityPeriod: Time period supply is authorized for\n* dispenseRequest.quantity: amount of medication supplied per dispense\n* dispenseRequest.numberOfRepeatsAllowed: number of refills authorized\n* dispenseRequest.expectedSupplyDuration: number of days supply per dispense\n* dosageInstruction.timing.repeat.boundsDuration: total duration of the repeat\n* dosageInstruction.timing.repeat.boundsRange: range of durations of the repeat\n* dosageInstruction.timing.repeat.boundsPeriod: period bounds of the repeat\n* dosageInstruction.timing.repeat.count: number of times to repeat\n* dosageInstruction.timing.repeat.countMax: maximum number of times to repeat\n* dosageInstruction.timing.repeat.frequency: event occurs frequency times per period\n* dosageInstruction.timing.repeat.frequencyMax: event occurs up to frequencyMax times per period\n* dosageInstruction.timing.repeat.period: event occurs frequency times per period\n* dosageInstruction.timing.repeat.periodMax: upper limit of period\n* dosageInstruction.timing.repeat.periodUnit: period duration (s | min | h | d | wk | mo | a)\n* dosageInstruction.timing.repeat.timeOfDay: time of day for the event (0..*)\n* dosageInstruction.timing.repeat.when: event timing (HS | WAKE | C | CM | CD | CV | AC | ACM...)\n* dosageInstruction.timing.code: BID | TID | QID | AM | PM | QD | QOD...\n* dosageInstruction.asNeeded\n* dosageInstruction.doseAndRate.doseQuantity\n* dosageInstruction.doseAndRate.doseRange\nIf expectedSupplyDuration is present, then the duration is\n expectedSupplyDuration * (1 + numberOfRepeatsAllowed)\nIf expectedSupplyDuration is not present, then it must be calculated based on the quantity, dosage, and frequency:\n (quantity / (dosage * frequency)) * (1 + numberOfRepeatsAllowed)\n dosage: Coalesce(end of doseAndRate.doseRange, doseAndRate.doseQuantity)\n frequency: Coalesce(frequencyMax, frequency)\n period: Quantity(period, periodUnit)\nIf expectedSupplyDuration is not present and cannot be calculated, and the boundsPeriod is present (and completely specified), we can use that directly\n dosage.timing.repeat.boundsPeriod\nThis calculation results in a number of days, which can then be turned into a period by anchoring that to the\nstart of the validityPeriod or the authoredOn:\n Interval[earliestDispensable, earliestDispensable + expectedSupplyDuration - 1]\n earliestDispensable: Coalesce(start of validityPeriod, authoredOn)\nThe following function illustrates this completely:\n*/\n\n/*\nCalculates the Medication Period for a single MedicationRequest.\nMedicationRequest instances provided to this function are expected\nto conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)\nprofile, which expects:\n* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error\n* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error\n* 1 timing with 1 repeat, missing timing or repeat elements will result in a null\n* frequency, frequencyMax, defaulting to 1\n* period, periodUnit, defaulting to 1 'd'\n* timeOfDay\n* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null\nNote that MedicationRequest status is not considered by this calculation, as the\nlist of MedicationRequest instances provided to this function should already have\nconsidered appropriate statuses, depending on the use case, typically `completed`.\n*/\n\ndefine fluent function medicationRequestPeriod(sourceRequest \"MedicationRequest\"):\n sourceRequest R\n let\n dosage: singleton from R.dosageInstruction,\n doseAndRate: singleton from dosage.doseAndRate,\n timing: dosage.timing,\n frequency: Coalesce(timing.repeat.frequencyMax.value, timing.repeat.frequency.value, 1),\n period: Quantity(\n Coalesce(timing.repeat.period.value, 1.0),\n Coalesce(timing.repeat.periodUnit, 'd')\n ),\n doseChoice: doseAndRate.dose,\n dose:\n case\n when doseChoice is FHIR.Range then FHIRHelpers.ToQuantity((doseChoice as FHIR.Range).high)\n when doseChoice is FHIR.SimpleQuantity then FHIRHelpers.ToQuantity(doseChoice as FHIR.SimpleQuantity)\n else null\n end,\n dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),\n boundsPeriod: timingBoundsToInterval(timing.repeat.bounds),\n daysSupply:\n (convert FHIRHelpers.ToQuantity(R.dispenseRequest.expectedSupplyDuration as FHIR.Duration) to days).value,\n quantity: FHIRHelpers.ToQuantity(R.dispenseRequest.quantity as FHIR.Quantity),\n refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed.value, 0),\n startDate:\n Coalesce(\n date from start of boundsPeriod,\n date from FHIRHelpers.ToDateTime(R.authoredOn as FHIR.dateTime),\n date from start of FHIRHelpers.ToInterval(R.dispenseRequest.validityPeriod as FHIR.Period)\n ),\n totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)\n return\n if startDate is not null and totalDaysSupplied is not null then\n Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]\n else if startDate is not null and boundsPeriod.\"high\" is not null then\n Interval[startDate, date from end of boundsPeriod]\n else\n null</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCumulativeMedicationDuration</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscumulativemedicationduration-quantity\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/**********************************************************************/\n/* Functions in this region are copied from opioid-mme-r4 */\n/**********************************************************************/\n\ndefine function Quantity(value Decimal, unit String):\n if value is not null then\n System.Quantity { value: value, unit: unit }\n else\n null</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCumulativeMedicationDuration</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscumulativemedicationduration-todaily\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n Goal is to get to number of days\n Two broad approaches to the calculation:\n 1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered\n 2) Based on relevant period, determine a covered interval and calculate the length of that interval in days\nThis topic covers several use cases and illustrates how to calculate Cumulative\nMedication Duration for each type of medication resource using the supply and\nfrequency approach.\n*/\n\n/*\n For the first approach, we need to get from frequency to a frequency/day\n So we define ToDaily\n*/\n\n/*\n Calculates daily frequency given frequency within a period\n*/\ndefine function ToDaily(frequency System.Integer, period System.Quantity):\n case period.unit\n when 'h' then frequency * (24.0 / period.value)\n when 'min' then frequency * (24.0 / period.value) * 60\n when 's' then frequency * (24.0 / period.value) * 60 * 60\n when 'd' then frequency * (24.0 / period.value) / 24\n when 'wk' then frequency * (24.0 / period.value) / (24 * 7)\n when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n when 'hour' then frequency * (24.0 / period.value)\n when 'minute' then frequency * (24.0 / period.value) * 60\n when 'second' then frequency * (24.0 / period.value) * 60 * 60\n when 'day' then frequency * (24.0 / period.value) / 24\n when 'week' then frequency * (24.0 / period.value) / (24 * 7)\n when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n when 'hours' then frequency * (24.0 / period.value)\n when 'minutes' then frequency * (24.0 / period.value) * 60\n when 'seconds' then frequency * (24.0 / period.value) * 60 * 60\n when 'days' then frequency * (24.0 / period.value) / 24\n when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)\n when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' & period.unit)\n end</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCumulativeMedicationDuration</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscumulativemedicationduration-timingboundstointerval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Normalizes Timing.repeat.bounds (Duration | Range | Period) to Interval<DateTime>.\n@deprecated: Use AtriusCommon.toTimingBoundsInterval(); retained for include compatibility.\n*/\ndefine function timingBoundsToInterval(bounds Choice<FHIR.Duration, FHIR.Range, FHIR.Period>):\n bounds.toTimingBoundsInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-toobservationeffectiveinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function toObservationEffectiveInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant>):\n choice.toInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-prevalenceinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n*/\ndefine fluent function prevalenceInterval(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n if condition.isActive() then\n Interval[start of condition.onset.toConditionTimingInterval(), end of condition.abatementInterval()]\n else\n (end of condition.abatementInterval()) abatementDate\n return if abatementDate is null then\n Interval[start of condition.onset.toConditionTimingInterval(), abatementDate)\n else\n Interval[start of condition.onset.toConditionTimingInterval(), abatementDate]</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-isactive\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse\n*/\ndefine fluent function isActive(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"active\"\n or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"recurrence\"\n or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"relapse\"</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-toconditiontiminginterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function toConditionTimingInterval(choice Choice<FHIR.dateTime, FHIR.Age, FHIR.Period, FHIR.Range, FHIR.string>):\n choice.toInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-abatementinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns an interval representing the normalized abatement of a given Condition.\n*/\ndefine fluent function abatementInterval(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n condition.abatement.toConditionTimingInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-toperformedinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function toPerformedInterval(performed Choice<FHIR.dateTime, FHIR.Period, FHIR.string, FHIR.Age, FHIR.Range>):\n performed.toInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-observationeffectiveinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@description: Normalizes Observation.effective[x] for any Observation retrieve.\n*/\ndefine fluent function observationEffectiveInterval(observation Observation):\n observation.effective.toObservationEffectiveInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> AtriusCommon</td>\n\n</tr>\n<tr>\n\n <td>\n \n \n \n \n <a name=\"atriuscommon-totimingboundsinterval\"> </a>\n \n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define fluent function toTimingBoundsInterval(bounds Choice<FHIR.Duration, FHIR.Range, FHIR.Period>):\n bounds.toInterval()</code></pre>\n </td>\n\n</tr>\n\n\n\n\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"terminology\"> </a>Terminology</th>\n\n\n</tr>\n \n \n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system LOINC\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://terminology.hl7.org/6.0.2/CodeSystem-v3-loinc.html\">Logical Observation Identifiers, Names and Codes (LOINC)</a>\n <br/>\n <em>Canonical URL</em>: <tt>http://loinc.org</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system ConditionVerificationStatusCodes\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-condition-ver-status.html\">ConditionVerificationStatus</a> version: 2.0.1\n <br/>\n <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status|2.0.1</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system ConditionClinicalStatusCodes\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-condition-clinical.html\">Condition Clinical Status Codes</a> version: 3.0.0\n <br/>\n <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical|3.0.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system DischargeDisposition\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-discharge-disposition.html\">Discharge disposition</a> version: 1.0.1\n <br/>\n <em>Canonical URL</em>: <tt>http://terminology.hl7.org/CodeSystem/discharge-disposition|1.0.1</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system SNOMEDCT\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://hl7.org/fhir/R4/codesystem-snomedct.html\">SNOMED CT (all versions)</a>\n <br/>\n <em>Canonical URL</em>: <tt>http://snomed.info/sct</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set HbA1c Laboratory Test\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-hba1c-laboratory-test.html\">Atrius HbA1c Laboratory Test</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hba1c-laboratory-test|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Office Visit\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-office-visit.html\">Atrius Office Visit</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Annual Wellness Visit\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-annual-wellness-visit.html\">Atrius Annual Wellness Visit</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Preventive Care Services Established Office Visit, 18 and Up\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-preventive-established-18up.html\">Atrius Preventive Care Services Established Office Visit, 18 and Up</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Preventive Care Services Initial Office Visit, 18 and Up\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-preventive-initial-18up.html\">Atrius Preventive Care Services Initial Office Visit, 18 and Up</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Home Healthcare Services\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-home-healthcare.html\">Atrius Home Healthcare Services</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Nutrition Services\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-nutrition-services.html\">Atrius Nutrition Services</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-nutrition-services|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Telephone Visits\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-telephone-visits.html\">Atrius Telephone Visits</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Diabetes\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-diabetes.html\">Atrius Diabetes</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-diabetes|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Encounter Inpatient\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-encounter-inpatient.html\">Atrius Encounter Inpatient</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Hospice Encounter\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-hospice-encounter.html\">Atrius Hospice Encounter</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Hospice Care Ambulatory\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-hospice-care-ambulatory.html\">Atrius Hospice Care Ambulatory</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Hospice Diagnosis\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-hospice-diagnosis.html\">Atrius Hospice Diagnosis</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Frailty Device\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-frailty-device.html\">Atrius Frailty Device</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Frailty Diagnosis\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-frailty-diagnosis.html\">Atrius Frailty Diagnosis</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Frailty Encounter\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-frailty-encounter.html\">Atrius Frailty Encounter</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Frailty Symptom\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-frailty-symptom.html\">Atrius Frailty Symptom</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Advanced Illness\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-advanced-illness.html\">Atrius Advanced Illness</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Dementia Medications\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-dementia-medications.html\">Atrius Dementia Medications</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Palliative Care Diagnosis\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-palliative-care-diagnosis.html\">Atrius Palliative Care Diagnosis</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Palliative Care Encounter\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-palliative-care-encounter.html\">Atrius Palliative Care Encounter</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Value Set</th>\n\n\n \n \n <td class=\"content-container\">\n \n <em>Description</em>: Value set Palliative Care Intervention\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"ValueSet-atrius-vs-palliative-care-intervention.html\">Atrius Palliative Care Intervention</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n \n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Glucose management indicator\n <br/>\n \n <em>Code</em>: 97506-0\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Confirmed\n <br/>\n \n <em>Code</em>: confirmed\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Unconfirmed\n <br/>\n \n <em>Code</em>: unconfirmed\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Provisional\n <br/>\n \n <em>Code</em>: provisional\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Differential\n <br/>\n \n <em>Code</em>: differential\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-ver-status</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Active\n <br/>\n \n <em>Code</em>: active\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Recurrence\n <br/>\n \n <em>Code</em>: recurrence\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Relapse\n <br/>\n \n <em>Code</em>: relapse\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/condition-clinical</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Hospice\n <br/>\n \n <em>Code</em>: hosp\n <br/>\n <em>System</em>: <tt>http://terminology.hl7.org/CodeSystem/discharge-disposition</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Hospice care [Minimum Data Set]\n <br/>\n \n <em>Code</em>: 45755-6\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Yes\n <br/>\n \n <em>Code</em>: 373066001\n <br/>\n <em>System</em>: <tt>http://snomed.info/sct</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Housing status\n <br/>\n \n <em>Code</em>: 71802-3\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Lives in a nursing home\n <br/>\n \n <em>Code</em>: 160734000\n <br/>\n <em>System</em>: <tt>http://snomed.info/sct</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Medical equipment used\n <br/>\n \n <em>Code</em>: 98181-1\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Display</em>: Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)\n <br/>\n \n <em>Code</em>: 71007-9\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"dependencies\"> </a>Dependencies</th>\n\n\n</tr>\n \n \n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: AtriusIn model information\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"Library-AtriusIn-ModelInfo.html\">Atrius India Core Model Definition</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusIn-ModelInfo|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library FHIRHelpers\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library QICoreCommon\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"Library-AtriusCommon.html\">Atrius Common CQL</a> version: 0.1.0\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCommon|0.1.0</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library Status\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library Hospice\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library AIFrailLTCF\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library AtriusCumulativeMedicationDuration\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library PalliativeCare\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000</code>\n <br/>\n <em>Canonical URL</em>: <tt>https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000</tt>\n \n </td>\n</tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n\n \n \n\n\n\n\n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"data-requirements\"> </a>Data Requirements</th>\n\n\n</tr>\n \n \n \n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, effective, value\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hba1c-laboratory-test.html\">Atrius HbA1c Laboratory Test</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, effective, value\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/97506-0\">LOINC: 97506-0</a> (Glucose management indicator)\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, effective, value\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/71802-3\">LOINC: 71802-3</a> (Housing status)\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, value, effective\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/71802-3\">LOINC: 71802-3</a> (Housing status)\n \n \n </span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>Path</em>: value</span>\n <br/>\n \n \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, value, effective\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/98181-1\">LOINC: 98181-1</a> (Medical equipment used)\n \n \n </span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>Path</em>: value</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-device.html\">Atrius Frailty Device</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/observation.html\">Observation</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, effective, value\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-symptom.html\">Atrius Frailty Symptom</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Patient\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a> version: 4.0.1\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-office-visit.html\">Atrius Office Visit</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-annual-wellness-visit.html\">Atrius Annual Wellness Visit</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-preventive-established-18up.html\">Atrius Preventive Care Services Established Office Visit, 18 and Up</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-preventive-initial-18up.html\">Atrius Preventive Care Services Initial Office Visit, 18 and Up</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-home-healthcare.html\">Atrius Home Healthcare Services</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-nutrition-services.html\">Atrius Nutrition Services</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-telephone-visits.html\">Atrius Telephone Visits</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, hospitalization, hospitalization.dischargeDisposition, period, status\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-encounter-inpatient.html\">Atrius Encounter Inpatient</a> version: 0.1.0\n <br/> \n \n \n \n \n <span class=\"tab-one\"><em>Path</em>: hospitalization.dischargeDisposition</span>\n <br/>\n \n \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, period, status\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hospice-encounter.html\">Atrius Hospice Encounter</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-encounter.html\">Atrius Frailty Encounter</a> version: 0.1.0\n <br/> \n \n \n \n \n <span class=\"tab-one\"><em>Path</em>: status</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n [not stated]: finished (finished)\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Encounter\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/encounter.html\">Encounter</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: type, status, period\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: type</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-palliative-care-encounter.html\">Atrius Palliative Care Encounter</a> version: 0.1.0\n <br/> \n \n \n \n \n <span class=\"tab-one\"><em>Path</em>: status</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n [not stated]: finished (finished)\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-encounter-diagnosis.html\">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-diabetes.html\">Atrius Diabetes</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-encounter-diagnosis.html\">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hospice-diagnosis.html\">Atrius Hospice Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-encounter-diagnosis.html\">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-diagnosis.html\">Atrius Frailty Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-encounter-diagnosis.html\">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-advanced-illness.html\">Atrius Advanced Illness</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-encounter-diagnosis.html\">Atrius India Core Condition Encounter Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-palliative-care-diagnosis.html\">Atrius Palliative Care Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-observation-general-assessment.html\">Atrius India Core Observation General Assessment</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, value, effective\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/45755-6\">LOINC: 45755-6</a> (Hospice care [Minimum Data Set])\n \n \n </span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>Path</em>: value</span>\n <br/>\n \n \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Observation\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-observation-general-assessment.html\">Atrius India Core Observation General Assessment</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, effective\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n <a href=\"https://loinc.org/71007-9\">LOINC: 71007-9</a> (Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal))\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: ServiceRequest\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/servicerequest.html\">ServiceRequest</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, authoredOn, status, intent\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hospice-care-ambulatory.html\">Atrius Hospice Care Ambulatory</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Procedure\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/procedure.html\">Procedure</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, performed, status\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hospice-care-ambulatory.html\">Atrius Hospice Care Ambulatory</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Procedure\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/procedure.html\">Procedure</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, performed\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-palliative-care-intervention.html\">Atrius Palliative Care Intervention</a> version: 0.1.0\n <br/> \n \n \n \n \n <span class=\"tab-one\"><em>Path</em>: status</span>\n <br/>\n \n \n \n \n <span class=\"tab-one\"><em>Code(s)</em>: \n \n \n [not stated]: completed (completed)\n \n \n </span>\n <br/>\n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-problems-health-concerns.html\">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-hospice-diagnosis.html\">Atrius Hospice Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-problems-health-concerns.html\">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-diagnosis.html\">Atrius Frailty Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-problems-health-concerns.html\">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-advanced-illness.html\">Atrius Advanced Illness</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Condition\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"StructureDefinition-atrius-in-condition-problems-health-concerns.html\">Atrius India Core Condition Problems Health Concerns</a> version: 0.1.0\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, verificationStatus\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-palliative-care-diagnosis.html\">Atrius Palliative Care Diagnosis</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: DeviceRequest\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/devicerequest.html\">DeviceRequest</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: code, status, intent, authoredOn\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-frailty-device.html\">Atrius Frailty Device</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Medication\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/medication.html\">Medication</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: id, code\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: code</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-dementia-medications.html\">Atrius Dementia Medications</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: MedicationRequest\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/medicationrequest.html\">MedicationRequest</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: medication.reference, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.numberOfRepeatsAllowed.value, authoredOn, dispenseRequest.validityPeriod, status, intent\n <br/>\n \n \n </td>\n</tr>\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: MedicationRequest\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/medicationrequest.html\">MedicationRequest</a> version: 4.0.1\n <br/> \n \n \n \n <em>Must Support Elements</em>: medication, dosageInstruction, dispenseRequest, dispenseRequest.expectedSupplyDuration, dispenseRequest.quantity, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.numberOfRepeatsAllowed.value, authoredOn, dispenseRequest.validityPeriod, status, intent\n <br/>\n \n \n <em>Code Filter(s)</em>: \n <br/>\n \n \n <span class=\"tab-one\"><em>Path</em>: medication</span>\n <br/>\n \n \n \n <span class=\"tab-one\"><em>ValueSet</em>:</span> <a href=\"ValueSet-atrius-vs-dementia-medications.html\">Atrius Dementia Medications</a> version: 0.1.0\n <br/> \n \n \n \n \n </td>\n</tr>\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"parameters\"> </a>Parameters</th>\n\n\n</tr>\n \n \n <tr>\n \n\n<th scope=\"row\" class=\"row-header\"/>\n\n\n <td class=\"content-container\">\n <table>\n <thead>\n <tr>\n <td><em>Name</em></td>\n <td><em>Use</em></td>\n <td><em>Card.</em></td>\n <td><em>Type</em></td>\n <td><em>Documentation</em></td>\n </tr>\n </thead>\n <tbody>\n \n <tr>\n <td>Measurement Period</td>\n <td>In</td>\n <td>0..1</td>\n <td>Period</td>\n <td/>\n </tr>\n \n <tr>\n <td>ErrorLevel</td>\n <td>In</td>\n <td>0..1</td>\n <td>string</td>\n <td/>\n </tr>\n \n <tr>\n <td>Numerator</td>\n <td>Out</td>\n <td>0..1</td>\n <td>boolean</td>\n <td/>\n </tr>\n \n <tr>\n <td>Denominator</td>\n <td>Out</td>\n <td>0..1</td>\n <td>boolean</td>\n <td/>\n </tr>\n \n <tr>\n <td>Initial Population</td>\n <td>Out</td>\n <td>0..1</td>\n <td>boolean</td>\n <td/>\n </tr>\n \n <tr>\n <td>Denominator Exclusions</td>\n <td>Out</td>\n <td>0..1</td>\n <td>boolean</td>\n <td/>\n </tr>\n \n </tbody>\n </table>\n </td>\n</tr>\n\n \n \n\n<tr>\n <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.5.4 of the sample-content-ig Liquid templates</th>\n</tr>\n\n </tbody>\n </table>\n</div>" ] ; fhir:DomainResource.contained [ a fhir:Library ; fhir:index -1 ; fhir:Resource.id [ fhir:value "effective-data-requirements" ] ; fhir:DomainResource.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a loinc:97506-0 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "97506-0" ] ; fhir:Coding.display [ fhir:value "Glucose management indicator" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ] ; fhir:Coding.code [ fhir:value "confirmed" ] ; fhir:Coding.display [ fhir:value "Confirmed" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ] ; fhir:Coding.code [ fhir:value "unconfirmed" ] ; fhir:Coding.display [ fhir:value "Unconfirmed" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ] ; fhir:Coding.code [ fhir:value "provisional" ] ; fhir:Coding.display [ fhir:value "Provisional" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status" ] ; fhir:Coding.code [ fhir:value "differential" ] ; fhir:Coding.display [ fhir:value "Differential" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical" ] ; fhir:Coding.code [ fhir:value "active" ] ; fhir:Coding.display [ fhir:value "Active" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical" ] ; fhir:Coding.code [ fhir:value "recurrence" ] ; fhir:Coding.display [ fhir:value "Recurrence" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical" ] ; fhir:Coding.code [ fhir:value "relapse" ] ; fhir:Coding.display [ fhir:value "Relapse" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/discharge-disposition" ] ; fhir:Coding.code [ fhir:value "hosp" ] ; fhir:Coding.display [ fhir:value "Hospice" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a loinc:45755-6 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "45755-6" ] ; fhir:Coding.display [ fhir:value "Hospice care [Minimum Data Set]" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a sct:373066001 ; fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ; fhir:Coding.code [ fhir:value "373066001" ] ; fhir:Coding.display [ fhir:value "Yes" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a loinc:71802-3 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "71802-3" ] ; fhir:Coding.display [ fhir:value "Housing status" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a sct:160734000 ; fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ; fhir:Coding.code [ fhir:value "160734000" ] ; fhir:Coding.display [ fhir:value "Lives in a nursing home" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a loinc:98181-1 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "98181-1" ] ; fhir:Coding.display [ fhir:value "Medical equipment used" ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode" ] ; fhir:Extension.valueCoding [ a loinc:71007-9 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "71007-9" ] ; fhir:Coding.display [ fhir:value "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)" ] ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Glycemic Status Assessment" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Glycemic Status Assessment\":\n ( [Observation: \"HbA1c Laboratory Test\"]\n union [Observation: \"Glucose management indicator\"]\n ) GlycemicStatus\n where GlycemicStatus.status in { 'final', 'amended', 'corrected' }\n and GlycemicStatus.effective.toObservationEffectiveInterval ( ) during day of \"Measurement Period\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "0"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Most Recent Glycemic Status Date" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Most Recent Glycemic Status Date\":\n Last((\"Glycemic Status Assessment\" QualifyingGlycemicStatus\n return date from end of QualifyingGlycemicStatus.effective.toObservationEffectiveInterval ( )) QualifyingGlycemicStatus\n sort asc\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "1"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Lowest Glycemic Status Assessment Reading on Most Recent Day" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Lowest Glycemic Status Assessment Reading on Most Recent Day\":\n First(\"Glycemic Status Assessment\" QualifyingGlycemicStatus\n where end of QualifyingGlycemicStatus.effective.toObservationEffectiveInterval ( ) same day as \"Most Recent Glycemic Status Date\"\n return {\n QualifyingGlycemicStatusValue: QualifyingGlycemicStatus.value as Quantity,\n QualifyingGlycemicStatus: QualifyingGlycemicStatus\n }\n sort by QualifyingGlycemicStatusValue\n ).QualifyingGlycemicStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "2"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Most Recent Glycemic Status Assessment Without Result" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Most Recent Glycemic Status Assessment Without Result\":\n \"Lowest Glycemic Status Assessment Reading on Most Recent Day\" is not null\n and \"Lowest Glycemic Status Assessment Reading on Most Recent Day\".value is null" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "3"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Most Recent Elevated Glycemic Status Assessment" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Most Recent Elevated Glycemic Status Assessment\":\n \"Lowest Glycemic Status Assessment Reading on Most Recent Day\".value > 9 '%'" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "4"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has No Record Of Glycemic Status Assessment" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has No Record Of Glycemic Status Assessment\":\n not exists \"Glycemic Status Assessment\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "5"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Numerator" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Numerator\":\n \"Has Most Recent Glycemic Status Assessment Without Result\"\n or \"Has Most Recent Elevated Glycemic Status Assessment\"\n or \"Has No Record Of Glycemic Status Assessment\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "6"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Qualifying Encounters" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Qualifying Encounters\":\n ( ( [Encounter: \"Office Visit\"]\n union [Encounter: \"Annual Wellness Visit\"]\n union [Encounter: \"Preventive Care Services Established Office Visit, 18 and Up\"]\n union [Encounter: \"Preventive Care Services Initial Office Visit, 18 and Up\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nutrition Services\"]\n union [Encounter: \"Telephone Visits\"]\n ).isEncounterPerformed ( ) ) ValidEncounters\n where ValidEncounters.period during day of \"Measurement Period\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "7"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Initial Population" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Initial Population\":\n AgeInYearsAt(date from\n end of \"Measurement Period\"\n ) in Interval[18, 75]\n and exists \"Qualifying Encounters\"\n and exists ( ( ( [ConditionEncounterDiagnosis: \"Diabetes\"] ).verified ( ) ) DiabetesDiagnosis\n where DiabetesDiagnosis.prevalenceInterval ( ) overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "8"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Denominator" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Denominator\":\n \"Initial Population\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "9"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusHospice" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Hospice Services" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Hospice Services\":\n exists ( ( ( [Encounter: \"Encounter Inpatient\"] ).isEncounterPerformed() ) InpatientEncounter\n where FHIRHelpers.ToConcept(InpatientEncounter.hospitalization.dischargeDisposition) ~ \"Hospice (HL7 discharge)\"\n and FHIRHelpers.ToInterval(InpatientEncounter.period as FHIR.Period) ends during day of \"Measurement Period\"\n )\n or exists ( ( ( [Encounter: \"Hospice Encounter\"] ).isEncounterPerformed() ) HospiceEncounter\n where FHIRHelpers.ToInterval(HospiceEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )\n or exists ( ( ( [ObservationGeneralAssessment: \"Hospice care [Minimum Data Set]\"] ).isAssessmentPerformed() ) HospiceAssessment\n where FHIRHelpers.ToConcept(HospiceAssessment.value as FHIR.CodeableConcept) ~ \"Yes (qualifier value)\"\n and HospiceAssessment.effective.toObservationEffectiveInterval() overlaps day of \"Measurement Period\"\n )\n or exists ( ( ( [ServiceRequest: \"Hospice Care Ambulatory\"] ).isInterventionOrder() ) HospiceOrder\n where FHIRHelpers.ToDateTime(HospiceOrder.authoredOn) during day of \"Measurement Period\"\n )\n or exists ( ( ( [Procedure: \"Hospice Care Ambulatory\"] ).isInterventionPerformed() ) HospicePerformed\n where HospicePerformed.performed.toPerformedInterval() overlaps day of \"Measurement Period\"\n )\n or exists ( ( (\n [ConditionProblemsHealthConcerns: \"Hospice Diagnosis\"]\n union [ConditionEncounterDiagnosis: \"Hospice Diagnosis\"]\n ).verified() ) HospiceCareDiagnosis\n where HospiceCareDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "10"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Is Age 66 or Older Living Long Term in a Nursing Home" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Is Age 66 or Older Living Long Term in a Nursing Home\":\n AgeInYearsAt(date from end of \"Measurement Period\") >= 66\n and (\n (\n Last(\n [Observation: \"Housing status\"] HousingStatus\n where HousingStatus.status in { 'final', 'amended', 'corrected' }\n and end of HousingStatus.observationEffectiveInterval() on or before day of end of \"Measurement Period\"\n sort by end of observationEffectiveInterval() asc\n )\n ) LastHousingStatus\n where LastHousingStatus.value is FHIR.CodeableConcept\n and FHIRHelpers.ToConcept(LastHousingStatus.value as FHIR.CodeableConcept) ~ \"Lives in nursing home (finding)\"\n ) is not null" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "11"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Frailty Device Order" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Frailty Device Order\":\n exists (\n [DeviceRequest: \"Frailty Device\"] FrailtyDeviceOrder\n where FrailtyDeviceOrder.status in { 'active', 'completed' }\n and FrailtyDeviceOrder.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }\n and Interval[\n FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn),\n FHIRHelpers.ToDateTime(FrailtyDeviceOrder.authoredOn)\n ] during day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "12"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Frailty Equipment Observation" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Frailty Equipment Observation\":\n exists (\n [Observation: \"Medical equipment used\"] EquipmentUsed\n where EquipmentUsed.status in { 'final', 'amended', 'corrected' }\n and EquipmentUsed.value is FHIR.CodeableConcept\n and FHIRHelpers.ToConcept(EquipmentUsed.value as FHIR.CodeableConcept) in \"Frailty Device\"\n and end of EquipmentUsed.observationEffectiveInterval() during day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "13"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Frailty Diagnosis" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Frailty Diagnosis\":\n exists (\n [ConditionProblemsHealthConcerns: \"Frailty Diagnosis\"] FrailtyProblem\n where (\n FrailtyProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(FrailtyProblem.verificationStatus) ~ \"differential\"\n )\n and FrailtyProblem.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Frailty Diagnosis\"] FrailtyEncounterDiagnosis\n where (\n FrailtyEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(FrailtyEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and FrailtyEncounterDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "14"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Frailty Encounter" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Frailty Encounter\":\n exists (\n [Encounter: \"Frailty Encounter\"] FrailtyEncounter\n where FrailtyEncounter.status = 'finished'\n and FHIRHelpers.ToInterval(FrailtyEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "15"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Frailty Symptom Observation" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Frailty Symptom Observation\":\n exists (\n [Observation: \"Frailty Symptom\"] FrailtySymptom\n where FrailtySymptom.status in { 'preliminary', 'final', 'amended', 'corrected' }\n and FrailtySymptom.observationEffectiveInterval() overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "16"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Criteria Indicating Frailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Criteria Indicating Frailty\":\n \"Has Frailty Device Order\"\n or \"Has Frailty Equipment Observation\"\n or \"Has Frailty Diagnosis\"\n or \"Has Frailty Encounter\"\n or \"Has Frailty Symptom Observation\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "17"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Advanced Illness in Year Before or During Measurement Period" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Advanced Illness in Year Before or During Measurement Period\":\n exists (\n [ConditionProblemsHealthConcerns: \"Advanced Illness\"] AdvancedIllnessProblem\n where (\n AdvancedIllnessProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(AdvancedIllnessProblem.verificationStatus) ~ \"differential\"\n )\n and start of AdvancedIllnessProblem.prevalenceInterval() during day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Advanced Illness\"] AdvancedIllnessEncounterDiagnosis\n where (\n AdvancedIllnessEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(AdvancedIllnessEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and start of AdvancedIllnessEncounterDiagnosis.prevalenceInterval() during day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "18"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Dementia Medications in Year Before or During Measurement Period" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Dementia Medications in Year Before or During Measurement Period\":\n exists (\n [MedicationRequest: \"Dementia Medications\"] DementiaMedication\n where DementiaMedication.status = 'active'\n and DementiaMedication.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }\n and DementiaMedication.medicationRequestPeriod() overlaps day of Interval[\n start of \"Measurement Period\" - 1 year,\n end of \"Measurement Period\"\n ]\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "19"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusAdvancedIllnessAndFrailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Is Age 66 or Older with Advanced Illness and Frailty" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Is Age 66 or Older with Advanced Illness and Frailty\":\n AgeInYearsAt(date from end of \"Measurement Period\") >= 66\n and \"Has Criteria Indicating Frailty\"\n and (\n \"Has Advanced Illness in Year Before or During Measurement Period\"\n or \"Has Dementia Medications in Year Before or During Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "20"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusPalliativeCare" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Has Palliative Care in the Measurement Period" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Has Palliative Care in the Measurement Period\":\n exists (\n [ObservationGeneralAssessment: \"Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)\"] PalliativeAssessment\n where PalliativeAssessment.status in { 'final', 'amended', 'corrected' }\n and PalliativeAssessment.effective.toObservationEffectiveInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionProblemsHealthConcerns: \"Palliative Care Diagnosis\"] PalliativeProblem\n where (\n PalliativeProblem.verificationStatus is null\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(PalliativeProblem.verificationStatus) ~ \"differential\"\n )\n and PalliativeProblem.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [ConditionEncounterDiagnosis: \"Palliative Care Diagnosis\"] PalliativeEncounterDiagnosis\n where (\n PalliativeEncounterDiagnosis.verificationStatus is null\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(PalliativeEncounterDiagnosis.verificationStatus) ~ \"differential\"\n )\n and PalliativeEncounterDiagnosis.prevalenceInterval() overlaps day of \"Measurement Period\"\n )\n or exists (\n [Encounter: \"Palliative Care Encounter\"] PalliativeEncounter\n where PalliativeEncounter.status = 'finished'\n and FHIRHelpers.ToInterval(PalliativeEncounter.period as FHIR.Period) overlaps day of \"Measurement Period\"\n )\n or exists (\n [Procedure: \"Palliative Care Intervention\"] PalliativeIntervention\n where PalliativeIntervention.status = 'completed'\n and PalliativeIntervention.performed.toPerformedInterval() overlaps day of \"Measurement Period\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "21"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Denominator Exclusions" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define \"Denominator Exclusions\":\n Hospice.\"Has Hospice Services\"\n or AIFrailLTCF.\"Is Age 66 or Older Living Long Term in a Nursing Home\"\n or AIFrailLTCF.\"Is Age 66 or Older with Advanced Illness and Frailty\"\n or PalliativeCare.\"Has Palliative Care in the Measurement Period\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "22"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value ObservationStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "23"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "toObservationEffectiveInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function toObservationEffectiveInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant>):\n choice.toInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "24"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToQuantity" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity) \nvalue to a CQL Quantity\n@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity\nhas a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)\nan error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.\n@seealso: ToCalendarUnit\n*/\ndefine function ToQuantity(quantity FHIR.Quantity):\n case\n when quantity is null then null\n when quantity.value is null then null\n when quantity.comparator is not null then\n Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')\n when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'\n or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then\n System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }\n else\n Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')\n end" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "25"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToCalendarUnit" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Converts a UCUM definite duration unit to a CQL calendar duration\nunit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities) \ntopic of the CQL specification.\n@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate\n*/\ndefine function ToCalendarUnit(unit System.String):\n case unit\n when 'ms' then 'millisecond'\n when 's' then 'second'\n when 'min' then 'minute'\n when 'h' then 'hour'\n when 'd' then 'day'\n when 'wk' then 'week'\n when 'mo' then 'month'\n when 'a' then 'year'\n else unit\n end" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "26"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "isEncounterPerformed" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function isEncounterPerformed(Enc List<Encounter>):\n Enc E\n where E.status = 'finished'" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "27"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value EncounterStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "28"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)\nvalue to a CQL DateTime Interval\n@comment: If the start value of the given period is unspecified, the starting\nboundary of the resulting interval will be open (meaning the start of the interval\nis unknown, as opposed to interpreted as the beginning of time).\n*/\ndefine function ToInterval(period FHIR.Period):\n if period is null then\n null\n else\n if period.\"start\" is null then\n Interval(period.\"start\".value, period.\"end\".value]\n else\n Interval[period.\"start\".value, period.\"end\".value]" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "29"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "verified" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function verified(\n conditions List<Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>>\n):\n conditions C\n where C.verificationStatus is not null implies (\n FHIRHelpers.ToConcept(C.verificationStatus) ~ \"confirmed\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"unconfirmed\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"provisional\"\n or FHIRHelpers.ToConcept(C.verificationStatus) ~ \"differential\"\n )" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "30"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToConcept" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n if concept is null then\n null\n else\n System.Concept {\n codes: concept.coding C return ToCode(C),\n display: concept.text.value\n }" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "31"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToCode" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "32"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "prevalenceInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n*/\ndefine fluent function prevalenceInterval(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n if condition.isActive() then\n Interval[start of condition.onset.toConditionTimingInterval(), end of condition.abatementInterval()]\n else\n (end of condition.abatementInterval()) abatementDate\n return if abatementDate is null then\n Interval[start of condition.onset.toConditionTimingInterval(), abatementDate)\n else\n Interval[start of condition.onset.toConditionTimingInterval(), abatementDate]" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "33"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "isActive" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse\n*/\ndefine fluent function isActive(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"active\"\n or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"recurrence\"\n or FHIRHelpers.ToConcept(condition.clinicalStatus) ~ \"relapse\"" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "34"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "toConditionTimingInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function toConditionTimingInterval(choice Choice<FHIR.dateTime, FHIR.Age, FHIR.Period, FHIR.Range, FHIR.string>):\n choice.toInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "35"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "abatementInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Returns an interval representing the normalized abatement of a given Condition.\n*/\ndefine fluent function abatementInterval(condition Choice<ConditionEncounterDiagnosis, ConditionProblemsHealthConcerns>):\n condition.abatement.toConditionTimingInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "36"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "isAssessmentPerformed" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function isAssessmentPerformed(Obs List<Observation>):\n Obs O\n where O.status in { 'final', 'amended', 'corrected' }" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "37"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "isInterventionOrder" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function isInterventionOrder(ServiceRequest List<ServiceRequest>):\n ServiceRequest S\n where S.status in { 'active', 'completed' }\n and S.intent in {\n 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order'\n }" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "38"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value ServiceRequestStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "39"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value ServiceRequestIntent): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "40"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToDateTime" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToDateTime(value dateTime): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "41"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusStatus" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "isInterventionPerformed" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function isInterventionPerformed(Proc List<Procedure>):\n Proc P\n where P.status = 'completed'" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "42"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value ProcedureStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "43"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "toPerformedInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function toPerformedInterval(performed Choice<FHIR.dateTime, FHIR.Period, FHIR.string, FHIR.Age, FHIR.Range>):\n performed.toInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "44"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "observationEffectiveInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Normalizes Observation.effective[x] for any Observation retrieve.\n*/\ndefine fluent function observationEffectiveInterval(observation Observation):\n observation.effective.toObservationEffectiveInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "45"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value DeviceRequestStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "46"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value RequestIntent): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "47"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value string): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "48"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value MedicationRequestStatus): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "49"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value MedicationRequestIntent): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "50"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCumulativeMedicationDuration" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "medicationRequestPeriod" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\nNow that we have a ToDaily function, we can approach calculation of the\nduration of medication for an order. First, consider the definitions\nfor each element:\n* 1 and only 1 dosageInstruction\n* 1 and only 1 doseAndRate\n* 1 timing with 1 repeat\n* frequency, frequencyMax, defaulting to 1\n* period, periodUnit, defaulting to 1 'd'\n* doseQuantity or doseRange\n* timeOfDay\n* authoredOn: The date the prescription was written\n* dispenseRequest.validityPeriod: Time period supply is authorized for\n* dispenseRequest.quantity: amount of medication supplied per dispense\n* dispenseRequest.numberOfRepeatsAllowed: number of refills authorized\n* dispenseRequest.expectedSupplyDuration: number of days supply per dispense\n* dosageInstruction.timing.repeat.boundsDuration: total duration of the repeat\n* dosageInstruction.timing.repeat.boundsRange: range of durations of the repeat\n* dosageInstruction.timing.repeat.boundsPeriod: period bounds of the repeat\n* dosageInstruction.timing.repeat.count: number of times to repeat\n* dosageInstruction.timing.repeat.countMax: maximum number of times to repeat\n* dosageInstruction.timing.repeat.frequency: event occurs frequency times per period\n* dosageInstruction.timing.repeat.frequencyMax: event occurs up to frequencyMax times per period\n* dosageInstruction.timing.repeat.period: event occurs frequency times per period\n* dosageInstruction.timing.repeat.periodMax: upper limit of period\n* dosageInstruction.timing.repeat.periodUnit: period duration (s | min | h | d | wk | mo | a)\n* dosageInstruction.timing.repeat.timeOfDay: time of day for the event (0..*)\n* dosageInstruction.timing.repeat.when: event timing (HS | WAKE | C | CM | CD | CV | AC | ACM...)\n* dosageInstruction.timing.code: BID | TID | QID | AM | PM | QD | QOD...\n* dosageInstruction.asNeeded\n* dosageInstruction.doseAndRate.doseQuantity\n* dosageInstruction.doseAndRate.doseRange\nIf expectedSupplyDuration is present, then the duration is\n expectedSupplyDuration * (1 + numberOfRepeatsAllowed)\nIf expectedSupplyDuration is not present, then it must be calculated based on the quantity, dosage, and frequency:\n (quantity / (dosage * frequency)) * (1 + numberOfRepeatsAllowed)\n dosage: Coalesce(end of doseAndRate.doseRange, doseAndRate.doseQuantity)\n frequency: Coalesce(frequencyMax, frequency)\n period: Quantity(period, periodUnit)\nIf expectedSupplyDuration is not present and cannot be calculated, and the boundsPeriod is present (and completely specified), we can use that directly\n dosage.timing.repeat.boundsPeriod\nThis calculation results in a number of days, which can then be turned into a period by anchoring that to the\nstart of the validityPeriod or the authoredOn:\n Interval[earliestDispensable, earliestDispensable + expectedSupplyDuration - 1]\n earliestDispensable: Coalesce(start of validityPeriod, authoredOn)\nThe following function illustrates this completely:\n*/\n\n/*\nCalculates the Medication Period for a single MedicationRequest.\nMedicationRequest instances provided to this function are expected\nto conform to the [MMEMedicationRequest](http://build.fhir.org/ig/cqframework/opioid-mme-r4/StructureDefinition-mmemedicationrequest.html)\nprofile, which expects:\n* 1 and only 1 dosageInstruction, multiple dosageInstruction elements will result in an error\n* 1 and only 1 doseAndRate, multiple doseAndRate elements will result in an error\n* 1 timing with 1 repeat, missing timing or repeat elements will result in a null\n* frequency, frequencyMax, defaulting to 1\n* period, periodUnit, defaulting to 1 'd'\n* timeOfDay\n* doseQuantity or doseRange, missing doseQuantity and doseRange will result in a null\nNote that MedicationRequest status is not considered by this calculation, as the\nlist of MedicationRequest instances provided to this function should already have\nconsidered appropriate statuses, depending on the use case, typically `completed`.\n*/\n\ndefine fluent function medicationRequestPeriod(sourceRequest \"MedicationRequest\"):\n sourceRequest R\n let\n dosage: singleton from R.dosageInstruction,\n doseAndRate: singleton from dosage.doseAndRate,\n timing: dosage.timing,\n frequency: Coalesce(timing.repeat.frequencyMax.value, timing.repeat.frequency.value, 1),\n period: Quantity(\n Coalesce(timing.repeat.period.value, 1.0),\n Coalesce(timing.repeat.periodUnit, 'd')\n ),\n doseChoice: doseAndRate.dose,\n dose:\n case\n when doseChoice is FHIR.Range then FHIRHelpers.ToQuantity((doseChoice as FHIR.Range).high)\n when doseChoice is FHIR.SimpleQuantity then FHIRHelpers.ToQuantity(doseChoice as FHIR.SimpleQuantity)\n else null\n end,\n dosesPerDay: Coalesce(ToDaily(frequency, period), Count(timing.repeat.timeOfDay), 1.0),\n boundsPeriod: timingBoundsToInterval(timing.repeat.bounds),\n daysSupply:\n (convert FHIRHelpers.ToQuantity(R.dispenseRequest.expectedSupplyDuration as FHIR.Duration) to days).value,\n quantity: FHIRHelpers.ToQuantity(R.dispenseRequest.quantity as FHIR.Quantity),\n refills: Coalesce(R.dispenseRequest.numberOfRepeatsAllowed.value, 0),\n startDate:\n Coalesce(\n date from start of boundsPeriod,\n date from FHIRHelpers.ToDateTime(R.authoredOn as FHIR.dateTime),\n date from start of FHIRHelpers.ToInterval(R.dispenseRequest.validityPeriod as FHIR.Period)\n ),\n totalDaysSupplied: Coalesce(daysSupply, quantity.value / (dose.value * dosesPerDay)) * (1 + refills)\n return\n if startDate is not null and totalDaysSupplied is not null then\n Interval[startDate, startDate + Quantity(totalDaysSupplied - 1, 'day') ]\n else if startDate is not null and boundsPeriod.\"high\" is not null then\n Interval[startDate, date from end of boundsPeriod]\n else\n null" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "51"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCumulativeMedicationDuration" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "Quantity" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/**********************************************************************/\n/* Functions in this region are copied from opioid-mme-r4 */\n/**********************************************************************/\n\ndefine function Quantity(value Decimal, unit String):\n if value is not null then\n System.Quantity { value: value, unit: unit }\n else\n null" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "52"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "FHIRHelpers" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToString" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define function ToString(value UnitsOfTime): value.value" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "53"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCumulativeMedicationDuration" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "ToDaily" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n Goal is to get to number of days\n Two broad approaches to the calculation:\n 1) Based on supply and frequency, calculate the number of expected days the medication will cover/has covered\n 2) Based on relevant period, determine a covered interval and calculate the length of that interval in days\nThis topic covers several use cases and illustrates how to calculate Cumulative\nMedication Duration for each type of medication resource using the supply and\nfrequency approach.\n*/\n\n/*\n For the first approach, we need to get from frequency to a frequency/day\n So we define ToDaily\n*/\n\n/*\n Calculates daily frequency given frequency within a period\n*/\ndefine function ToDaily(frequency System.Integer, period System.Quantity):\n case period.unit\n when 'h' then frequency * (24.0 / period.value)\n when 'min' then frequency * (24.0 / period.value) * 60\n when 's' then frequency * (24.0 / period.value) * 60 * 60\n when 'd' then frequency * (24.0 / period.value) / 24\n when 'wk' then frequency * (24.0 / period.value) / (24 * 7)\n when 'mo' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'a' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n when 'hour' then frequency * (24.0 / period.value)\n when 'minute' then frequency * (24.0 / period.value) * 60\n when 'second' then frequency * (24.0 / period.value) * 60 * 60\n when 'day' then frequency * (24.0 / period.value) / 24\n when 'week' then frequency * (24.0 / period.value) / (24 * 7)\n when 'month' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'year' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n when 'hours' then frequency * (24.0 / period.value)\n when 'minutes' then frequency * (24.0 / period.value) * 60\n when 'seconds' then frequency * (24.0 / period.value) * 60 * 60\n when 'days' then frequency * (24.0 / period.value) / 24\n when 'weeks' then frequency * (24.0 / period.value) / (24 * 7)\n when 'months' then frequency * (24.0 / period.value) / (24 * 30) /* assuming 30 days in month */\n when 'years' then frequency * (24.0 / period.value) / (24 * 365) /* assuming 365 days in year */\n else Message(null, true, 'CMDLogic.ToDaily.UnknownUnit', ErrorLevel, 'Unknown unit ' & period.unit)\n end" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "54"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCumulativeMedicationDuration" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "timingBoundsToInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "/*\n@description: Normalizes Timing.repeat.bounds (Duration | Range | Period) to Interval<DateTime>.\n@deprecated: Use AtriusCommon.toTimingBoundsInterval(); retained for include compatibility.\n*/\ndefine function timingBoundsToInterval(bounds Choice<FHIR.Duration, FHIR.Range, FHIR.Period>):\n bounds.toTimingBoundsInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "55"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "libraryName" ] ; fhir:Extension.valueString [ fhir:value "AtriusCommon" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "name" ] ; fhir:Extension.valueString [ fhir:value "toTimingBoundsInterval" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "statement" ] ; fhir:Extension.valueString [ fhir:value "define fluent function toTimingBoundsInterval(bounds Choice<FHIR.Duration, FHIR.Range, FHIR.Period>):\n bounds.toInterval()" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "displaySequence" ] ; fhir:Extension.valueInteger [ fhir:value "56"^^xsd:integer ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ] ] ; fhir:Library.name [ fhir:value "EffectiveDataRequirements" ] ; fhir:Library.status [ fhir:value "active" ] ; fhir:Library.type [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/library-type" ] ; fhir:Coding.code [ fhir:value "module-definition" ] ] ] ; fhir:Library.relatedArtifact [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "AtriusIn model information" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusIn-ModelInfo|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusIn-ModelInfo|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library FHIRHelpers" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/FHIRHelpers|4.4.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library QICoreCommon" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusCommon|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusCommon|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library Status" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusStatus|1.15.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library Hospice" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusHospice|6.18.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library AIFrailLTCF" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusAdvancedIllnessAndFrailty|1.27.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library AtriusCumulativeMedicationDuration" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusCumulativeMedicationDuration|6.0.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Library PalliativeCare" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusPalliativeCare|1.18.000> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Code system LOINC" ] ; fhir:RelatedArtifact.resource [ fhir:value "http://loinc.org" ; fhir:link <http://loinc.org> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Code system ConditionVerificationStatusCodes" ] ; fhir:RelatedArtifact.resource [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-ver-status|2.0.1" ; fhir:link <http://terminology.hl7.org/CodeSystem/condition-ver-status|2.0.1> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Code system ConditionClinicalStatusCodes" ] ; fhir:RelatedArtifact.resource [ fhir:value "http://terminology.hl7.org/CodeSystem/condition-clinical|3.0.0" ; fhir:link <http://terminology.hl7.org/CodeSystem/condition-clinical|3.0.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Code system DischargeDisposition" ] ; fhir:RelatedArtifact.resource [ fhir:value "http://terminology.hl7.org/CodeSystem/discharge-disposition|1.0.1" ; fhir:link <http://terminology.hl7.org/CodeSystem/discharge-disposition|1.0.1> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Code system SNOMEDCT" ] ; fhir:RelatedArtifact.resource [ fhir:value "http://snomed.info/sct" ; fhir:link <http://snomed.info/sct> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set HbA1c Laboratory Test" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hba1c-laboratory-test|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hba1c-laboratory-test|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Office Visit" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Annual Wellness Visit" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Preventive Care Services Established Office Visit, 18 and Up" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Preventive Care Services Initial Office Visit, 18 and Up" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Home Healthcare Services" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Nutrition Services" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-nutrition-services|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-nutrition-services|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Telephone Visits" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Diabetes" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-diabetes|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-diabetes|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Encounter Inpatient" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Hospice Encounter" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Hospice Care Ambulatory" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Hospice Diagnosis" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Frailty Device" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Frailty Diagnosis" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Frailty Encounter" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Frailty Symptom" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Advanced Illness" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Dementia Medications" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Palliative Care Diagnosis" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Palliative Care Encounter" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0> ] ], [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Value set Palliative Care Intervention" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0> ] ] ; fhir:Library.parameter [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "Measurement Period" ] ; fhir:ParameterDefinition.use [ fhir:value "in" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "Period" ] ], [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "ErrorLevel" ] ; fhir:ParameterDefinition.use [ fhir:value "in" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "string" ] ], [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "Numerator" ] ; fhir:ParameterDefinition.use [ fhir:value "out" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "boolean" ] ], [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "Denominator" ] ; fhir:ParameterDefinition.use [ fhir:value "out" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "boolean" ] ], [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "Initial Population" ] ; fhir:ParameterDefinition.use [ fhir:value "out" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "boolean" ] ], [ fhir:index -1 ; fhir:ParameterDefinition.name [ fhir:value "Denominator Exclusions" ] ; fhir:ParameterDefinition.use [ fhir:value "out" ] ; fhir:ParameterDefinition.min [ fhir:value "0"^^xsd:integer ] ; fhir:ParameterDefinition.max [ fhir:value "1" ] ; fhir:ParameterDefinition.type [ fhir:value "boolean" ] ] ; fhir:Library.dataRequirement [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hba1c-laboratory-test|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hba1c-laboratory-test|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:97506-0 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "97506-0" ] ; fhir:Coding.display [ fhir:value "Glucose management indicator" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:71802-3 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "71802-3" ] ; fhir:Coding.display [ fhir:value "Housing status" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:71802-3 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "71802-3" ] ; fhir:Coding.display [ fhir:value "Housing status" ] ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "value" ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:98181-1 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "98181-1" ] ; fhir:Coding.display [ fhir:value "Medical equipment used" ] ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "value" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Observation|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Observation|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-symptom|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Patient" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Patient|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Patient|4.0.1> ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-office-visit|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-annual-wellness-visit|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-established-18up|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-preventive-initial-18up|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-home-healthcare|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-nutrition-services|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-nutrition-services|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-telephone-visits|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "hospitalization" ; fhir:index -1 ], [ fhir:value "hospitalization.dischargeDisposition" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-encounter-inpatient|0.1.0> ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "hospitalization.dischargeDisposition" ] ] ; fhir:DataRequirement.dateFilter [ fhir:index -1 ; fhir:DataRequirement.dateFilter.path [ fhir:value "period" ] ; fhir:DataRequirement.dateFilter.valuePeriod [ fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-expression" ] ; fhir:Extension.valueExpression [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Measurement Period" ] ] ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-encounter|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-encounter|0.1.0> ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "status" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; fhir:Coding.code [ fhir:value "finished" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Encounter" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Encounter|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "type" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "period" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "type" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-encounter|0.1.0> ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "status" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; fhir:Coding.code [ fhir:value "finished" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-diabetes|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-diabetes|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-encounter-diagnosis|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "value" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:45755-6 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "45755-6" ] ; fhir:Coding.display [ fhir:value "Hospice care [Minimum Data Set]" ] ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "value" ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Observation" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-observation-general-assessment|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "effective" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; a loinc:71007-9 ; fhir:Coding.system [ fhir:value "http://loinc.org" ] ; fhir:Coding.code [ fhir:value "71007-9" ] ; fhir:Coding.display [ fhir:value "Functional Assessment of Chronic Illness Therapy - Palliative Care Questionnaire (FACIT-Pal)" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "ServiceRequest" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/ServiceRequest|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/ServiceRequest|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "authoredOn" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "intent" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0> ] ] ; fhir:DataRequirement.dateFilter [ fhir:index -1 ; fhir:DataRequirement.dateFilter.path [ fhir:value "authoredOn" ] ; fhir:DataRequirement.dateFilter.valuePeriod [ fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-expression" ] ; fhir:Extension.valueExpression [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Measurement Period" ] ] ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Procedure" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "performed" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-care-ambulatory|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Procedure" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Procedure|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "performed" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-intervention|0.1.0> ] ], [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "status" ] ; fhir:DataRequirement.codeFilter.code [ fhir:index -1 ; fhir:Coding.code [ fhir:value "completed" ] ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-hospice-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-advanced-illness|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "Condition" ] ; fhir:DataRequirement.profile [ fhir:value "https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/StructureDefinition/atrius-in-condition-problems-health-concerns|0.1.0> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "verificationStatus" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-palliative-care-diagnosis|0.1.0> ] ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "DeviceRequest" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/DeviceRequest|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/DeviceRequest|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "code" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "intent" ; fhir:index -1 ], [ fhir:value "authoredOn" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-frailty-device|0.1.0> ] ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "targetId" ] ; fhir:Extension.valueString [ fhir:value "831" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "targetProperty" ] ; fhir:Extension.valueString [ fhir:value "medication" ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-relatedRequirement" ] ] ; fhir:DataRequirement.type [ fhir:value "Medication" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/Medication|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/Medication|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "id" ; fhir:index -1 ], [ fhir:value "code" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "code" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0> ] ] ], [ fhir:index -1 ; fhir:Element.id [ fhir:value "831" ] ; fhir:DataRequirement.type [ fhir:value "MedicationRequest" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "medication.reference" ; fhir:index -1 ], [ fhir:value "dosageInstruction" ; fhir:index -1 ], [ fhir:value "dispenseRequest" ; fhir:index -1 ], [ fhir:value "dispenseRequest.expectedSupplyDuration" ; fhir:index -1 ], [ fhir:value "dispenseRequest.quantity" ; fhir:index -1 ], [ fhir:value "dispenseRequest.numberOfRepeatsAllowed" ; fhir:index -1 ], [ fhir:value "dispenseRequest.numberOfRepeatsAllowed.value" ; fhir:index -1 ], [ fhir:value "authoredOn" ; fhir:index -1 ], [ fhir:value "dispenseRequest.validityPeriod" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "intent" ; fhir:index -1 ] ], [ fhir:index -1 ; fhir:DataRequirement.type [ fhir:value "MedicationRequest" ] ; fhir:DataRequirement.profile [ fhir:value "http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1" ; fhir:index -1 ; fhir:link <http://hl7.org/fhir/StructureDefinition/MedicationRequest|4.0.1> ] ; fhir:DataRequirement.mustSupport [ fhir:value "medication" ; fhir:index -1 ], [ fhir:value "dosageInstruction" ; fhir:index -1 ], [ fhir:value "dispenseRequest" ; fhir:index -1 ], [ fhir:value "dispenseRequest.expectedSupplyDuration" ; fhir:index -1 ], [ fhir:value "dispenseRequest.quantity" ; fhir:index -1 ], [ fhir:value "dispenseRequest.numberOfRepeatsAllowed" ; fhir:index -1 ], [ fhir:value "dispenseRequest.numberOfRepeatsAllowed.value" ; fhir:index -1 ], [ fhir:value "authoredOn" ; fhir:index -1 ], [ fhir:value "dispenseRequest.validityPeriod" ; fhir:index -1 ], [ fhir:value "status" ; fhir:index -1 ], [ fhir:value "intent" ; fhir:index -1 ] ; fhir:DataRequirement.codeFilter [ fhir:index -1 ; fhir:DataRequirement.codeFilter.path [ fhir:value "medication" ] ; fhir:DataRequirement.codeFilter.valueSet [ fhir:value "https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/ValueSet/atrius-vs-dementia-medications|0.1.0> ] ] ] ] ; fhir:DomainResource.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis" ] ; fhir:Extension.valueCode [ fhir:value "boolean" ] ], [ fhir:index -1 ; fhir:Element.extension [ fhir:index -1 ; fhir:Extension.url [ fhir:value "usage" ] ; fhir:Extension.valueCodeableConcept [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-data-usage" ] ; fhir:Coding.code [ fhir:value "supplemental-data" ] ] ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "guidance" ] ; fhir:Extension.valueMarkdown [ fhir:value "SDE Sex uses Patient.gender mapped to the same SNOMED Male/Female findings as CMS. SDE Payer uses AtriusIn coverage payer type (PM-JAY, ESIS, private, public, self-pay). SDE Residence (state/district) and SDE Urban Rural replace US Core race and ethnicity and are not US-comparable. Direct CPT/HCPCS nutrition-therapy encounter codes are omitted; Nutrition Services ValueSet carries that intent." ] ] ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance" ] ], [ fhir:index -1 ; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" ] ; fhir:Extension.valueCanonical [ fhir:value "#effective-data-requirements" ] ] ; fhir:Measure.url [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Measure/AtriusCMS122DiabetesAssessGT9Pct"] ; fhir:Measure.identifier [ fhir:index -1 ; fhir:Identifier.use [ fhir:value "official" ] ; fhir:Identifier.type [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/artifact-identifier-type" ] ; fhir:Coding.code [ fhir:value "version-independent" ] ] ] ; fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ; fhir:Identifier.value [ fhir:value "urn:uuid:babcc365-49df-5b17-988c-656c11cde8f9" ] ], [ fhir:index -1 ; fhir:Identifier.use [ fhir:value "official" ] ; fhir:Identifier.type [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/artifact-identifier-type" ] ; fhir:Coding.code [ fhir:value "version-specific" ] ] ] ; fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ; fhir:Identifier.value [ fhir:value "urn:uuid:655fe76d-924c-5ad6-8be8-a4b15f90990b" ] ], [ fhir:index -1 ; fhir:Identifier.use [ fhir:value "usual" ] ; fhir:Identifier.type [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/artifact-identifier-type" ] ; fhir:Coding.code [ fhir:value "short-name" ] ] ] ; fhir:Identifier.value [ fhir:value "CMS122" ] ], [ fhir:index -1 ; fhir:Identifier.use [ fhir:value "official" ] ; fhir:Identifier.system [ fhir:value "https://atrius.in/fhir/r4/atrius-in" ] ; fhir:Identifier.value [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct" ] ], [ fhir:index -1 ; fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ; fhir:Identifier.value [ fhir:value "urn:oid:1.3.6.1.4.1.66219.1.29.3" ] ] ; fhir:Measure.version [ fhir:value "0.1.0"] ; fhir:Measure.name [ fhir:value "AtriusCMS122DiabetesAssessGT9Pct"] ; fhir:Measure.title [ fhir:value "Diabetes: HbA1c Poor Control >9% (Atrius CMS122)"] ; fhir:Measure.status [ fhir:value "draft"] ; fhir:Measure.experimental [ fhir:value "true"^^xsd:boolean] ; fhir:Measure.date [ fhir:value "2026-09-21"^^xsd:date] ; fhir:Measure.publisher [ fhir:value "Atrius"] ; fhir:Measure.contact [ fhir:index -1 ; fhir:ContactDetail.name [ fhir:value "Atrius" ] ; fhir:ContactDetail.telecom [ fhir:index -1 ; fhir:ContactPoint.system [ fhir:value "url" ] ; fhir:ContactPoint.value [ fhir:value "https://atrius.in" ] ] ] ; fhir:Measure.description [ fhir:value "Proportion measure: adults 18–75 with diabetes and a qualifying outpatient encounter whose most recent glycemic status is >9%, missing, or unresulted. CMS labels this intermediate-outcome; THO measure-type 3.0.1 has no such code, so type is outcome. Improvement is decrease."] ; fhir:Measure.relatedArtifact [ fhir:index -1 ; fhir:RelatedArtifact.type [ fhir:value "depends-on" ] ; fhir:RelatedArtifact.display [ fhir:value "Atrius CMS122 CQL Library" ] ; fhir:RelatedArtifact.resource [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS122DiabetesAssessGT9Pct|0.1.0" ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS122DiabetesAssessGT9Pct|0.1.0> ] ] ; fhir:Measure.library [ fhir:value "https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS122DiabetesAssessGT9Pct|0.1.0" ; fhir:index -1 ; fhir:link <https://atrius.in/fhir/r4/atrius-in/Library/AtriusCMS122DiabetesAssessGT9Pct|0.1.0> ] ; fhir:Measure.scoring [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-scoring" ] ; fhir:Coding.code [ fhir:value "proportion" ] ] ] ; fhir:Measure.type [ fhir:index -1 ; fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-type" ] ; fhir:Coding.code [ fhir:value "outcome" ] ] ] ; fhir:Measure.improvementNotation [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-improvement-notation" ] ; fhir:Coding.code [ fhir:value "decrease" ] ] ] ; fhir:Measure.group [ fhir:index -1 ; fhir:Element.id [ fhir:value "group-1" ] ; fhir:Measure.group.population [ fhir:index -1 ; fhir:Element.id [ fhir:value "initial-population" ] ; fhir:Measure.group.population.code [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ] ; fhir:Coding.code [ fhir:value "initial-population" ] ] ] ; fhir:Measure.group.population.criteria [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Initial Population" ] ] ], [ fhir:index -1 ; fhir:Element.id [ fhir:value "denominator" ] ; fhir:Measure.group.population.code [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ] ; fhir:Coding.code [ fhir:value "denominator" ] ] ] ; fhir:Measure.group.population.criteria [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Denominator" ] ] ], [ fhir:index -1 ; fhir:Element.id [ fhir:value "denominator-exclusion" ] ; fhir:Measure.group.population.code [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ] ; fhir:Coding.code [ fhir:value "denominator-exclusion" ] ] ] ; fhir:Measure.group.population.criteria [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Denominator Exclusions" ] ] ], [ fhir:index -1 ; fhir:Element.id [ fhir:value "numerator" ] ; fhir:Measure.group.population.code [ fhir:CodeableConcept.coding [ fhir:index -1 ; fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/measure-population" ] ; fhir:Coding.code [ fhir:value "numerator" ] ] ] ; fhir:Measure.group.population.criteria [ fhir:Expression.language [ fhir:value "text/cql-identifier" ] ; fhir:Expression.expression [ fhir:value "Numerator" ] ] ] ] . # - ontology header ------------------------------------------------------------ <http://hl7.org/fhir/Measure/AtriusCMS122DiabetesAssessGT9Pct.ttl> a owl:Ontology ; owl:imports fhir:fhir.ttl ; owl:versionIRI <http://build.fhir.org/Measure/AtriusCMS122DiabetesAssessGT9Pct.ttl> .
IG © 2026+ Atrius.
Package atrius.fhir.r4.india#0.1.0 based on FHIR 4.0.1.
Generated
2026-09-21
Links: Table of Contents |
QA Report