Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ig.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[IG]
ig = fsh-generated/resources/ImplementationGuide-smart.who.int.immunizations-measles.json
ig = fsh-generated/resources/ImplementationGuide-smart.who.int.example-immz.json

template = #local-template
;template = who.template.root#current
54 changes: 40 additions & 14 deletions input/cql/IMMZIND12Logic.cql
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
library IMMZIND12Logic

/*
NOTE: This is an estimated denominator measure, meaning that all we are contributing from the site perspective is a count
towards the numerator, actual processing of this data to determine a proportion measure would be done by downstream analytics

For this reason, this measure is modeled as a cohort measure where membership in the cohort is determine by administration of
a measles containing vaccine.
NOTE: This is an estimated denominator measure, meaning that the actual denominator values for each location will be provided
by the implementing environment. As such, this measure is modeled as a _patient-based_ _ratio_ of _continuous variables_, where the
denominator is Locations, and the numerator is Patients
*/

using FHIR version '4.0.1'
Expand All @@ -40,24 +38,52 @@ parameter "Measurement Period" Interval<Date>

context Patient

define "Encounter During Measurement Period":
[Encounter] E
where E.period during "Measurement Period"

/*
* As defined by Member State
* As defined by Member State, but defaulted based on locations with encounters
*/
define "Initial Population":
true
define "Denominator Initial Population":
[Location] L
with "Encounter During Measurement Period" E
such that E.location.references(L)

/*
* As defined by Member State
* Locations in target group, as defined by Member State, but defaulted based on locations with encounters
*/
define "Denominator":
true
"Denominator Initial Population"

/*
* Numerator: Number of measles and rubella doses (1st dose) administered through routine services during reporting period
* Numerator Computation: COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the first dose in the primary series AND "Date and time of vaccination" is during the reporting period
* Number in target group, as defined by Member State, but defaulted to number of patients with encounters at each location
*/
define function "Denominator Observation"(location Location):
Count(
"Encounter During Measurement Period" E
where E.location.references(location)
return E.subject
)

/*
* Patients with at least one encounter during the reporting period
*/
define "Numerator Initial Population":
exists ("Encounter During Measurement Period")

/*
* Patients with measles and rubella doses (1st dose) administered through routine services during reporting period
*/
define "Numerator":
exists (
Elements."MCV Doses Administered to Patient During Measurement Period" I
where I.protocolApplied.only().doseNumber = 1
Elements."MCV Doses Administered to Patient During Measurement Period" I
where I.protocolApplied.only().doseNumber = 1
)

