Person-Centered Outcomes (PCO) Implementation Guide
1.0.0-ballot - STU 1 Ballot United States of America flag

This page is part of the Person-Centered Outcomes (PCO) Implementation Guide (v1.0.0-ballot: STU 1 Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. No current official version has been published yet. For a full list of available versions, see the Directory of published versions

: Person-Centered Goal Follow-Up - XML Representation

Page standards status: Informative

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="GoalFollowUpMeasure"/>
  <text>
    <status value="extensions"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
  <table class="narrative-table">
    <tbody>
<tr>

<th colspan="2" scope="row" class="row-header">Knowledge Artifact Metadata</th>

</tr>

<tr>

<th scope="row" class="row-header">Name (machine-readable)</th>

<td class="content-container">GoalFollowUpMeasure</td>
</tr>


<tr>

<th scope="row" class="row-header">Title (human-readable)</th>

<td class="content-container">Person-Centered Goal Follow-Up</td>
</tr>



<tr>

<th scope="row" class="row-header">Status</th>

<td class="content-container">Draft</td>
</tr>


<tr>

<th scope="row" class="row-header">Experimental</th>

<td class="content-container">true</td>
</tr>


<tr>

<th scope="row" class="row-header">Description</th>

<td class="content-container"><div><p>Measure 2 - Goal Follow-up: % of individuals 18 years of age or older with a complex care need who received follow-up on their PCO goal within two weeks to six months of when the PCO goal and GAS or PROM were identified.</p>
</div></td>
</tr>


<tr>

<th scope="row" class="row-header">Purpose</th>

<td class="content-container"><div><p>Goal Attainment Scaling (GAS) in healthcare measures the extent to which individuals achieve specific goals or objectives. It allows for the quantification and evaluation of progress toward individualized goals, particularly in areas where traditional outcome measures may be insufficient.</p>
</div></td>
</tr>


<tr>

<th scope="row" class="row-header">Clinical Usage</th>

<td class="content-container">Content TBD.</td>
</tr>





<tr>

<th scope="row" class="row-header">Effective Period</th>

<td class="content-container">2024-01-01..2024-12-31</td>
</tr>





<tr>

<th scope="row" class="row-header">Measure Developer</th>

<td class="content-container">HL7 International / Patient Care: <a href="http://www.hl7.org/Special/committees/patientcare">http://www.hl7.org/Special/committees/patientcare</a></td>
</tr>





<tr>

<th scope="row" class="row-header">Measure Steward</th>

<td class="content-container">HL7 International / Patient Care</td>
</tr>


<tr>

<th scope="row" class="row-header">Steward Contact Details</th>

<td class="content-container">HL7 International / Patient Care: <a href="http://www.hl7.org/Special/committees/patientcare">http://www.hl7.org/Special/committees/patientcare</a>,<a href="mailto:patientcare@lists.HL7.org">patientcare@lists.HL7.org</a></td>
</tr>


<tr>

<th scope="row" class="row-header">Copyright</th>

<td class="content-container"><div><p>Measure definition is copyright 2024 by NCQA.</p>
<p>LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved.</p>
</div></td>
</tr>










<tr>

<th colspan="2" scope="row" class="row-header">Measure Metadata</th>

</tr>






<tr>

<th scope="row" class="row-header">Version Number</th>

<td class="content-container">1.0.0-ballot</td>
</tr>


<tr>

<th scope="row" class="row-header">Measure Scoring</th>

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring proportion}">Proportion</span></td>
</tr>






<tr>

<th scope="row" class="row-header">Rationale</th>

<td class="content-container"><div><p>Goal-directed care in healthcare centers on setting and achieving specific, personalized goals that prioritize an individual's well-being and &quot;What Matters Most&quot; to each person. Rather than just treating symptoms, this approach involves close collaboration between patients, caregivers, and healthcare providers to identify individual goals related to health outcomes, functional improvement, or symptom management. Once goals are established, tailored care plans are developed, incorporating various treatments, therapies, and lifestyle adjustments to meet the individual's needs and preferences. Continual monitoring and adjustment ensure alignment with evolving priorities, fostering patient engagement and satisfaction while enhancing overall healthcare effectiveness.</p>
</div></td>
</tr>


