WHO Antenatal Care Guideline Implementation Guide
0.3.0 - CI Build
WHO Antenatal Care Guideline Implementation Guide, published by World Health Organization (WHO). This guide is not an authorized publication; it is the continuous build for version 0.3.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/WorldHealthOrganization/smart-anc/ and changes regularly. See the Directory of published versions
Draft as of 2025-06-24 |
<Measure xmlns="http://hl7.org/fhir">
<id value="ANCIND07"/>
<meta>
<profile
value="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"/>
</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">ANCIND07</td>
</tr>
<tr>
<th scope="row" class="row-header">Title (human-readable)</th>
<td class="content-container">ANC.IND.07 Percentage of pregnant women with at least one blood pressure measure during ANC</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">false</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container"><div><p>Percentage of pregnant women with at least one blood pressure measure during ANC</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Measure Steward</th>
<td class="content-container">World Health Organization (WHO)</td>
</tr>
<tr>
<th scope="row" class="row-header">Steward Contact Details</th>
<td class="content-container"><a href="https://www.who.int">https://www.who.int</a></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">0.3.0</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="#ancind07-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="#ancind07-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="#ancind07-numerator">Numerator</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Stratifier</th>
<td class="content-container">
<em>ID</em>: by-age
</td>
</tr>
<tr>
<th scope="row" class="row-header">Stratifier</th>
<td class="content-container">
<em>ID</em>: by-education-level
</td>
</tr>
<tr>
<th scope="row" class="row-header">Stratifier</th>
<td class="content-container">
<em>ID</em>: by-trimester-category
</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-ANCIND07.html">ANC.IND.07 Percentage of pregnant women with at least one blood pressure measure during ANC</a></td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library PatientData
<br/>
<em>Resource</em>: <a href="Library-ANCDataElements.html">ANC Data Elements</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCDataElements</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library Cx
<br/>
<em>Resource</em>: <a href="Library-ANCConcepts.html">ANC Concepts</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCConcepts</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://smart.who.int/anc/Library/FHIRHelpers|4.0.1</code>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/FHIRHelpers|4.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library WC
<br/>
<em>Resource</em>: <a href="Library-WHOCommon.html">WHO Common</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/WHOCommon</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library BaseData
<br/>
<em>Resource</em>: <a href="Library-ANCBaseDataElements.html">ANC Base Data Elements</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCBaseDataElements</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library BCx
<br/>
<em>Resource</em>: <a href="Library-ANCBaseConcepts.html">ANC Base Concepts</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCBaseConcepts</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library Stratifiers
<br/>
<em>Resource</em>: <a href="Library-ANCStratifiers.html">ANC Stratifiers</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCStratifiers</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library FC
<br/>
<em>Resource</em>: <a href="Library-FHIRCommon.html">FHIRCommon</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/FHIRCommon</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library ContactData
<br/>
<em>Resource</em>: <a href="Library-ANCContactDataElements.html">ANC Contact Data Elements</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/Library/ANCContactDataElements</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Code system ISO-8601-Derived Periods
<br/>
<em>Resource</em>: <code>http://ohie.org/CodeSystem/iso-8601-derived-periods</code>
<br/>
<em>Canonical URL</em>: <tt>http://ohie.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 Systolic blood pressure
<br/>
<em>Resource</em>: <a href="ValueSet-anc-b8-de17.html">Systolic blood pressure</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/anc-b8-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>: <a href="ValueSet-antenatal-care-case.html">Antenatal care case</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/antenatal-care-case</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Diastolic blood pressure
<br/>
<em>Resource</em>: <a href="ValueSet-anc-b8-de19.html">Diastolic blood pressure</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/anc-b8-de19</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Reason for closing ANC record
<br/>
<em>Resource</em>: <a href="ValueSet-anc-end-1.html">Reason for closing ANC record</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/anc-end-1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Qualifying Reason for closing ANC record Choices
<br/>
<em>Resource</em>: <a href="ValueSet-qualifying-reason-for-closing-anc-record-choices.html">Qualifying Reason for closing ANC record Choices</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/qualifying-reason-for-closing-anc-record-choices</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>: <a href="ValueSet-anc-b6-de17.html">Gestational age</a>
<br/>
<em>Canonical URL</em>: <tt>http://smart.who.int/anc/ValueSet/anc-b6-de17</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://ohie.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://ohie.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://ohie.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 scope="row" class="row-header">Parameter</th>
<td class="content-container">
<em>Name</em>: Trimester Category Stratifier
<br/>
<em>Use</em>: Out
<br/>
<em>Min Cardinality</em>: 0
<br/>
<em>Max Cardinality</em>: 1
<br/>
<em>Type</em>: string
</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>: 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, issued
<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-anc-b8-de17.html">Systolic blood pressure</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, status, issued
<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-anc-b8-de19.html">Diastolic blood pressure</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, status, effective, value
<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-anc-end-1.html">Reason for closing ANC record</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, 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> <a href="ValueSet-anc-b6-de17.html">Gestational age</a>
<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> <a href="ValueSet-antenatal-care-case.html">Antenatal care case</a>
<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 colspan="2" scope="row" class="row-header">Measure Logic Definitions</th>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancdataelements-systolic-blood-pressure"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@dataElement: ANC.B8.DE17 Systolic blood pressure
@activity: ANC.B8. Conduct physical exam
@description: Systolic blood pressure (SBP) in mmHg
*/
define "Systolic blood pressure":
[Observation: Cx."Systolic blood pressure"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false</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 "Pregnant":
"Pregnancy" is not null
or "Pregnancy status" in BCx."Pregnancy status - pregnant"
define "Pregnancy status":
FHIRHelpers.ToConcept(
Last(
[Observation: BCx."Pregnancy status"] O
where O.status = 'final'
sort by FHIRHelpers.ToDateTime(effective as FHIR.dateTime)
).value
)
*/
define "Antenatal care case":
["EpisodeOfCare": type in BCx."Antenatal care case"]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancbasedataelements-pregnancy"> </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">/*
@description: Most recent antenatal care case
*/
define "Pregnancy":
First(
"Antenatal care case" E
sort by start of period descending
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancdataelements-diastolic-blood-pressure"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@dataElement: ANC.B8.DE19 Diastolic blood pressure
@activity: ANC.B8. Conduct physical exam
@description: Diastolic blood pressure (DBP) in mmHg
*/
define "Diastolic blood pressure":
[Observation: Cx."Diastolic blood pressure"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-numerator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Numerator: Number of antenatal clients with blood pressure measured
Numerator Computation: COUNT of all women who had their blood pressure measured at least once during pregnancy
*/
define Numerator:
exists (
PatientData."Systolic blood pressure" O
where O.issued during BaseData."Pregnancy".period
)
or exists (
PatientData."Diastolic blood pressure" O
where O.issued during BaseData."Pregnancy".period
)</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 "By Age":
case
when AgeInYearsAt(start of "Measurement Period") in Interval[10, 14] then "P10Y--P14Y"
when AgeInYearsAt(start of "Measurement Period") in Interval[15, 19] then "P15Y--P19Y"
when AgeInYearsAt(start of "Measurement Period") >= 20 then "P20Y--P9999Y"
else null
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-age-stratifier"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</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 "Age Stratifier":
Stratifiers."By Age"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancdataelements-reason-for-closing-anc-record"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCDataElements</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@dataElement: ANC.End.1 Reason for closing ANC record
@activity: ANC.End End
@description: Select the reason why you are closing the woman's ANC record
*/
define "Reason for closing ANC record":
[Observation: Cx."Reason for closing ANC record"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-denominator"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</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 whose records were closed (ANC close form) in the last reporting period due to any of the reasons below:
*live birth
*stillbirth
*miscarriage
*abortion
*woman died
*lost to follow-up
*moved away
*/
define Denominator:
exists (
PatientData."Reason for closing ANC record" R
where FC.ToInterval(R.effective) during "Measurement Period"
and R.value as FHIR.CodeableConcept in Stratifiers."Qualifying Reason for closing ANC record Choices"
)</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 "By Education Level":
Patient.extension E
where E.url = 'http://smart.who.int/anc/StructureDefinition/educationlevel'
return E.value as CodeableConcept</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-education-level-stratifier"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</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 "Education Level Stratifier":
Stratifiers."By Education Level"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-initial-population"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Initial population: Antenatal clients
*/
define "Initial Population":
exists (BaseData."Antenatal care case")</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 "Gestational age":
WC.MostRecent(
[Observation: Cx."Gestational age"] 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="ancstratifiers-by-trimester-category"> </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 Trimester Category: 1st (GA ≤ 12 weeks); 2nd (GA > 12 weeks to ≤ 28 weeks); 3rd (GA > 28 weeks)
*/
define "By Trimester Category":
case
when ContactData."Gestational age" <= 12 weeks then 'GA ≤ 12 weeks'
when ContactData."Gestational age" <= 28 weeks then 'GA > 12 weeks to ≤ 28 weeks'
else 'GA > 28 weeks'
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="ancind07-trimester-category-stratifier"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> ANCIND07</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
Disaggregation: Trimester categories: 1st (GA ≤ 12 weeks); 2nd (GA > 12 weeks to ≤ 28 weeks); 3rd (GA > 28 weeks)
*/
define "Trimester Category Stratifier":
Stratifiers."By Trimester Category"</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 ObservationStatus): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-toboolean"> </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 ToBoolean(value boolean): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="whocommon-modifierextension"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> WHOCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns the single WHO core modifier extension (if present) on the given resource with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function ModifierExtension(domainResource DomainResource, id String):
singleton from ModifierExtensions(domainResource, id)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="whocommon-modifierextensions"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> WHOCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Returns any WHO core modifier extensions defined on the given resource with the specified id.
@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 function ModifierExtensions(domainResource DomainResource, id String):
domainResource.modifierExtension E
where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id)
return E</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 uri): value.value</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 instant): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tointerval"> </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 ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]</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">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="fhirhelpers-tocode"> </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 ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-toquantity"> </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 ToQuantity(quantity FHIR.Quantity):
case
when quantity is null then null
when quantity.value is null then null
when quantity.comparator is not null then
Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
else
Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="fhirhelpers-tocalendarunit"> </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 ToCalendarUnit(unit System.String):
case unit
when 'ms' then 'millisecond'
when 's' then 'second'
when 'min' then 'minute'
when 'h' then 'hour'
when 'd' then 'day'
when 'wk' then 'week'
when 'mo' then 'month'
when 'a' then 'year'
else unit
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
<a name="whocommon-mostrecent"> </a>
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> WHOCommon</td>
</tr>
<tr>
<td>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function MostRecent(observations List<Observation>):
Last(
observations O
sort by issued
)</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 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/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
<valueCoding>
<system
value="http://ohie.org/CodeSystem/iso-8601-derived-periods"/>
<code value="P10Y--P14Y"/>
<display value="10-14 years"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
<valueCoding>
<system
value="http://ohie.org/CodeSystem/iso-8601-derived-periods"/>
<code value="P15Y--P19Y"/>
<display value="15-19 years"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode">
<valueCoding>
<system
value="http://ohie.org/CodeSystem/iso-8601-derived-periods"/>
<code value="P20Y--P9999Y"/>
<display value="20+ years"/>
</valueCoding>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCDataElements"/>
</extension>
<extension url="name">
<valueString value="Systolic blood pressure"/>
</extension>
<extension url="statement">
<valueString
value="/*
@dataElement: ANC.B8.DE17 Systolic blood pressure
@activity: ANC.B8. Conduct physical exam
@description: Systolic blood pressure (SBP) in mmHg
*/
define "Systolic blood pressure":
[Observation: Cx."Systolic blood pressure"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false"/>
</extension>
<extension url="displaySequence">
<valueInteger value="0"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCBaseDataElements"/>
</extension>
<extension url="name">
<valueString value="Antenatal care case"/>
</extension>
<extension url="statement">
<valueString
value="/*
define "Pregnant":
"Pregnancy" is not null
or "Pregnancy status" in BCx."Pregnancy status - pregnant"
define "Pregnancy status":
FHIRHelpers.ToConcept(
Last(
[Observation: BCx."Pregnancy status"] O
where O.status = 'final'
sort by FHIRHelpers.ToDateTime(effective as FHIR.dateTime)
).value
)
*/
define "Antenatal care case":
["EpisodeOfCare": type in BCx."Antenatal care case"]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="1"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCBaseDataElements"/>
</extension>
<extension url="name">
<valueString value="Pregnancy"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Most recent antenatal care case
*/
define "Pregnancy":
First(
"Antenatal care case" E
sort by start of period descending
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCDataElements"/>
</extension>
<extension url="name">
<valueString value="Diastolic blood pressure"/>
</extension>
<extension url="statement">
<valueString
value="/*
@dataElement: ANC.B8.DE19 Diastolic blood pressure
@activity: ANC.B8. Conduct physical exam
@description: Diastolic blood pressure (DBP) in mmHg
*/
define "Diastolic blood pressure":
[Observation: Cx."Diastolic blood pressure"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false"/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</extension>
<extension url="name">
<valueString value="Numerator"/>
</extension>
<extension url="statement">
<valueString
value="/*
Numerator: Number of antenatal clients with blood pressure measured
Numerator Computation: COUNT of all women who had their blood pressure measured at least once during pregnancy
*/
define Numerator:
exists (
PatientData."Systolic blood pressure" O
where O.issued during BaseData."Pregnancy".period
)
or exists (
PatientData."Diastolic blood pressure" O
where O.issued during BaseData."Pregnancy".period
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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 "By Age":
case
when AgeInYearsAt(start of "Measurement Period") in Interval[10, 14] then "P10Y--P14Y"
when AgeInYearsAt(start of "Measurement Period") in Interval[15, 19] then "P15Y--P19Y"
when AgeInYearsAt(start of "Measurement Period") >= 20 then "P20Y--P9999Y"
else null
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</extension>
<extension url="name">
<valueString value="Age Stratifier"/>
</extension>
<extension url="statement">
<valueString
value="/*
Disaggregation: Age (10-14, 15-19, 20+)
*/
define "Age Stratifier":
Stratifiers."By Age""/>
</extension>
<extension url="displaySequence">
<valueInteger value="6"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCDataElements"/>
</extension>
<extension url="name">
<valueString value="Reason for closing ANC record"/>
</extension>
<extension url="statement">
<valueString
value="/*
@dataElement: ANC.End.1 Reason for closing ANC record
@activity: ANC.End End
@description: Select the reason why you are closing the woman's ANC record
*/
define "Reason for closing ANC record":
[Observation: Cx."Reason for closing ANC record"] O
where O.status in { 'final', 'amended', 'corrected' }
and Coalesce(WC.ModifierExtension(O, 'who-notDone').value, false) is false"/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</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 whose records were closed (ANC close form) in the last reporting period due to any of the reasons below:
*live birth
*stillbirth
*miscarriage
*abortion
*woman died
*lost to follow-up
*moved away
*/
define Denominator:
exists (
PatientData."Reason for closing ANC record" R
where FC.ToInterval(R.effective) during "Measurement Period"
and R.value as FHIR.CodeableConcept in Stratifiers."Qualifying Reason for closing ANC record Choices"
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="8"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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 "By Education Level":
Patient.extension E
where E.url = 'http://smart.who.int/anc/StructureDefinition/educationlevel'
return E.value as CodeableConcept"/>
</extension>
<extension url="displaySequence">
<valueInteger value="9"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</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 "Education Level Stratifier":
Stratifiers."By Education Level""/>
</extension>
<extension url="displaySequence">
<valueInteger value="10"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</extension>
<extension url="name">
<valueString value="Initial Population"/>
</extension>
<extension url="statement">
<valueString
value="/*
Initial population: Antenatal clients
*/
define "Initial Population":
exists (BaseData."Antenatal care case")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="11"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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 "Gestational age":
WC.MostRecent(
[Observation: Cx."Gestational age"] 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="12"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCStratifiers"/>
</extension>
<extension url="name">
<valueString value="By Trimester Category"/>
</extension>
<extension url="statement">
<valueString
value="/*
By Trimester Category: 1st (GA ≤ 12 weeks); 2nd (GA > 12 weeks to ≤ 28 weeks); 3rd (GA > 28 weeks)
*/
define "By Trimester Category":
case
when ContactData."Gestational age" <= 12 weeks then 'GA ≤ 12 weeks'
when ContactData."Gestational age" <= 28 weeks then 'GA > 12 weeks to ≤ 28 weeks'
else 'GA > 28 weeks'
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="13"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="ANCIND07"/>
</extension>
<extension url="name">
<valueString value="Trimester Category Stratifier"/>
</extension>
<extension url="statement">
<valueString
value="/*
Disaggregation: Trimester categories: 1st (GA ≤ 12 weeks); 2nd (GA > 12 weeks to ≤ 28 weeks); 3rd (GA > 28 weeks)
*/
define "Trimester Category Stratifier":
Stratifiers."By Trimester Category""/>
</extension>
<extension url="displaySequence">
<valueInteger value="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToString"/>
</extension>
<extension url="statement">
<valueString
value="define function ToString(value ObservationStatus): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="15"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToBoolean"/>
</extension>
<extension url="statement">
<valueString
value="define function ToBoolean(value boolean): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="16"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="WHOCommon"/>
</extension>
<extension url="name">
<valueString value="ModifierExtension"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns the single WHO core modifier extension (if present) on the given resource with the specified id.
@comment: This function uses singleton from to ensure that a run-time exception is thrown if there
is more than one extension on the given resource with the specified url.
*/
define function ModifierExtension(domainResource DomainResource, id String):
singleton from ModifierExtensions(domainResource, id)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="17"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="WHOCommon"/>
</extension>
<extension url="name">
<valueString value="ModifierExtensions"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Returns any WHO core modifier extensions defined on the given resource with the specified id.
@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 function ModifierExtensions(domainResource DomainResource, id String):
domainResource.modifierExtension E
where E.url = ('http://fhir.org/guides/who/core/StructureDefinition/' + id)
return E"/>
</extension>
<extension url="displaySequence">
<valueInteger value="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToString"/>
</extension>
<extension url="statement">
<valueString
value="define function ToString(value uri): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToDateTime"/>
</extension>
<extension url="statement">
<valueString
value="define function ToDateTime(value instant): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="20"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToInterval"/>
</extension>
<extension url="statement">
<valueString
value="define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="21"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToConcept"/>
</extension>
<extension url="statement">
<valueString
value="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="22"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCode"/>
</extension>
<extension url="statement">
<valueString
value="define function ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="23"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToQuantity"/>
</extension>
<extension url="statement">
<valueString
value="define function ToQuantity(quantity FHIR.Quantity):
case
when quantity is null then null
when quantity.value is null then null
when quantity.comparator is not null then
Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
else
Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="24"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCalendarUnit"/>
</extension>
<extension url="statement">
<valueString
value="define function ToCalendarUnit(unit System.String):
case unit
when 'ms' then 'millisecond'
when 's' then 'second'
when 'min' then 'minute'
when 'h' then 'hour'
when 'd' then 'day'
when 'wk' then 'week'
when 'mo' then 'month'
when 'a' then 'year'
else unit
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="25"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition">
<extension url="libraryName">
<valueString value="WHOCommon"/>
</extension>
<extension url="name">
<valueString value="MostRecent"/>
</extension>
<extension url="statement">
<valueString
value="define function MostRecent(observations List<Observation>):
Last(
observations O
sort by issued
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="26"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-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="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 PatientData"/>
<resource value="http://smart.who.int/anc/Library/ANCDataElements"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Cx"/>
<resource value="http://smart.who.int/anc/Library/ANCConcepts"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRHelpers"/>
<resource value="http://smart.who.int/anc/Library/FHIRHelpers|4.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library WC"/>
<resource value="http://smart.who.int/anc/Library/WHOCommon"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library BaseData"/>
<resource
value="http://smart.who.int/anc/Library/ANCBaseDataElements"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library BCx"/>
<resource value="http://smart.who.int/anc/Library/ANCBaseConcepts"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Stratifiers"/>
<resource value="http://smart.who.int/anc/Library/ANCStratifiers"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FC"/>
<resource value="http://smart.who.int/anc/Library/FHIRCommon"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library ContactData"/>
<resource
value="http://smart.who.int/anc/Library/ANCContactDataElements"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Code system ISO-8601-Derived Periods"/>
<resource
value="http://ohie.org/CodeSystem/iso-8601-derived-periods"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Systolic blood pressure"/>
<resource value="http://smart.who.int/anc/ValueSet/anc-b8-de17"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Antenatal care case"/>
<resource
value="http://smart.who.int/anc/ValueSet/antenatal-care-case"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Diastolic blood pressure"/>
<resource value="http://smart.who.int/anc/ValueSet/anc-b8-de19"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Reason for closing ANC record"/>
<resource value="http://smart.who.int/anc/ValueSet/anc-end-1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display
value="Value set Qualifying Reason for closing ANC record Choices"/>
<resource
value="http://smart.who.int/anc/ValueSet/qualifying-reason-for-closing-anc-record-choices"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Gestational age"/>
<resource value="http://smart.who.int/anc/ValueSet/anc-b6-de17"/>
</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>
<parameter>
<name value="Trimester Category Stratifier"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="status"/>
<mustSupport value="issued"/>
<codeFilter>
<path value="code"/>
<valueSet value="http://smart.who.int/anc/ValueSet/anc-b8-de17"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="status"/>
<mustSupport value="issued"/>
<codeFilter>
<path value="code"/>
<valueSet value="http://smart.who.int/anc/ValueSet/anc-b8-de19"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="status"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet value="http://smart.who.int/anc/ValueSet/anc-end-1"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<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://smart.who.int/anc/ValueSet/anc-b6-de17"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="EpisodeOfCare"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"/>
<mustSupport value="type"/>
<codeFilter>
<path value="type"/>
<valueSet
value="http://smart.who.int/anc/ValueSet/antenatal-care-case"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Patient"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
<mustSupport value="url"/>
<mustSupport value="value"/>
</dataRequirement>
</Library>
</contained>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
<valueReference>🔗
<reference value="Device/cqf-tooling"/>
</valueReference>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem">
<valueReference>🔗
<reference value="Device/cqf-tooling"/>
</valueReference>
</extension>
<extension
url="http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements" id="effective-data-requirements">
<valueReference>
<reference value="#effective-data-requirements"/>
</valueReference>
</extension>
<url value="http://smart.who.int/anc/Measure/ANCIND07"/>
<version value="0.3.0"/>
<name value="ANCIND07"/>
<title
value="ANC.IND.07 Percentage of pregnant women with at least one blood pressure measure during ANC"/>
<status value="draft"/>
<experimental value="false"/>
<date value="2025-06-24T13:58:48-06:00"/>
<publisher value="World Health Organization (WHO)"/>
<contact>
<telecom>
<system value="url"/>
<value value="https://www.who.int"/>
</telecom>
</contact>
<description
value="Percentage of pregnant women with at least one blood pressure measure during ANC"/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<library value="http://smart.who.int/anc/Library/ANCIND07"/>
<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">
<criteria>
<language value="text/cql-identifier"/>
<expression value="Age Stratifier"/>
</criteria>
</stratifier>
<stratifier id="by-education-level">
<criteria>
<expression value="Education Level Stratifier"/>
</criteria>
</stratifier>
<stratifier id="by-trimester-category">
<criteria>
<language value="text/cql-identifier"/>
<expression value="Trimester Category Stratifier"/>
</criteria>
</stratifier>
</group>
</Measure>