This page is part of the Maternal and Infant Health Research (v1.0.0: STU1) based on FHIR R4. This is the current published version. For a full list of available versions, see the Directory of published versions
Official URL: http://fhir.org/guides/cqf/Library/PAMDeaths | Version: 1.0.0 | |||
Draft as of 2023-03-29 | Computable Name: PAMDeaths |
depends-on | Code system Observation Category | Observation Category Codes |
depends-on | Value set Delivery Live Births | Delivery Live Births |
depends-on | Value set Delivery Procedure | Delivery - Procedure |
depends-on | Value set Pregnancy Procedure Delivery CPT | http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT |
depends-on | Value set Procedures During Pregnancy Valueset Group | Procedures During Pregnancy |
depends-on | Value set Pregnancy | Pregnancy |
depends-on | Value set Complications of Pregnancy, Childbirth and the Puerperium (ICD 9) | Complications of Pregnancy, Childbirth and the Puerperium |
depends-on | Value set Complications of Pregnancy, Childbirth and the Puerperium | Complications of Pregnancy, Childbirth and the Puerperium |
depends-on | Value set Delivery Diagnosis | Delivery - Diagnosis |
depends-on | Value set Non Live Birth CPT Procedures | Non Live Birth CPT Procedures |
depends-on | Value set Non Live Birth Diagnoses | Non Live Birth Diagnoses |
depends-on | Code system SNOMEDCT | SNOMED CT (all versions) |
depends-on | Code system LOINC | Logical Observation Identifiers, Names and Codes (LOINC) |
depends-on | FHIR model information | http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1 |
depends-on | Library FHIRHelpers | http://fhir.org/guides/cqf/Library/FHIRHelpers|4.0.1 |
depends-on | Library Global | http://fhir.org/guides/cqf/Library/MATGlobalCommonFunctionsFHIR4|6.1.000 |
Measurement Period | in | 0 | 1 | Period |
Patient | out | 0 | 1 | Patient |
Delivery Procedure Group | out | 0 | * | Procedure |
Pregnancy Group | out | 0 | * | Condition |
Non-Live Birth Group | out | 0 | * | Condition |
Pregnancy Test Confirms Pregnant | out | 0 | * | Observation |
Delivery Diagnosis Group | out | 0 | * | Condition |
Procedures During Pregnancy Group | out | 0 | * | Procedure |
History of Pregnancy | out | 0 | * | Resource |
Patient Deceased within a Year of Pregnancy | out | 0 | 1 | boolean |
Initial Population | out | 0 | 1 | boolean |
SDE Allergy Intolerance | out | 0 | * | AllergyIntolerance |
SDE BMI | out | 0 | * | Observation |
SDE Blood Pressure | out | 0 | * | Observation |
SDE Height | out | 0 | * | Observation |
SDE Body Temperature | out | 0 | * | Observation |
SDE Body Weight | out | 0 | * | Observation |
SDE Care Plan | out | 0 | * | CarePlan |
SDE Care Team | out | 0 | * | CareTeam |
SDE Conditions | out | 0 | * | Condition |
SDE Compositions | out | 0 | * | Composition |
SDE Insurance | out | 0 | * | Coverage |
SDE Diagnostic Report | out | 0 | * | DiagnosticReport |
SDE Document Reference | out | 0 | * | DocumentReference |
SDE Device | out | 0 | * | Device |
SDE Encounters | out | 0 | * | Encounter |
SDE FamilyMemberHistory | out | 0 | * | FamilyMemberHistory |
SDE Goal | out | 0 | * | Goal |
SDE Head Circumference | out | 0 | * | Observation |
SDE Heart Rate | out | 0 | * | Observation |
SDE Immunization | out | 0 | * | Immunization |
SDE Lab Observation | out | 0 | * | Observation |
SDE Location | out | 0 | * | Location |
SDE Medication | out | 0 | * | Medication |
SDE Medication Request | out | 0 | * | MedicationRequest |
SDE Organization | out | 0 | * | Organization |
SDE Patient | out | 0 | * | Patient |
SDE Pediatric BMI | out | 0 | * | Observation |
SDE Occipital Frontal Head Circumference | out | 0 | * | Observation |
SDE Pediatric Weight for Height | out | 0 | * | Observation |
SDE Practitioner | out | 0 | * | Practitioner |
SDE Practitioner Role | out | 0 | * | PractitionerRole |
SDE Procedure | out | 0 | * | Procedure |
SDE Provenance | out | 0 | * | Provenance |
SDE Oximetry | out | 0 | * | Observation |
SDE Related Person | out | 0 | * | RelatedPerson |
SDE Respiratory Rate | out | 0 | * | Observation |
SDE Smoking Status | out | 0 | * | Observation |
SDE Vital Signs | out | 0 | * | Observation |
Type: Patient (Patient) |
Type: Procedure (Procedure) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1015 |
Type: Procedure (Procedure) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1078.5 |
Type: Procedure (Procedure) | |
Filter | Value |
code | In ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT |
Type: Procedure (Procedure) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1009 |
Type: Procedure (Procedure) |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1012 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.11.1021 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.127 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.137 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.278 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1015 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1078.5 |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT |
Type: Condition (Condition) |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 82810-3: Pregnancy Status |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 11449-6: Pregnancy status - Reported |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 39156-5: Body mass index (BMI) [Ratio] |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 85354-9: Blood pressure panel with all children optional |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8302-2: Body height |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8310-5: Body temperature |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 29463-7: Body weight |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 9843-4: Head Occipital-frontal circumference |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8867-4: Heart rate |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Observation Category Codes laboratory: Laboratory |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 59576-9: Body mass index (BMI) [Percentile] Per age and sex |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8289-1: Head Occipital-frontal circumference Percentile |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 77606-2: Weight-for-length Per age and sex |
Type: Observation (Observation) | |
Filter | Value |
code | One of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 9279-1: Respiratory rate |
Type: Observation (Observation) |
Type: AllergyIntolerance (AllergyIntolerance) |
Type: CarePlan (CarePlan) |
Type: CareTeam (CareTeam) |
Type: Composition (Composition) |
Type: Coverage (Coverage) |
Type: DiagnosticReport (DiagnosticReport) |
Type: DocumentReference (DocumentReference) |
Type: Device (Device) |
Type: Encounter (Encounter) |
Type: FamilyMemberHistory (FamilyMemberHistory) |
Type: Goal (Goal) |
Type: Immunization (Immunization) |
Type: Location (Location) |
Type: Medication (Medication) |
Type: MedicationRequest (MedicationRequest) |
Type: Organization (Organization) |
Type: Practitioner (Practitioner) |
Type: PractitionerRole (PractitionerRole) |
Type: Provenance (Provenance) |
Type: RelatedPerson (RelatedPerson) |
text/cql
library PAMDeaths version '0.0.01'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include MATGlobalCommonFunctionsFHIR4 version '6.1.000' called Global
codesystem "SNOMEDCT": 'http://snomed.info/sct'
codesystem "LOINC": 'http://loinc.org'
codesystem "Observation Category": 'http://terminology.hl7.org/CodeSystem/observation-category'
//Delivery Procedure Group
valueset "Delivery Live Births": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1015'
valueset "Delivery Procedure": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1078.5'
valueset "Pregnancy Procedure Delivery CPT": 'http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT'
//Procedures During Pregnancy Group
valueset "Procedures During Pregnancy Valueset Group": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1009'
//Pregnancy Group
valueset "Pregnancy": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378'
valueset "Complications of Pregnancy, Childbirth and the Puerperium (ICD 9)": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.11.1021'
valueset "Complications of Pregnancy, Childbirth and the Puerperium": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1012'
//Pregnancy Delivery Diagnosis
valueset "Delivery Diagnosis": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.278'
//Non-Live Birth (Fetal Death/Abortion)
valueset "Non Live Birth CPT Procedures": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.127'
valueset "Non Live Birth Diagnoses": 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.137'
code "Pregnant (finding)": '77386006' from "SNOMEDCT" display 'Pregnant (finding)'
code "Pregnancy Status": '82810-3' from "LOINC" display 'Pregnancy Status'
code "Pregnancy Status Reported": '11449-6' from "LOINC" display 'Pregnancy status - Reported'
//Supplemental Data Element Codes
code "BMI": '39156-5' from "LOINC"
code "Blood Pressure": '85354-9' from "LOINC"
code "Height": '8302-2' from "LOINC"
code "Body Temperature": '8310-5' from "LOINC"
code "Weight": '29463-7' from "LOINC"
code "Head Circumference": '9843-4' from "LOINC"
code "Heart Rate": '8867-4' from "LOINC"
code "Laboratory": 'laboratory' from "Observation Category"
code "Pediatric BMI": '59576-9' from "LOINC"
code "Frontal Head Circumference": '8289-1' from "LOINC"
code "Pediatric Weight": '77606-2' from "LOINC"
code "Pulse Oximetry": '2708-6' from "LOINC"
code "Oxygen Saturation": '59408-5' from "LOINC"
code "Respiratory Rate": '9279-1' from "LOINC"
code "Social History": 'social-history' from "Observation Category"
code "Vital Signs": 'vital-signs' from "Observation Category"
parameter "Measurement Period" Interval<DateTime>
context Patient
define "Initial Population":
"Patient Deceased within a Year of Pregnancy"
define "History of Pregnancy":
"Delivery Procedure Group"
union "Pregnancy Group"
union "Non-Live Birth Group"
union "Pregnancy Test Confirms Pregnant"
union "Delivery Diagnosis Group"
union "Procedures During Pregnancy Group"
define "Patient Deceased within a Year of Pregnancy":
exists("History of Pregnancy" Pregnancy)
and (exists ("Pregnancy Group" PregnancyDx
where Patient.deceased as FHIR.dateTime occurs 645 days or less after start of Global."Normalize Interval"(PregnancyDx.onset))
or exists(("Delivery Diagnosis Group"
union "Non-Live Birth Group" ) DeliveryCondition
where Patient.deceased as FHIR.dateTime occurs 365 days or less after end of Global."Normalize Interval"(DeliveryCondition.onset))
or exists("Pregnancy Test Confirms Pregnant" PregnancyConfirmedTest
where Patient.deceased as FHIR.dateTime occurs 645 days or less on or after start of Global."Normalize Interval"(PregnancyConfirmedTest.effective))
or exists(("Delivery Procedure Group"
union "Procedures During Pregnancy Group") DeliveryProcedure
where (Patient.deceased) as FHIR.dateTime occurs 365 days or less after end of Global."Normalize Interval"(DeliveryProcedure.performed))
)
define "Delivery Procedure Group":
[Procedure: "Delivery Live Births"]
union [Procedure: "Delivery Procedure"]
union [Procedure: "Pregnancy Procedure Delivery CPT"]
define "Procedures During Pregnancy Group":
[Procedure: "Procedures During Pregnancy Valueset Group"]
define "Pregnancy Group":
[Condition: "Pregnancy"]
union [Condition: "Complications of Pregnancy, Childbirth and the Puerperium"]
union [Condition: "Complications of Pregnancy, Childbirth and the Puerperium (ICD 9)"]
define "Delivery Diagnosis Group":
[Condition: "Delivery Diagnosis"]
union [Condition: "Delivery Live Births"]
union [Condition: "Delivery Procedure"]
union [Condition: "Pregnancy Procedure Delivery CPT"]
define "Non-Live Birth Group":
[Condition: "Non Live Birth CPT Procedures"]
union [Condition: "Non Live Birth Diagnoses"]
define "Pregnancy Test Confirms Pregnant":
([Observation: "Pregnancy Status"]
union [Observation: "Pregnancy Status Reported"]) PregnancyConfirmedTest
where PregnancyConfirmedTest.value ~ "Pregnant (finding)"
//Supplemental Data Elements
define "SDE Allergy Intolerance":
[AllergyIntolerance] Allergy
define "SDE BMI":
[Observation: code ~ "BMI"] BMI
define "SDE Blood Pressure":
[Observation: code ~ "Blood Pressure"] BP
define "SDE Height":
[Observation: code ~ "Height"] Height
define "SDE Body Temperature":
[Observation: code ~ "Body Temperature"] BodyTemperature
define "SDE Body Weight":
[Observation: code ~ "Weight"] Weight
define "SDE Care Plan":
[CarePlan] CarePlans
define "SDE Care Team":
[CareTeam] CareTeams
define "SDE Conditions":
[Condition] Conditions
define "SDE Compositions":
[Composition] Compositions
define "SDE Insurance":
[Coverage] Coverages
define "SDE Diagnostic Report":
[DiagnosticReport] DiagnosticReports
define "SDE Document Reference":
[DocumentReference] DocumentReference
define "SDE Device":
[Device] Devices
define "SDE Encounters":
[Encounter] Encounters
define "SDE FamilyMemberHistory":
[FamilyMemberHistory] FamilyMemberHistory
define "SDE Goal":
[Goal] Goals
define "SDE Head Circumference":
[Observation: code ~ "Head Circumference"] HeadCircumference
define "SDE Heart Rate":
[Observation: code ~ "Heart Rate"] HeartRate
define "SDE Immunization":
[Immunization] Immunizations
define "SDE Lab Observation":
[Observation: code ~ "Laboratory"] LabObservations
define "SDE Location":
[Location] Locations
define "SDE Medication":
[Medication] Medications
define "SDE Medication Request":
[MedicationRequest] MedicationRequests
define "SDE Organization":
[Organization] Organizations
define "SDE Patient":
[Patient] Patients
define "SDE Pediatric BMI":
[Observation: code ~ "Pediatric BMI"] PediatricBMI
define "SDE Occipital Frontal Head Circumference":
[Observation: code ~ "Frontal Head Circumference"] FrontalHead
define "SDE Pediatric Weight for Height":
[Observation: code ~ "Pediatric Weight"] PediatricWeight
define "SDE Practitioner":
[Practitioner] Practitioners
define "SDE Practitioner Role":
[PractitionerRole] PractitionerRoles
define "SDE Procedure":
[Procedure] Procedures
define "SDE Provenance":
[Provenance] Provenances
define "SDE Oximetry":
[Observation] Oximetry
where (Oximetry.code ~ "Pulse Oximetry"
or Oximetry.code ~ "Oxygen Saturation")
define "SDE Related Person":
[RelatedPerson] RelatedPersons
define "SDE Respiratory Rate":
[Observation: code ~ "Respiratory Rate"] RespiratoryRate
define "SDE Smoking Status":
[Observation] SmokingStatus
with SmokingStatus.category category
such that category ~ "Social History"
define "SDE Vital Signs":
[Observation] VitalSigns
with VitalSigns.category category
such that category ~ "Vital Signs"
Content not shown - (
application/elm+xml
, size = 132Kb)