<tr>

<th scope="row" class="row-header">Clinical Recommendation Statement</th>

<td class="content-container"><div><p>None at this time.</p>
</div></td>
</tr>









  
    
    <tr>

<th colspan="2" scope="row" class="row-header">Measure Population Criteria (ID: 64f0d91d56d636294b157d97)</th>

</tr>
  
  
    
<tr>

<th scope="row" class="row-header">Summary</th>

<td class="content-container">Content TBD</td>
</tr>

  
  
  
    <tr>
      
        
<th scope="row" class="row-header">Initial Population</th>

      
      <td class="content-container">
        
        <em>ID</em>: 692C6F6B-4153-496F-8582-0839A0816567
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Individuals 18 years of age and older.</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#goalfollowupmeasure-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        
<th scope="row" class="row-header">Denominator</th>

      
      <td class="content-container">
        
        <em>ID</em>: 3116F1E4-8334-4CA0-9BEF-16CFEEDCB2A9
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Individuals 18 years of age and older with a complex care need and has a PCO Goal.</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#goalfollowupmeasure-denominator">Denominator</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        
<th scope="row" class="row-header">Denominator Exclusion</th>

      
      <td class="content-container">
        
        <em>ID</em>: AA76FF0E-0EF9-40E6-9913-90FA63D50298
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">None</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#goalfollowupmeasure-denominator-exclusions">Denominator Exclusions</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        
<th scope="row" class="row-header">Numerator</th>

      
      <td class="content-container">
        
        <em>ID</em>: 3D2BED97-5ADC-4210-8A3E-91B13652E7D0
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">Indivuals who received follow-up on their PCO goal within two weeks to six months of when the PCO goal and GAS or PROM were identified.</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#goalfollowupmeasure-numerator">Numerator</a> 
          
        
      </td>
    </tr>
  

  
    <tr>
      
        
<th scope="row" class="row-header">Denominator Exception</th>

      
      <td class="content-container">
        
        <em>ID</em>: 4511743B-B054-4A08-800B-C4624450C38C
        <br/>
        
        
          <em>Description</em>:
          <p style="white-space: pre-line" class="tab-one">None</p>
        
        
          
            
            <em>Logic Definition</em>: <a href="#goalfollowupmeasure-denominator-exceptions">Denominator Exceptions</a> 
          
        
      </td>
    </tr>
  

  
  













<tr>

<th colspan="2" scope="row" class="row-header">Measure Logic</th>

</tr>

<tr>

<th scope="row" class="row-header">Primary Library</th>

<td class="content-container"><a href="Library-GoalFollowUpMeasure.html">GoalFollowUpMeasure</a></td>
</tr>




  
  

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Library PCOLogic
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://hl7.org/fhir/us/pco/Library/GoalAttainmentLogic|0.1.0</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/Library/GoalAttainmentLogic|0.1.0</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Library FHIRHelpers
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://hl7.org/fhir/us/pco/Library/FHIRHelpers|4.4.000</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/Library/FHIRHelpers|4.4.000</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Library WM
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://hl7.org/fhir/us/pco/Library/WhatMattersLogic|0.1.0</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/Library/WhatMattersLogic|0.1.0</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Library PC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://hl7.org/fhir/us/pco/Library/PCOCommon|0.1.0</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/Library/PCOCommon|0.1.0</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Code system Well-Being Concepts
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="CodeSystem-pco-concepts-temporary.html">Person-Centered Outcome Concepts</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/CodeSystem/pco-concepts-temporary</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Code system LOINC
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="http://terminology.hl7.org/5.5.0/CodeSystem-v3-loinc.html">Logical Observation Identifiers, Names and Codes (LOINC)</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://loinc.org</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Value set Well-Being Categories
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-pco-categories.html">Person-Centered Categories</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/ValueSet/pco-categories</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Value set PCO Goal Domain Categories
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-pco-goal-domain-categories.html">PCO Goal Domain Categories</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/ValueSet/pco-goal-domain-categories</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Value set Well-Being Domains
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-wellbeing-domains-example.html">Well-Being Domains Example</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/ValueSet/wellbeing-domains-example</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Value set Goal Attainment Scaling (GAS) Score
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-goal-attainment-scaling-score.html">Goal Attainment Scaling (GAS) Score</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/ValueSet/goal-attainment-scaling-score</tt>
    
  </td>
