Longitudinal Maternal & Infant Health Information for Research
1.0.0 - STU 1.0.0 United States of America flag

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 in its permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

Library: Library for Pregnancy Associated Maternal Deaths

Official URL: http://fhir.org/guides/cqf/Library/PAMDeaths Version: 1.0.0
Draft as of 2023-03-29 Computable Name: PAMDeaths

Related Artifacts

depends-onCode system Observation CategoryObservation Category Codes
depends-onValue set Delivery Live BirthsDelivery Live Births
depends-onValue set Delivery ProcedureDelivery - Procedure
depends-onValue set Pregnancy Procedure Delivery CPThttp://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT
depends-onValue set Procedures During Pregnancy Valueset GroupProcedures During Pregnancy
depends-onValue set PregnancyPregnancy
depends-onValue set Complications of Pregnancy, Childbirth and the Puerperium (ICD 9)Complications of Pregnancy, Childbirth and the Puerperium
depends-onValue set Complications of Pregnancy, Childbirth and the PuerperiumComplications of Pregnancy, Childbirth and the Puerperium
depends-onValue set Delivery DiagnosisDelivery - Diagnosis
depends-onValue set Non Live Birth CPT ProceduresNon Live Birth CPT Procedures
depends-onValue set Non Live Birth DiagnosesNon Live Birth Diagnoses
depends-onCode system SNOMEDCTSNOMED CT (all versions)
depends-onCode system LOINCLogical Observation Identifiers, Names and Codes (LOINC)
depends-onFHIR model informationhttp://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
depends-onLibrary FHIRHelpershttp://fhir.org/guides/cqf/Library/FHIRHelpers|4.0.1
depends-onLibrary Globalhttp://fhir.org/guides/cqf/Library/MATGlobalCommonFunctionsFHIR4|6.1.000

Parameters

Measurement Periodin01Period
Patientout01Patient
Delivery Procedure Groupout0*Procedure
Pregnancy Groupout0*Condition
Non-Live Birth Groupout0*Condition
Pregnancy Test Confirms Pregnantout0*Observation
Delivery Diagnosis Groupout0*Condition
Procedures During Pregnancy Groupout0*Procedure
History of Pregnancyout0*Resource
Patient Deceased within a Year of Pregnancyout01boolean
Initial Populationout01boolean
SDE Allergy Intoleranceout0*AllergyIntolerance
SDE BMIout0*Observation
SDE Blood Pressureout0*Observation
SDE Heightout0*Observation
SDE Body Temperatureout0*Observation
SDE Body Weightout0*Observation
SDE Care Planout0*CarePlan
SDE Care Teamout0*CareTeam
SDE Conditionsout0*Condition
SDE Compositionsout0*Composition
SDE Insuranceout0*Coverage
SDE Diagnostic Reportout0*DiagnosticReport
SDE Document Referenceout0*DocumentReference
SDE Deviceout0*Device
SDE Encountersout0*Encounter
SDE FamilyMemberHistoryout0*FamilyMemberHistory
SDE Goalout0*Goal
SDE Head Circumferenceout0*Observation
SDE Heart Rateout0*Observation
SDE Immunizationout0*Immunization
SDE Lab Observationout0*Observation
SDE Locationout0*Location
SDE Medicationout0*Medication
SDE Medication Requestout0*MedicationRequest
SDE Organizationout0*Organization
SDE Patientout0*Patient
SDE Pediatric BMIout0*Observation
SDE Occipital Frontal Head Circumferenceout0*Observation
SDE Pediatric Weight for Heightout0*Observation
SDE Practitionerout0*Practitioner
SDE Practitioner Roleout0*PractitionerRole
SDE Procedureout0*Procedure
SDE Provenanceout0*Provenance
SDE Oximetryout0*Observation
SDE Related Personout0*RelatedPerson
SDE Respiratory Rateout0*Observation
SDE Smoking Statusout0*Observation
SDE Vital Signsout0*Observation

Data Requirements

Type: Patient (Patient)
Type: Procedure (Procedure)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1015
Type: Procedure (Procedure)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1078.5
Type: Procedure (Procedure)
FilterValue
codeIn ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT
Type: Procedure (Procedure)
FilterValue
codeIn 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)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.526.3.378
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1012
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.11.1021
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.127
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1166.137
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.67.1.101.1.278
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.111.12.1015
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1078.5
Type: Condition (Condition)
FilterValue
codeIn ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT
Type: Condition (Condition)
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 82810-3: Pregnancy Status
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 11449-6: Pregnancy status - Reported
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 39156-5: Body mass index (BMI) [Ratio]
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 85354-9: Blood pressure panel with all children optional
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8302-2: Body height
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8310-5: Body temperature
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 29463-7: Body weight
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 9843-4: Head Occipital-frontal circumference
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8867-4: Heart rate
Type: Observation (Observation)
FilterValue
codeOne of these codes: Observation Category Codes laboratory: Laboratory
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 59576-9: Body mass index (BMI) [Percentile] Per age and sex
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 8289-1: Head Occipital-frontal circumference Percentile
Type: Observation (Observation)
FilterValue
codeOne of these codes: Logical Observation Identifiers, Names and Codes (LOINC) 77606-2: Weight-for-length Per age and sex
Type: Observation (Observation)
FilterValue
codeOne 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)

Contents

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)