Canonical Resource Management Infrastructure Implementation Guide
1.1.0-cibuild - cibuild International flag

Canonical Resource Management Infrastructure Implementation Guide, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 1.1.0-cibuild built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/crmi-ig/ and changes regularly. See the Directory of published versions

: ANC.IND.01 Percentage of pregnant women with first ANC contact in the first trimester (Publishable Example) - XML Representation

Draft as of 2023-03-13

Raw xml | Download


<Measure xmlns="http://hl7.org/fhir">
  <id value="publishable-example"/>
  <meta>
    <profile
             value="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure"/>
  </meta>
  <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">ANCIND01Publishable</td>
</tr>


<tr>

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

<td class="content-container">ANC.IND.01 Percentage of pregnant women with first ANC contact in the first trimester (Publishable Example)</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>Percentage of pregnant women with first ANC contact in the first trimester (before 12 weeks of gestation)</p>
</div></td>
</tr>












<tr>

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

<td class="content-container">HL7 International / Clinical Decision Support</td>
</tr>


<tr>

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

<td class="content-container"><a href="http://www.hl7.org/Special/committees/dss">http://www.hl7.org/Special/committees/dss</a></td>
</tr>




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

  
  
  <td class="content-container">
    
    
    <em>Citation</em>: <div><p>WHO, UN Women, UNFPA. Health care for women subjected to intimate partner violence or sexual violence – a clinical handbook. Geneva: World Health Organization; 2014</p>
</div>
    
    
    <em>Content URL</em>: <a href="https://apps.who.int/iris/bitstream/handle/10665/136101/WHO_RHR_14.26_eng.pdf">https://apps.who.int/iris/bitstream/handle/10665/136101/WHO_RHR_14.26_eng.pdf</a>
    
    <br/>
    
    
    
    <em>Document</em>: null @ https://apps.who.int/iris/bitstream/handle/10665/136101/WHO_RHR_14.26_eng.pdf
    
    
    
  </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.1.0-cibuild</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">Measure Type</th>

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






<tr>

<th scope="row" class="row-header">Improvement Notation</th>

<td class="content-container"><span title="Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation increase}">Increased score indicates improvement</span></td>
</tr>








  
    
    <tr>

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

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

          
          
          
          
          
          
          
          
          
        
      
      <td class="content-container">
        
        <em>ID</em>: initial-population
        <br/>
        
        
          <em>Description</em>: No description provided
        
        
          
            
            <em>Logic Definition</em>: <a href="#anccohort-initial-population">Initial Population</a> 
          
        
      </td>
    </tr>
  

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

          
          
          
          
          
          
        
      
      <td class="content-container">
        
        <em>ID</em>: denominator
        <br/>
        
        
          <em>Description</em>: No description provided
        
        
          
            
            <em>Logic Definition</em>: <a href="#anccohort-denominator">Denominator</a> 
          
        
      </td>
    </tr>
  

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

          
          
          
          
          
          
          
          
        
      
      <td class="content-container">
        
        <em>ID</em>: numerator
        <br/>
        
        
          <em>Description</em>: No description provided
        
        
          
            
            <em>Logic Definition</em>: <a href="#anccohort-numerator">Numerator</a> 
          
        
      </td>
    </tr>
  

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

  <td class="content-container">
    
      <em>ID</em>: by-age
      
        <br/>
      
    
    
      
        <em>Code</em>: <span title="Codes:">Age</span>
      
      
    
    
  </td>
</tr>

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

  <td class="content-container">
    
      <em>ID</em>: by-education-level
      
        <br/>
      
    
    
      
        <em>Code</em>: <span title="Codes:">Education Level</span>
      
      
    
    
  </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-ANCCohort.html">ANC Cohort</a></td>
</tr>




  
  

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

  
  <td class="content-container">
    
    <em>Description</em>: Library ANCCohort
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <a href="Library-ANCCohort.html">ANC Cohort</a>
    <br/>
    <em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/crmi/Library/ANCCohort</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://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Example Code system ISO-8601-Derived Periods
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://example.org/CodeSystem/iso-8601-derived-periods</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://example.org/CodeSystem/iso-8601-derived-periods</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Antenatal care contact
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set First Antenatal Care Contact Choices
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://fhir.org/guides/who/anc-cds/ValueSet/anc-b5-de2</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://fhir.org/guides/who/anc-cds/ValueSet/anc-b5-de2</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Gestational age
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de17</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de17</tt>
    
  </td>