</tr>

<tr>
  
  
  
  
  
<th scope="row" class="row-header">Dependency</th>

  
  <td class="content-container">
    
    <em>Description</em>: Value set PROM Target Measures
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="ValueSet-prom-target-measures.html">PROM Target Measure Scores</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/us/pco/ValueSet/prom-target-measures</tt>
    
  </td>
</tr>


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: What Matters
        <br/>
      
      <em>Code</em>: what-matters
      <br/>
      <em>System</em>: <tt>http://hl7.org/fhir/us/pco/CodeSystem/pco-concepts-temporary</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: Goal attainment scale - Reported
        <br/>
      
      <em>Code</em>: 107332-9
      <br/>
      <em>System</em>: <tt>http://loinc.org</tt>
    </td>
  </tr>

  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Measurement Period
    <br/>
    <em>Use</em>: In
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Period
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Follow-Up Interval
    <br/>
    <em>Use</em>: In
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Range
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Numerator
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: *
    <br/>
    <em>Type</em>: Patient
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Denominator
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: *
    <br/>
    <em>Type</em>: Patient
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Initial Population
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: *
    <br/>
    <em>Type</em>: Patient
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Denominator Exclusions
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Resource
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Denominator Exceptions
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Resource
  </td>
</tr>
  
  
  <tr>
    <th colspan="2" scope="row" class="section-header"><a name="effective-data-requirements"> </a>Measure Logic Data Requirements</th>
  </tr>
  
  
<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Patient
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
    <br/>        
  
   
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: category, code, id
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-goal-attainment-scaling-score.html">Goal Attainment Scaling (GAS) Score</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Observation
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: code
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: code</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-prom-target-measures.html">PROM Target Measure Scores</a>
    <br/> 
  
  
  
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: Goal
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/goal.html">Goal</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: category, start, reference, measure, id
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: CarePlan
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/careplan.html">CarePlan</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: goal
    <br/>
   
   
  </td>
</tr>

  
  <tr>

<th colspan="2" scope="row" class="row-header">Measure Logic Definitions</th>

</tr>
  
          
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalfollowupmeasure-initial-population"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalFollowUpMeasure</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Includes individuals 18 years of age and older.
*/
define &quot;Initial Population&quot;: {
  Patient person
    where AgeInYearsAt(start of &quot;Measurement Period&quot;) &gt;= 18
}</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalfollowupmeasure-denominator"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalFollowUpMeasure</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Initial Population individuals with a complex care need and has a PCO Goal.
@comment: TODO - How do we determine &quot;complex care need?&quot;
*/
define &quot;Denominator&quot;:
  &quot;Initial Population&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="whatmatterslogic-well-being-observations"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> WhatMattersLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Well-Being Observations&quot;:
  [Observation] obs
    where obs.category in &quot;Well-Being Categories&quot;
      or obs.code in &quot;Well-Being Domains&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-pco-goals"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* 
  A &quot;PCO Goal&quot; is any FHIR Goal that has a category in &quot;What Matters Category&quot; or &quot;PCO Domain Categories&quot;
      or that addresses a What Matters observation
  and has a start date.
