| HIVIND41 |
| HIV.IND.41 ART coverage in breastfeeding mothers |
| Draft |
| true |
% of HIV-exposed breastfeeding infants whose mothers are receiving ART at 12 (and 24 months) postpartum
|
| WHO |
| WHO: http://who.int |
| 0.4.4 |
| Proportion |
| Increased score indicates improvement |
| boolean |
ID: HIV.IND.41.IP
Description:
Initial Population
Logic Definition: Initial Population
|
ID: HIV.IND.41.DEN
Description:
Number of HIV-exposed infants attending MNCH services for a 12-month visit (and 24-month visit or first visit after the end of breastfeeding)
Logic Definition: Denominator
|
ID: HIV.IND.41.NUM
Description:
Number of HIV-exposed breastfeeding infants whose mothers are receiving ART at 12 months (and 24 months) postpartum
Logic Definition: Numerator
|
| HIV.IND.41 Logic |
Description: FHIR model information
Resource: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
|
Description: Library HIE
Resource: HIVIndicatorElements
Canonical URL: http://smart.who.int/hiv/Library/HIVIndicatorElements
|
Description: Library FHIRHelpers
Resource: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
Canonical URL: http://fhir.org/guides/cqf/common/Library/FHIRHelpers|4.0.1
|
Description: Library Elements
Resource: HIVElements
Canonical URL: http://smart.who.int/hiv/Library/HIVElements
|
Description: Library Concepts
Resource: http://smart.who.int/hiv/Library/HIVConcepts|0.0.2
Canonical URL: http://smart.who.int/hiv/Library/HIVConcepts|0.0.2
|
Description: Library WC
Resource: WHOCommon
Canonical URL: http://smart.who.int/hiv/Library/WHOCommon
|
Description: Code system HIVConcepts
Resource: WHO SMART HIV Concepts CodeSystem
Canonical URL: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: HIV-exposed infant or child
Code: HIV.E.DE112
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: Breastfeeding
Code: HIV.B.DE32
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: Live birth
Code: HIV.E.DE48
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: On ART
Code: HIV.D.DE38
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: Maternal and child health service visit
Code: HIV.E.DE173
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Display: 12-month visit
Code: HIV.E.DE174
System: http://smart.who.int/hiv/CodeSystem/HIVConcepts
|
Name: Measurement Period
Use: In
Min Cardinality: 0
Max Cardinality: 1
Type: Period
|
Name: Numerator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
|
Name: Denominator
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
|
Name: Initial Population
Use: Out
Min Cardinality: 0
Max Cardinality: 1
Type: boolean
|
Type: Patient
Profile(s):
Patient
|
Type: Observation
Profile(s):
Observation
Must Support Elements: code, status, effective
Code Filter(s):
Path: code
Code:
|
Type: Observation
Profile(s):
Observation
Must Support Elements: code, status, effective
Code Filter(s):
Path: code
Code:
|
Type: Observation
Profile(s):
Observation
Must Support Elements: code, status, value, effective, encounter
Code Filter(s):
Path: code
Code:
|
Type: MedicationStatement
Profile(s):
MedicationStatement
Must Support Elements: reasonCode, effective
|
Type: Encounter
Profile(s):
Encounter
Must Support Elements: type, period
|
| Library Name: HIVIndicatorElements |
define "Is Infant Patient":
Patient.birthDate is not null
and difference in years between Patient.birthDate and start of "Measurement Period" < 1
|
| Library Name: HIVElements |
/* End of Age of infant */
/*
@dataElement: HIV.E.DE112 - HIV-exposed infant or child
@activity: HIV.F6 Check whether infant/child had HIV exposure
@description: Whether the infant or child was determined to have had HIV exposure
*/
define "HIV-exposed infant or child E.DE112":
[Observation: Concepts."HIV-exposed infant or child - HIV.E.DE112"] O
where O.status in { 'final', 'amended', 'corrected' }
|
| Library Name: HIVIndicatorElements |
/* End of Age of infant */
/*
@dataElement: HIV.E.DE112 - HIV-exposed infant or child
@activity: HIV.F6 Check whether infant/child had HIV exposure
@description: Whether the infant or child was determined to have had HIV exposure
*/
define "is HIV-exposed infant or child E.DE112":
"Is Infant Patient" and
exists(Elements."HIV-exposed infant or child E.DE112" O
where O.effective.toInterval() during "Measurement Period")
|
| Library Name: HIVElements |
/* End of Currently pregnant B.DE29 */
/*
@dataElement: HIV.B.DE32 - Breastfeeding
@activity: HIV.B6 Capture or update client history
@description: Infant is being breastfed by mother
*/
define "Breastfeeding B.DE32":
[Observation: Concepts."Breastfeeding - HIV.B.DE32"] O
where O.status in { 'final', 'amended', 'corrected' }
and O.value is true
|
| Library Name: HIVIndicatorElements |
/* End of Currently pregnant B.DE29 */
/*
@dataElement: HIV.B.DE32 - Breastfeeding
@activity: HIV.B6 Capture or update client history
@description: Infant is being breastfed by mother
*/
define "Breastfeeding B.DE32":
Elements."Breastfeeding B.DE32" O
where O.effective.toInterval() during "Measurement Period"
|
| Library Name: HIVElements |
/* End of Newly on ART during labour and delivery */
/*
@dataElement: HIV.E.DE46 - Delivery date
@activity: HIV.E1 Capture or update mother's history
@description: Date on which the woman delivered
*/
define "Live Birth Delivery":
[Observation: Concepts."Live birth"] O
where O.status in { 'final', 'amended', 'corrected' }
|
| Library Name: HIVIndicatorElements |
/* End of Newly on ART during labour and delivery */
/*
@dataElement: HIV.E.DE46 - Delivery date
@activity: HIV.E1 Capture or update mother's history
@description: Date on which the woman delivered
*/
define "Live Birth Delivery":
Elements."Live Birth Delivery" O
where O.effective.toInterval() during "Measurement Period"
|
| Library Name: HIVElements |
/* End of Serodiscordant partner D.DE37 */
/*
@dataElement: HIV.D.DE38 - On ART
@activity: HIV.D8 Capture or update client history
@description: Client is currently taking ART
*/
define "On ART D.DE38":
[MedicationStatement] MS
where exists(MS.reasonCode C where C ~ Concepts."On ART - HIV.D.DE38")
sort by start of effective.toInterval()
|
| Library Name: HIVIND41Logic |
/**
* Numerator
*
* Definition: Number of HIV-exposed breastfeeding infants whose mothers are receiving ART at 12 months (and 24 months*) postpartum
* Calculation: COUNT of infants who are an "HIV-exposed infant or child" AND whose mothers are "Breastfeeding" 12 months after "Delivery date" AND mothers with "On ART"=True 12 months after "Delivery date" | | Also reported for 24 months after "Delivery date"
*/
define "Numerator":
HIE."is HIV-exposed infant or child E.DE112"
and exists(HIE."Breastfeeding B.DE32" B
where months between end of B.effective.toInterval() and end of Last(HIE."Live Birth Delivery" B where B.effective.toInterval() before "Measurement Period").effective.toInterval() > 12 months
)
and
exists (
HE."On ART D.DE38" A
where months between end of A.effective.toInterval() and end of Last(HIE."Live Birth Delivery" B where B.effective.toInterval() before "Measurement Period").effective.toInterval() > 12 months
)
|
| Library Name: HIVElements |
/* End of Dual HIV/syphilis rapid diagnostic test E.DE172 */
/*
@dataElement: HIV.E.DE173 - Maternal and child health service visit
@activity: HIV.E1 Capture or update mother's history
@description: Maternal and child health service visit attended by an HIV-exposed infant
*/
define "Maternal and child health service visit":
[Encounter] E
where E.type.coding.code contains Concepts."Maternal and child health service visit".code
|
| Library Name: HIVElements |
/* End of Maternal and child health service visit */
/*
@dataElement: HIV.E.DE174 - 12-month visit
@activity: HIV.E1 Capture or update mother's history
@description: HIV-exposed infant attending MCH services for a 12-month visit
*/
define "12-month visit":
"Maternal and child health service visit" E
where E.type.coding.code contains Concepts."12-month visit".code
|
| Library Name: HIVIndicatorElements |
/* End of Maternal and child health service visit */
/*
@dataElement: HIV.E.DE174 - 12-month visit
@activity: HIV.E1 Capture or update mother's history
@description: HIV-exposed infant attending MCH services for a 12-month visit
*/
define "12-month visit":
exists Elements."12-month visit" E
where E.period.toInterval() during "Measurement Period"
|
| Library Name: HIVElements |
define "Not Breastfeeding B.DE32":
[Observation: Concepts."Breastfeeding - HIV.B.DE32"] O
where O.status in { 'final', 'amended', 'corrected' }
and O.value is false
|
| Library Name: HIVIND41Logic |
/**
* Denominator
*
* Definition: Number of HIV-exposed infants attending MNCH services for a 12-month visit (and 24-month visit or first visit after the end of breastfeeding)
* Calculation: COUNT of infants who are an "HIV-exposed infant or child" AND [(whose mothers attend a 12-month "Maternal and child health service visit") OR (first "Maternal and child health service visit" after "Delivery date" where mother is NOT "Breastfeeding")] | | Also reported for mothers attending 24-month "Maternal and child health service visit"
*/
define "Denominator":
HIE."is HIV-exposed infant or child E.DE112"
and (HIE."12-month visit"
or
exists(HE."Not Breastfeeding B.DE32" B
with HE."Maternal and child health service visit" E
such that B.encounter.references(E) and E.period.toInterval() after end of Last(HIE."Live Birth Delivery" B where B.effective.toInterval() before "Measurement Period").effective.toInterval())
)
|
| Library Name: HIVIND41Logic |
/* Populations */
/*
*Initial Population
*/
define "Initial Population":
true
|
| Library Name: FHIRHelpers |
define function ToDate(value date): value.value
|
| Library Name: FHIRHelpers |
define function ToString(value ObservationStatus): value.value
|
| Library Name: FHIRHelpers |
define function ToBoolean(value boolean): value.value
|
| Library Name: FHIRHelpers |
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
}
|
| Library Name: FHIRHelpers |
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
}
|
| Library Name: FHIRHelpers |
define function ToString(value string): value.value
|
| Library Name: WHOCommon |
/*
From FHIRCommon 4.1.0:
*/
/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.
The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.
NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
case
when choice is FHIR.dateTime then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
when choice is FHIR.Period then
FHIRHelpers.ToInterval(choice as FHIR.Period)
when choice is FHIR.instant then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
when choice is FHIR.Age then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
when choice is FHIR.Range then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
when choice is FHIR.Timing then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
when choice is FHIR.string then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
else
null as Interval<DateTime>
end
|
| Library Name: FHIRHelpers |
define function ToDateTime(value dateTime): value.value
|
| Library Name: FHIRHelpers |
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]
|
| Library Name: FHIRHelpers |
define function ToDateTime(value instant): value.value
|
| Library Name: FHIRHelpers |
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
|
| Library Name: FHIRHelpers |
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
|
| Library Name: WHOCommon |
/*
@description: Returns true if the given reference is to the given resource
@comment: Returns true if the `id` element of the given resource exactly equals the tail of the given reference.
NOTE: This function assumes resources from the same source server.
*/
define fluent function references(reference FHIR.Reference, resource FHIR.Resource):
resource.id = Last(Split(reference.reference, '/'))
|