</tr>

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

  
  <td class="content-container">
    
    <em>Description</em>: Value set Antenatal care case
    
    <br/>
    
    
    
    
    
    
    <em>Resource</em>: <code>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-case</code>
    <br/>
    <em>Canonical URL</em>: <tt>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-case</tt>
    
  </td>
</tr>


  
  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: 10-14 years
        <br/>
      
      <em>Code</em>: P10Y--P14Y
      <br/>
      <em>System</em>: <tt>http://example.org/CodeSystem/iso-8601-derived-periods</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: 15-19 years
        <br/>
      
      <em>Code</em>: P15Y--P19Y
      <br/>
      <em>System</em>: <tt>http://example.org/CodeSystem/iso-8601-derived-periods</tt>
    </td>
  </tr>

  <tr>
    <th scope="row" class="row-header">Direct Reference Code</th>
    <td class="content-container">
      
        <em>Display</em>: 20+ years
        <br/>
      
      <em>Code</em>: P20Y--P9999Y
      <br/>
      <em>System</em>: <tt>http://example.org/CodeSystem/iso-8601-derived-periods</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>: encounter
    <br/>
    <em>Use</em>: In
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: string
  </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>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Age Stratifier
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: 1
    <br/>
    <em>Type</em>: Coding
  </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>: 1
    <br/>
    <em>Type</em>: boolean
  </td>
</tr>
  
  <tr>
  
<th scope="row" class="row-header">Parameter</th>

  <td class="content-container">
    <em>Name</em>: Education Level Stratifier
    <br/>
    <em>Use</em>: Out
    <br/>
    <em>Min Cardinality</em>: 0
    <br/>
    <em>Max Cardinality</em>: *
    <br/>
    <em>Type</em>: CodeableConcept
  </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>: 1
    <br/>
    <em>Type</em>: boolean
  </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>: Encounter
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/encounter.html">Encounter</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type, reasonCode, period
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <code>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact</code>
    <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, status, encounter, encounter.reference
    <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> <code>http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de17</code>
    <br/> 
  
  
  
   
  </td>
</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/>        
  
   
   
    <em>Must Support Elements</em>: url, value
    <br/>
   
   
  </td>
</tr>

<tr>
  <th scope="row" class="row-header">Data Requirement</th>
  <td class="content-container">
    <em>Type</em>: EpisodeOfCare
    <br/>
  
    <em>Profile(s)</em>: 
  
    <a href="http://hl7.org/fhir/R4/episodeofcare.html">EpisodeOfCare</a>
    <br/>        
  
   
   
    <em>Must Support Elements</em>: type
    <br/>
   
  
    <em>Code Filter(s)</em>: 
    <br/>
  
  
    <span class="tab-one"><em>Path</em>: type</span>
    <br/>
  
  
  
    <span class="tab-one"><em>ValueSet</em>:</span> <code>http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-case</code>
    <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="ancbasedataelements-antenatal-care-contact"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;Antenatal care contact&quot;:
  [&quot;Encounter&quot;: type in BCx.&quot;Antenatal care contact&quot;]</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancind01-first-antenatal-care-contact"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define &quot;First antenatal care contact&quot;:
  BaseData.&quot;Antenatal care contact&quot; C
    where C.reasonCode in Cx.&quot;First Antenatal Care Contact Choices&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="anccontactdataelements-gestational-age"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
  @dataElement: ANC.B6.DE17 Gestational age
  @activity: ANC.B6 Profile
  @description: Gestational age in weeks and/or days depending on the source of gestational age
*/
define &quot;Gestational age&quot;:
  WC.MostRecent(
  [Observation: Cx.&quot;Gestational age&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.Quantity</code></pre>
  </td>

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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Numerator: Number of pregnant women who had their first ANC contact before 12 weeks (facility level)
Numerator Computation: Count of women whose gestational age &lt;= 12 weeks at the time of first contact
*/
define Numerator:
  exists (
    &quot;First antenatal care contact&quot; C
      where C.period starts during &quot;Measurement Period&quot;
        and ContactData.&quot;Gestational age&quot; &lt;= 12 weeks
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancstratifiers-by-age"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
By Patient Age as of the start of the Measurement Period
Age (10-14, 15-19, 20+)
*/
define &quot;By Age&quot;:
  case
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) in Interval[10, 14] then &quot;P10Y--P14Y&quot;
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) in Interval[15, 19] then &quot;P15Y--P19Y&quot;
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) &gt;= 20 then &quot;P20Y--P9999Y&quot;
    else null
  end</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancind01-age-stratifier"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Disaggregation: Age (10-14, 15-19, 20+)