*/
define &quot;PCO Goals&quot;:
  [Goal] goal
    where (goal.category in WM.&quot;Well-Being Categories&quot;
        or goal.category in &quot;PCO Goal Domain Categories&quot;
        or exists goal.whatMattersObservations())
      and (goal.start as FHIR.date) is not null</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-gas-scores"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Observations containing a GAS score.
define &quot;GAS Scores&quot;:
  [Observation: &quot;Goal Attainment Scaling (GAS) Score&quot;]</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-pco-goals-during-measurement-period"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// PCO Goals whose startDate falls within the Measurement Period
define &quot;PCO Goals During Measurement Period&quot;:
  &quot;PCO Goals&quot; goal
    where (ToDateTime(goal.start as FHIR.date) during &quot;Measurement Period&quot;)
      and (goal.hasGAS() or goal.hasPROM())
      and exists goal.carePlans()</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-prom-scores"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Observations containing a PROM score.
define &quot;PROM Scores&quot;:
  [Observation: &quot;PROM Target Measures&quot;]</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-follow-up-scores-during-measurement-period"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/* 
Follow-Up Scares are PCO score observations taken during the Measurement Period,
and during the follow-up period for its Goal. Default follow-up period is 
2 weeks to 6 months following the goal startDate.
*/
define &quot;Follow-Up Scores During Measurement Period&quot;:
  flatten( &quot;PCO Goals During Measurement Period&quot; goal
    let pcoScores: goal.pcoScores()
      return pcoScores score 
        let scoreDate: score.effective as FHIR.dateTime
        where scoreDate during &quot;Measurement Period&quot;
          and scoreDate during &quot;Follow-Up Interval For&quot;(goal)
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalfollowupmeasure-numerator"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalFollowUpMeasure</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Indivuals who received follow-up on their PCO goal within two
weeks to six months of when the PCO goal and GAS or PROM were identified.
*/
define &quot;Numerator&quot;:
  &quot;Denominator&quot; person
    where exists PCOLogic.&quot;Follow-Up Scores During Measurement Period&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalfollowupmeasure-denominator-exclusions"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalFollowUpMeasure</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exclusions&quot;:
  null</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalfollowupmeasure-denominator-exceptions"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalFollowUpMeasure</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Denominator Exceptions&quot;:
  null</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="fhirhelpers-toconcept"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="whatmatterslogic-whatmattersobservations"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> WhatMattersLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of what matters Observations this Goal addresses.
define fluent function whatMattersObservations(goal Goal):
  flatten( goal.addresses GA
      return [Observation] obs
        where obs.id = GA.reference.getId()
          and obs.isWhatMatters()
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="fhirhelpers-tostring"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="pcocommon-getid"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> PCOCommon</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function getId(uri String):
  Last(Split(uri, '/'))</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="whatmatterslogic-iswhatmatters"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> WhatMattersLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function isWhatMatters(obs Observation):
  exists( &quot;Well-Being Observations&quot; obs
    where exists(obs.category cat where cat = &quot;What Matters category&quot;)
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="fhirhelpers-todate"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-hasgas"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// where exists obs.performer.resolveRelatedPersons()

define fluent function hasGAS(goal Goal):
  exists goal.extensions('http://hl7.org/fhir/us/pco/StructureDefinition/pco-goal-attainment-scaling')
    or exists (goal.target target
      where target.measure = &quot;Goal attainment scale&quot;
    )
    or exists goal.gasScores()</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="pcocommon-extensions"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> PCOCommon</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns any extensions defined on the given resource with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define fluent function extensions(domainResource DomainResource, url String):
  domainResource.extension E
	  where E.url = url
		return E</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-gasscores"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of Observation including only GAS scores
define fluent function gasScores(goal Goal):
  &quot;GAS Scores&quot; score
    where score.focusGoals() contains goal</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-focusgoals"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of Goal where focus includes the given Observation.
define fluent function focusGoals(obs Observation):
  obs.focus.resolveGoals()</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="pcocommon-resolvegoals"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> PCOCommon</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define fluent function resolveGoals(references List&lt;Reference&gt;):
  flatten( references ref
    return [Goal] resource
      where resource.id = ref.reference.getId()
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-hasprom"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/// Returns true if this Goal has a PROM code in its target.measure
define fluent function hasPROM(goal Goal):
  exists (goal.target target
    where target.measure in &quot;PROM Target Measures&quot;
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="pcocommon-careplans"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> PCOCommon</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of CarePlan that support this Goal.
define fluent function carePlans(goal Goal):
  [CarePlan] carePlan
    where exists ( carePlan.goal goalRef
        where goal.id = goalRef.reference.getId()
    )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-pcoscores"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of Observation including both GAS and PROM scores
define fluent function pcoScores(goal Goal):
  goal.gasScores()
    union goal.promScores()</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-promscores"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Returns a list of Observation including only PROM scores
define fluent function promScores(goal Goal):
  &quot;PROM Scores&quot; score
    where score.focusGoals() contains goal</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="fhirhelpers-todatetime"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> FHIRHelpers</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="goalattainmentlogic-follow-up-interval-for"> </a>
    
    Logic Definition
  </th>

  <td class="content-container"><em>Library Name:</em> GoalAttainmentLogic</td>

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Computes the follow-up interval for a Goal based on this measure's &quot;Follow-Up Interval&quot; parameter.
@return Interval&lt;DateTime&gt;
*/
define function &quot;Follow-Up Interval For&quot; (goal Goal):
  goal goal
    let startDate: ToDateTime(goal.start as FHIR.date)
      return Interval(startDate + start of &quot;Follow-Up Interval&quot;, startDate + end of &quot;Follow-Up Interval&quot;)</code></pre>
  </td>

</tr>

  

<tr>
  <th colspan="2" scope="row" class="row-header">Generated using version 0.4.6 of the sample-content-ig Liquid templates</th>
</tr>
    </tbody>
  </table>
</div>
  </text>
  <contained>
    <Library>
      <id value="effective-data-requirements"/>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://hl7.org/fhir/us/pco/CodeSystem/pco-concepts-temporary"/>
          <code value="what-matters"/>
          <display value="What Matters"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system value="http://loinc.org"/>
          <code value="107332-9"/>
          <display value="Goal attainment scale - Reported"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalFollowUpMeasure"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Includes individuals 18 years of age and older.
*/
define &quot;Initial Population&quot;: {
  Patient person
    where AgeInYearsAt(start of &quot;Measurement Period&quot;) &gt;= 18
}"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalFollowUpMeasure"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Initial Population individuals with a complex care need and has a PCO Goal.
@comment: TODO - How do we determine &quot;complex care need?&quot;
*/
define &quot;Denominator&quot;:
  &quot;Initial Population&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="WhatMattersLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Well-Being Observations"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Well-Being Observations&quot;:
  [Observation] obs
    where obs.category in &quot;Well-Being Categories&quot;
      or obs.code in &quot;Well-Being Domains&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="PCO Goals"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/* 
  A &quot;PCO Goal&quot; is any FHIR Goal that has a category in &quot;What Matters Category&quot; or &quot;PCO Domain Categories&quot;
      or that addresses a What Matters observation
  and has a start date.
*/
define &quot;PCO Goals&quot;:
  [Goal] goal
    where (goal.category in WM.&quot;Well-Being Categories&quot;
        or goal.category in &quot;PCO Goal Domain Categories&quot;
        or exists goal.whatMattersObservations())
      and (goal.start as FHIR.date) is not null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="GAS Scores"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Observations containing a GAS score.
define &quot;GAS Scores&quot;:
  [Observation: &quot;Goal Attainment Scaling (GAS) Score&quot;]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="PCO Goals During Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// PCO Goals whose startDate falls within the Measurement Period
define &quot;PCO Goals During Measurement Period&quot;:
  &quot;PCO Goals&quot; goal
    where (ToDateTime(goal.start as FHIR.date) during &quot;Measurement Period&quot;)
      and (goal.hasGAS() or goal.hasPROM())
      and exists goal.carePlans()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="PROM Scores"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Observations containing a PROM score.
define &quot;PROM Scores&quot;:
  [Observation: &quot;PROM Target Measures&quot;]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Follow-Up Scores During Measurement Period"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/* 
Follow-Up Scares are PCO score observations taken during the Measurement Period,
and during the follow-up period for its Goal. Default follow-up period is 
2 weeks to 6 months following the goal startDate.
*/
define &quot;Follow-Up Scores During Measurement Period&quot;:
  flatten( &quot;PCO Goals During Measurement Period&quot; goal
    let pcoScores: goal.pcoScores()
      return pcoScores score 
        let scoreDate: score.effective as FHIR.dateTime
        where scoreDate during &quot;Measurement Period&quot;
          and scoreDate during &quot;Follow-Up Interval For&quot;(goal)
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalFollowUpMeasure"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Indivuals who received follow-up on their PCO goal within two
weeks to six months of when the PCO goal and GAS or PROM were identified.
*/
define &quot;Numerator&quot;:
  &quot;Denominator&quot; person
    where exists PCOLogic.&quot;Follow-Up Scores During Measurement Period&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalFollowUpMeasure"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exclusions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator Exclusions&quot;:
  null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalFollowUpMeasure"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator Exceptions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Denominator Exceptions&quot;:
  null"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToConcept"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
    if concept is null then
        null
    else
        System.Concept {
            codes: concept.coding C return ToCode(C),
            display: concept.text.value
        }"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="11"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="WhatMattersLogic"/>
        </extension>
        <extension url="name">
          <valueString value="whatMattersObservations"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of what matters Observations this Goal addresses.
define fluent function whatMattersObservations(goal Goal):
  flatten( goal.addresses GA
      return [Observation] obs
        where obs.id = GA.reference.getId()
          and obs.isWhatMatters()
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="12"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToString"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToString(value string): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="13"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="PCOCommon"/>
        </extension>
        <extension url="name">
          <valueString value="getId"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define fluent function getId(uri String):
  Last(Split(uri, '/'))"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="14"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="WhatMattersLogic"/>
        </extension>
        <extension url="name">
          <valueString value="isWhatMatters"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define fluent function isWhatMatters(obs Observation):
  exists( &quot;Well-Being Observations&quot; obs
    where exists(obs.category cat where cat = &quot;What Matters category&quot;)
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="15"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDate"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDate(value date): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="16"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="hasGAS"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// where exists obs.performer.resolveRelatedPersons()

define fluent function hasGAS(goal Goal):
  exists goal.extensions('http://hl7.org/fhir/us/pco/StructureDefinition/pco-goal-attainment-scaling')
    or exists (goal.target target
      where target.measure = &quot;Goal attainment scale&quot;
    )
    or exists goal.gasScores()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="17"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="PCOCommon"/>
        </extension>
        <extension url="name">
          <valueString value="extensions"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
@description: Returns any extensions defined on the given resource with the specified url.
@comment: NOTE: Extensions are not the preferred approach, but are used as a way to access
content that is defined by extensions but not yet surfaced in the
CQL model info.
*/
define fluent function extensions(domainResource DomainResource, url String):
  domainResource.extension E
	  where E.url = url
		return E"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="18"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="gasScores"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of Observation including only GAS scores
define fluent function gasScores(goal Goal):
  &quot;GAS Scores&quot; score
    where score.focusGoals() contains goal"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="19"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="focusGoals"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of Goal where focus includes the given Observation.
define fluent function focusGoals(obs Observation):
  obs.focus.resolveGoals()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="20"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="PCOCommon"/>
        </extension>
        <extension url="name">
          <valueString value="resolveGoals"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define fluent function resolveGoals(references List&lt;Reference&gt;):
  flatten( references ref
    return [Goal] resource
      where resource.id = ref.reference.getId()
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="21"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="hasPROM"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/// Returns true if this Goal has a PROM code in its target.measure
define fluent function hasPROM(goal Goal):
  exists (goal.target target
    where target.measure in &quot;PROM Target Measures&quot;
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="22"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="PCOCommon"/>
        </extension>
        <extension url="name">
          <valueString value="carePlans"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of CarePlan that support this Goal.
define fluent function carePlans(goal Goal):
  [CarePlan] carePlan
    where exists ( carePlan.goal goalRef
        where goal.id = goalRef.reference.getId()
    )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="23"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="pcoScores"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of Observation including both GAS and PROM scores
define fluent function pcoScores(goal Goal):
  goal.gasScores()
    union goal.promScores()"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="24"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="promScores"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="// Returns a list of Observation including only PROM scores
define fluent function promScores(goal Goal):
  &quot;PROM Scores&quot; score
    where score.focusGoals() contains goal"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="25"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="FHIRHelpers"/>
        </extension>
        <extension url="name">
          <valueString value="ToDateTime"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define function ToDateTime(value dateTime): value.value"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="26"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="GoalAttainmentLogic"/>
        </extension>
        <extension url="name">
          <valueString value="Follow-Up Interval For"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Computes the follow-up interval for a Goal based on this measure's &quot;Follow-Up Interval&quot; parameter.
@return Interval&lt;DateTime&gt;
*/
define function &quot;Follow-Up Interval For&quot; (goal Goal):
  goal goal
    let startDate: ToDateTime(goal.start as FHIR.date)
      return Interval(startDate + start of &quot;Follow-Up Interval&quot;, startDate + end of &quot;Follow-Up Interval&quot;)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="27"/>
        </extension>
      </extension>
      <name value="EffectiveDataRequirements"/>
      <status value="active"/>
      <type>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/library-type"/>
          <code value="module-definition"/>
        </coding>
      </type>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PCOLogic"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/Library/GoalAttainmentLogic|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/Library/FHIRHelpers|4.4.000"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library WM"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/Library/WhatMattersLogic|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library PC"/>
        <resource value="http://hl7.org/fhir/us/pco/Library/PCOCommon|0.1.0"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system Well-Being Concepts"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/CodeSystem/pco-concepts-temporary"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Code system LOINC"/>
        <resource value="http://loinc.org"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Well-Being Categories"/>
        <resource value="http://hl7.org/fhir/us/pco/ValueSet/pco-categories"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set PCO Goal Domain Categories"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/ValueSet/pco-goal-domain-categories"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Well-Being Domains"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/ValueSet/wellbeing-domains-example"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Goal Attainment Scaling (GAS) Score"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/ValueSet/goal-attainment-scaling-score"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set PROM Target Measures"/>
        <resource
                  value="http://hl7.org/fhir/us/pco/ValueSet/prom-target-measures"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="Follow-Up Interval"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Range"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Patient"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Patient"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="Patient"/>
      </parameter>
      <parameter>
        <name value="Denominator Exclusions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <parameter>
        <name value="Denominator Exceptions"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Resource"/>
      </parameter>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="category"/>
        <mustSupport value="code"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/pco/ValueSet/goal-attainment-scaling-score"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://hl7.org/fhir/us/pco/ValueSet/prom-target-measures"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Goal"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Goal"/>
        <mustSupport value="category"/>
        <mustSupport value="start"/>
        <mustSupport value="reference"/>
        <mustSupport value="measure"/>
        <mustSupport value="id"/>
      </dataRequirement>
      <dataRequirement>
        <type value="CarePlan"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/CarePlan"/>
        <mustSupport value="goal"/>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" id="effective-data-requirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <extension
             url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="pc"/>
  </extension>
  <url value="http://hl7.org/fhir/us/pco/Measure/GoalFollowUpMeasure"/>
  <version value="1.0.0-ballot"/>
  <name value="GoalFollowUpMeasure"/>
  <title value="Person-Centered Goal Follow-Up"/>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2025-02-12T18:05:49+00:00"/>
  <publisher value="HL7 International / Patient Care"/>
  <contact>
    <name value="HL7 International / Patient Care"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/patientcare"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="patientcare@lists.HL7.org"/>
    </telecom>
  </contact>
  <description
               value="Measure 2 - Goal Follow-up: % of individuals 18 years of age or older with a complex care need who received follow-up on their PCO goal within two weeks to six months of when the PCO goal and GAS or PROM were identified."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="US"/>
      <display value="United States of America"/>
    </coding>
  </jurisdiction>
  <purpose
           value="Goal Attainment Scaling (GAS) in healthcare measures the extent to which individuals achieve specific goals or objectives. It allows for the quantification and evaluation of progress toward individualized goals, particularly in areas where traditional outcome measures may be insufficient."/>
  <usage value="Content TBD."/>
  <copyright
             value="Measure definition is copyright 2024 by NCQA.

LOINC(R) copyright 2004-2023 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2023 International Health Terminology Standards Development Organisation. ICD-10 copyright 2023 World Health Organization. All Rights Reserved."/>
  <effectivePeriod>
    <start value="2024-01-01"/>
    <end value="2024-12-31"/>
  </effectivePeriod>
  <author>
    <name value="HL7 International / Patient Care"/>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/patientcare"/>
    </telecom>
  </author>
  <library value="http://hl7.org/fhir/us/pco/Library/GoalFollowUpMeasure"/>
  <disclaimer
              value="These performance measures are not clinical guidelines and do not establish a standard of medical care, and have not been tested for all potential applications. The measures and specifications are provided without warranty."/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
      <display value="Proportion"/>
    </coding>
  </scoring>
  <rationale
             value="Goal-directed care in healthcare centers on setting and achieving specific, personalized goals that prioritize an individual's well-being and &quot;What Matters Most&quot; to each person. Rather than just treating symptoms, this approach involves close collaboration between patients, caregivers, and healthcare providers to identify individual goals related to health outcomes, functional improvement, or symptom management. Once goals are established, tailored care plans are developed, incorporating various treatments, therapies, and lifestyle adjustments to meet the individual's needs and preferences. Continual monitoring and adjustment ensure alignment with evolving priorities, fostering patient engagement and satisfaction while enhancing overall healthcare effectiveness."/>
  <clinicalRecommendationStatement value="None at this time."/>
  <group id="64f0d91d56d636294b157d97">
    <description value="Content TBD"/>
    <population id="692C6F6B-4153-496F-8582-0839A0816567">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
          <display value="Initial Population"/>
        </coding>
      </code>
      <description value="Individuals 18 years of age and older."/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="3116F1E4-8334-4CA0-9BEF-16CFEEDCB2A9">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
          <display value="Denominator"/>
        </coding>
      </code>
      <description
                   value="Individuals 18 years of age and older with a complex care need and has a PCO Goal."/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="AA76FF0E-0EF9-40E6-9913-90FA63D50298">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exclusion"/>
          <display value="Denominator Exclusion"/>
        </coding>
      </code>
      <description value="None"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exclusions"/>
      </criteria>
    </population>
    <population id="3D2BED97-5ADC-4210-8A3E-91B13652E7D0">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
          <display value="Numerator"/>
        </coding>
      </code>
      <description
                   value="Indivuals who received follow-up on their PCO goal within two weeks to six months of when the PCO goal and GAS or PROM were identified."/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <population id="4511743B-B054-4A08-800B-C4624450C38C">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator-exception"/>
          <display value="Denominator Exception"/>
        </coding>
      </code>
      <description value="None"/>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator Exceptions"/>
      </criteria>
    </population>
  </group>
</Measure>