/*
* Numerator: Number of measles and rubella doses (1st dose) administered through routine services during reporting period
* Numerator Computation: COUNT of immunization events WHERE "Vaccine type" = "Measles and rubella containing vaccines" for the first dose in the primary series AND "Date and time of vaccination" is during the reporting period
*/
define function "Numerator Observation"():
if "Numerator" then 1 else 0
38 changes: 31 additions & 7 deletions input/fsh/measures/IMMZIND12.fsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Instance: IMMZIND12
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/proportion-measure-cqfm
InstanceOf: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/ratio-measure-cqfm
Title: "IMMZ.IND.12 Measles indicator for first dose"
* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-shareablemeasure"
* meta.profile[+] = "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-publishablemeasure"
Expand All @@ -19,26 +19,50 @@ Title: "IMMZ.IND.12 Measles indicator for first dose"
* type = #citation
* citation = "WHO Handbook on immunization data"
* library = "http://smart.who.int/immunizations-measles/Library/IMMZIND12Logic"
* scoring = $measure-scoring#proportion "Proportion"
* scoring = $measure-scoring#ratio "Ratio"
* group[+]
* population[initialPopulation]
* id = "IMMZ.IND.12.IP"
* description = "Number in target group"
* id = "IMMZ.IND.12.DENIP"
* description = "Locations in target group, as defined by Member State, but defaulted based on locations with encounters"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql-identifier
* criteria.expression = "Initial Population"
* criteria.expression = "Denominator Initial Population"
* population[denominator]
* id = "IMMZ.IND.12.DEN"
* description = "Number in target group"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "IMMZ.IND.12.DENIP"
* description = "Locations in target group, as defined by Member State, but defaulted based on locations with encounters"
* code = $measure-population#denominator "Denominator"
* criteria.language = #text/cql-identifier
* criteria.expression = "Denominator"
* population[measureObservation]
* id = "IMMZ.IND.12.DENOBS"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "IMMZ.IND.12.DEN"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod].valueCode = #sum
* description = "Number in target group, as defined by Member State, but defaulted to number of patients with encounters at each location"
* code = $measure-population#measure-observation "Measure Observation"
* criteria.language = #text/cql-identifier
* criteria.expression = "Denominator Observation"
* population[initialPopulation]
* id = "IMMZ.IND.12.NUMIP"
* description = "Patients with at least one encounter during the reporting period"
* code = $measure-population#initial-population "Initial Population"
* criteria.language = #text/cql-identifier
* criteria.expression = "Numerator Initial Population"
* population[numerator]
* id = "IMMZ.IND.12.NUM"
* description = "Number of measles and rubella doses (1st dose) administered through routine services during reporting period"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "IMMZ.IND.12.NUMIP"
* description = "Patients with measles and rubella doses (1st dose) administered through routine services during reporting period"
* code = $measure-population#numerator "Numerator"
* criteria.language = #text/cql-identifier
* criteria.expression = "Numerator"
* population[measureObservation]
* id = "IMMZ.IND.12.NUMOBS"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference].valueString = "IMMZ.IND.12.NUM"
* extension[http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod].valueCode = #sum
* description = "Number of measles and rubella doses (1st dose) administered through routine services during reporting period"
* code = $measure-population#measure-observation "Measure Observation"
* criteria.language = #text/cql-identifier
* criteria.expression = "Numerator Observation"
* stratifier[+]
* id = "IMMZ.IND.12.S"
* criteria.language = #text/cql-identifier
Expand Down
23 changes: 14 additions & 9 deletions sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# │ used properties are included. For a list of all supported properties and their functions, │
# │ see: https://fshschool.org/docs/sushi/configuration/. │
# ╰────────────────────────────────────────────────────────────────────────────────────────────────╯
id: smart.who.int.immunizations-measles
canonical: http://smart.who.int/immunizations-measles
name: ImmunizationsMeasles
title: WHO SMART Guidelines - Measles Immunization
description: WHO SMART Guidelines - Measles Immunization (Demonstration specification)
id: smart.who.int.example-immz
canonical: http://smart.who.int/example-immz
name: ExampleImmunizationsMeasles
title: WHO SMART Guidelines - Example Measles Immunization
description: WHO SMART Guidelines - Example Measles Immunization (Demonstration specification)
status: draft # draft | active | retired | unknown
experimental: true
version: 0.1.0
Expand All @@ -26,14 +26,19 @@ publisher:
# use cases, the value can be an object with keys for id, uri, and version.
#
dependencies:
hl7.terminology: 5.5.0
hl7.fhir.uv.extensions.r4: 5.1.0
# NOTE: These dependencies are required because SUSHI doesn't load transitive dependencies
# See the zulip thread here: https://chat.fhir.org/#narrow/stream/215610-shorthand/search/transitive
hl7.terminology.r4: 6.4.0
hl7.fhir.uv.extensions.r4: 5.2.0
hl7.fhir.uv.cql: 1.0.0
hl7.fhir.uv.crmi: 1.0.0
hl7.fhir.uv.sdc: 3.0.0
hl7.fhir.uv.cpg: current
hl7.fhir.us.cqfmeasures: current
hl7.fhir.uv.cpg: 2.0.0
hl7.fhir.us.cqfmeasures: 5.0.0
# Actual dependencies
fhir.cqf.common: 4.0.1
smart.who.int.base: dev
smart.who.int.base-clinical: dev

#
#
Expand Down