*/
define &quot;Age Stratifier&quot;:
  Stratifiers.&quot;By Age&quot;</code></pre>
  </td>

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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Denominator: Total number of antenatal clients with a first contact
Denominator Computation: Count of all women who had first contact within the last reporting period
*/
define Denominator:
  exists (
    &quot;First antenatal care contact&quot; C
      where C.period starts during &quot;Measurement Period&quot;
  )</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancstratifiers-by-education-level"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
By Patient Education Level (none, don't know, primary, secondary, higher)
*/
define &quot;By Education Level&quot;:
  Patient.extension E
    where E.url = 'http://fhir.org/guides/who/anc-cds/StructureDefinition/educationlevel'
    return E.value as CodeableConcept</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancind01-education-level-stratifier"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Disaggregation: Education Level (none, don't know, primary, secondary, higher)
*/
define &quot;Education Level Stratifier&quot;:
  Stratifiers.&quot;By Education Level&quot;</code></pre>
  </td>

</tr>
        
<tr>
  <th scope="row" rowspan="2" class="row-header">
    
      
      <a name="ancbasedataelements-antenatal-care-case"> </a>
    
    Logic Definition
  </th>

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
define &quot;Pregnant&quot;:
  &quot;Pregnancy&quot; is not null
    or &quot;Pregnancy status&quot; in BCx.&quot;Pregnancy status - pregnant&quot;

define &quot;Pregnancy status&quot;:
  FHIRHelpers.ToConcept(
    Last(
      [Observation: BCx.&quot;Pregnancy status&quot;] O
        where O.status = 'final'
        sort by FHIRHelpers.ToDateTime(effective as FHIR.dateTime)
    ).value
  )
*/
define &quot;Antenatal care case&quot;:
  [&quot;EpisodeOfCare&quot;: type in BCx.&quot;Antenatal care case&quot;]</code></pre>
  </td>

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

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

</tr>
<tr>

  <td>
    <pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Initial population: Antenatal clients
*/
define &quot;Initial Population&quot;:
  exists (BaseData.&quot;Antenatal care case&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://example.org/CodeSystem/iso-8601-derived-periods"/>
          <code value="P10Y--P14Y"/>
          <display value="10-14 years"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://example.org/CodeSystem/iso-8601-derived-periods"/>
          <code value="P15Y--P19Y"/>
          <display value="15-19 years"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-directReferenceCode">
        <valueCoding>
          <system
                  value="http://example.org/CodeSystem/iso-8601-derived-periods"/>
          <code value="P20Y--P9999Y"/>
          <display value="20+ years"/>
        </valueCoding>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCBaseDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="Antenatal care contact"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;Antenatal care contact&quot;:
  [&quot;Encounter&quot;: type in BCx.&quot;Antenatal care contact&quot;]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="0"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="First antenatal care contact"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="define &quot;First antenatal care contact&quot;:
  BaseData.&quot;Antenatal care contact&quot; C
    where C.reasonCode in Cx.&quot;First Antenatal Care Contact Choices&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="1"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCContactDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="Gestational age"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
  @dataElement: ANC.B6.DE17 Gestational age
  @activity: ANC.B6 Profile
  @description: Gestational age in weeks and/or days depending on the source of gestational age
*/
define &quot;Gestational age&quot;:
  WC.MostRecent(
  [Observation: Cx.&quot;Gestational age&quot;] O
    where O.status in { 'final', 'amended', 'corrected' }
      and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false
      and Last(Split(O.encounter.reference, '/')) = Last(Split(encounter, '/'))
  ).value as FHIR.Quantity"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="2"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="Numerator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Numerator: Number of pregnant women who had their first ANC contact before 12 weeks (facility level)
Numerator Computation: Count of women whose gestational age &lt;= 12 weeks at the time of first contact
*/
define Numerator:
  exists (
    &quot;First antenatal care contact&quot; C
      where C.period starts during &quot;Measurement Period&quot;
        and ContactData.&quot;Gestational age&quot; &lt;= 12 weeks
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="3"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCStratifiers"/>
        </extension>
        <extension url="name">
          <valueString value="By Age"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
By Patient Age as of the start of the Measurement Period
Age (10-14, 15-19, 20+)
*/
define &quot;By Age&quot;:
  case
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) in Interval[10, 14] then &quot;P10Y--P14Y&quot;
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) in Interval[15, 19] then &quot;P15Y--P19Y&quot;
    when AgeInYearsAt(start of &quot;Measurement Period&quot;) &gt;= 20 then &quot;P20Y--P9999Y&quot;
    else null
  end"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="4"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="Age Stratifier"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Disaggregation: Age (10-14, 15-19, 20+)
*/
define &quot;Age Stratifier&quot;:
  Stratifiers.&quot;By Age&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="5"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="Denominator"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Denominator: Total number of antenatal clients with a first contact
Denominator Computation: Count of all women who had first contact within the last reporting period
*/
define Denominator:
  exists (
    &quot;First antenatal care contact&quot; C
      where C.period starts during &quot;Measurement Period&quot;
  )"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="6"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCStratifiers"/>
        </extension>
        <extension url="name">
          <valueString value="By Education Level"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
By Patient Education Level (none, don't know, primary, secondary, higher)
*/
define &quot;By Education Level&quot;:
  Patient.extension E
    where E.url = 'http://fhir.org/guides/who/anc-cds/StructureDefinition/educationlevel'
    return E.value as CodeableConcept"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="7"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="Education Level Stratifier"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Disaggregation: Education Level (none, don't know, primary, secondary, higher)
*/
define &quot;Education Level Stratifier&quot;:
  Stratifiers.&quot;By Education Level&quot;"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="8"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCBaseDataElements"/>
        </extension>
        <extension url="name">
          <valueString value="Antenatal care case"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
define &quot;Pregnant&quot;:
  &quot;Pregnancy&quot; is not null
    or &quot;Pregnancy status&quot; in BCx.&quot;Pregnancy status - pregnant&quot;

define &quot;Pregnancy status&quot;:
  FHIRHelpers.ToConcept(
    Last(
      [Observation: BCx.&quot;Pregnancy status&quot;] O
        where O.status = 'final'
        sort by FHIRHelpers.ToDateTime(effective as FHIR.dateTime)
    ).value
  )
*/
define &quot;Antenatal care case&quot;:
  [&quot;EpisodeOfCare&quot;: type in BCx.&quot;Antenatal care case&quot;]"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="9"/>
        </extension>
      </extension>
      <extension
                 url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
        <extension url="libraryName">
          <valueString value="ANCIND01"/>
        </extension>
        <extension url="name">
          <valueString value="Initial Population"/>
        </extension>
        <extension url="statement">
          <valueString
                       value="/*
Initial population: Antenatal clients
*/
define &quot;Initial Population&quot;:
  exists (BaseData.&quot;Antenatal care case&quot;)"/>
        </extension>
        <extension url="displaySequence">
          <valueInteger value="10"/>
        </extension>
      </extension>
      <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 ANCCohort"/>
        <resource value="http://hl7.org/fhir/uv/crmi/Library/ANCCohort"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Library FHIRHelpers"/>
        <resource
                  value="http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Example Code system ISO-8601-Derived Periods"/>
        <resource
                  value="http://example.org/CodeSystem/iso-8601-derived-periods"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Antenatal care contact"/>
        <resource
                  value="http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set First Antenatal Care Contact Choices"/>
        <resource
                  value="http://fhir.org/guides/who/anc-cds/ValueSet/anc-b5-de2"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Gestational age"/>
        <resource
                  value="http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de17"/>
      </relatedArtifact>
      <relatedArtifact>
        <type value="depends-on"/>
        <display value="Value set Antenatal care case"/>
        <resource
                  value="http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-case"/>
      </relatedArtifact>
      <parameter>
        <name value="Measurement Period"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Period"/>
      </parameter>
      <parameter>
        <name value="encounter"/>
        <use value="in"/>
        <min value="0"/>
        <max value="1"/>
        <type value="string"/>
      </parameter>
      <parameter>
        <name value="Numerator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Age Stratifier"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="Coding"/>
      </parameter>
      <parameter>
        <name value="Denominator"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <parameter>
        <name value="Education Level Stratifier"/>
        <use value="out"/>
        <min value="0"/>
        <max value="*"/>
        <type value="CodeableConcept"/>
      </parameter>
      <parameter>
        <name value="Initial Population"/>
        <use value="out"/>
        <min value="0"/>
        <max value="1"/>
        <type value="boolean"/>
      </parameter>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-isSelective">
          <valueBoolean value="true"/>
        </extension>
        <type value="Encounter"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
        <mustSupport value="type"/>
        <mustSupport value="reasonCode"/>
        <mustSupport value="period"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-contact"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <extension
                   url="http://hl7.org/fhir/StructureDefinition/cqf-isSelective">
          <valueBoolean value="true"/>
        </extension>
        <type value="Observation"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
        <mustSupport value="code"/>
        <mustSupport value="status"/>
        <mustSupport value="encounter"/>
        <mustSupport value="encounter.reference"/>
        <codeFilter>
          <path value="code"/>
          <valueSet
                    value="http://fhir.org/guides/who/anc-cds/ValueSet/anc-b6-de17"/>
        </codeFilter>
      </dataRequirement>
      <dataRequirement>
        <type value="Patient"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
        <mustSupport value="url"/>
        <mustSupport value="value"/>
      </dataRequirement>
      <dataRequirement>
        <type value="EpisodeOfCare"/>
        <profile
                 value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
        <mustSupport value="type"/>
        <codeFilter>
          <path value="type"/>
          <valueSet
                    value="http://fhir.org/guides/who/anc-cds/ValueSet/antenatal-care-case"/>
        </codeFilter>
      </dataRequirement>
    </Library>
  </contained>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem">
    <valueReference>🔗 
      <reference value="Device/cqf-tooling"/>
    </valueReference>
  </extension>
  <extension
             url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" id="effective-data-requirements">
    <valueCanonical value="#effective-data-requirements"/>
  </extension>
  <url value="http://hl7.org/fhir/uv/crmi/Measure/publishable-example"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.16.840.1.113883.4.642.40.38.29.1"/>
  </identifier>
  <version value="1.1.0-cibuild"/>
  <name value="ANCIND01Publishable"/>
  <title
         value="ANC.IND.01 Percentage of pregnant women with first ANC contact in the first trimester (Publishable Example)"/>
  <status value="draft"/>
  <experimental value="true"/>
  <date value="2023-03-13T22:32:10-06:00"/>
  <publisher value="HL7 International / Clinical Decision Support"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/dss"/>
    </telecom>
  </contact>
  <description
               value="Percentage of pregnant women with first ANC contact in the first trimester (before 12 weeks of gestation)"/>
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
      <code value="001"/>
      <display value="World"/>
    </coding>
  </jurisdiction>
  <relatedArtifact>
    <extension
               url="http://hl7.org/fhir/StructureDefinition/cqf-isPrimaryCitation">
      <valueBoolean value="true"/>
    </extension>
    <type value="citation"/>
    <citation
              value="WHO, UN Women, UNFPA. Health care for women subjected to intimate partner violence or sexual violence – a clinical handbook. Geneva: World Health Organization; 2014"/>
    <url
         value="https://apps.who.int/iris/bitstream/handle/10665/136101/WHO_RHR_14.26_eng.pdf"/>
    <document>
      <url
           value="https://apps.who.int/iris/bitstream/handle/10665/136101/WHO_RHR_14.26_eng.pdf"/>
    </document>
  </relatedArtifact>
  <library value="http://hl7.org/fhir/uv/crmi/Library/ANCCohort"/>
  <scoring>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-scoring"/>
      <code value="proportion"/>
    </coding>
  </scoring>
  <type>
    <coding>
      <system value="http://terminology.hl7.org/CodeSystem/measure-type"/>
      <code value="process"/>
    </coding>
  </type>
  <improvementNotation>
    <coding>
      <system
              value="http://terminology.hl7.org/CodeSystem/measure-improvement-notation"/>
      <code value="increase"/>
    </coding>
  </improvementNotation>
  <group id="group-1">
    <population id="initial-population">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="initial-population"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Initial Population"/>
      </criteria>
    </population>
    <population id="denominator">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="denominator"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Denominator"/>
      </criteria>
    </population>
    <population id="numerator">
      <code>
        <coding>
          <system
                  value="http://terminology.hl7.org/CodeSystem/measure-population"/>
          <code value="numerator"/>
        </coding>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Numerator"/>
      </criteria>
    </population>
    <stratifier id="by-age">
      <code>
        <text value="Age"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Age Stratifier"/>
      </criteria>
    </stratifier>
    <stratifier id="by-education-level">
      <code>
        <text value="Education Level"/>
      </code>
      <criteria>
        <language value="text/cql-identifier"/>
        <expression value="Education Level Stratifier"/>
      </criteria>
    </stratifier>
  </group>
</Measure>