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/PIHCohort | Version: 1.0.0 | |||
Draft as of 2023-03-29 | Computable Name: PIHCohort |
depends-on | Value set Delivery Diagnosis | Delivery - Diagnosis |
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 Non Live Birth CPT Procedures | Non Live Birth CPT Procedures |
depends-on | Value set Non Live Birth Diagnoses | Non Live Birth Diagnoses |
depends-on | Value set Hypertensive Disorders Pregnancy ICD | http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-ICD |
depends-on | Value set Hypertensive Disorders Pregnancy SNOMED | http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-SNOMED |
depends-on | Value set Pregnancy Procedure Delivery CPT | http://www.hl7.org/fhir/us/mihr/ValueSet/PregnancyProcedureDelivery-CPT |
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 |
PIH Conditions | out | 0 | * | Condition |
Delivery Procedure Group | out | 0 | * | Procedure |
Delivery Diagnosis Group | out | 0 | * | Condition |
Non-Live Birth Group | out | 0 | * | Condition |
Pregnancy Ending in Delivery | out | 0 | * | Resource |
Six Weeks Postpartum Induced Hypertension | out | 0 | * | Condition |
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: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-ICD |
Type: Condition (Condition) | |
Filter | Value |
code | In ValueSet http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-SNOMED |
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) | |
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 | One of these codes: SNOMED CT (all versions) 40521000119100: Postpartum pregnancy-induced hypertension (disorder) |
Type: Condition (Condition) |
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) |
Type: AllergyIntolerance (AllergyIntolerance) |
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: 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 PIHCohort 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'
valueset "Hypertensive Disorders Pregnancy ICD": 'http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-ICD'
valueset "Hypertensive Disorders Pregnancy SNOMED": 'http://www.hl7.org/fhir/us/mihr/ValueSet/hypertensive-disorders-pregnancy-SNOMED'
//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'
//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 "Postpartum pregnancy-induced hypertension (disorder)": '40521000119100' from "SNOMEDCT"
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> //default Interval[@2022-02-01T00:00:00.0, @2022-02-28T00:00:00.0)
context Patient
define "PIH Conditions":
[Condition: "Hypertensive Disorders Pregnancy ICD"]
union [Condition: "Hypertensive Disorders Pregnancy SNOMED"]
define "Initial Population":
exists("PIH Conditions"
union "Six Weeks Postpartum Induced Hypertension")
define "Pregnancy Ending in Delivery":
("Delivery Procedure Group"
union "Delivery Diagnosis Group"
union "Non-Live Birth Group") Delivery
where Coalesce(start of Global."Normalize Interval"(Delivery.performed), Delivery.abatement)
before end of "Measurement Period"
define "Six Weeks Postpartum Induced Hypertension":
[Condition: "Postpartum pregnancy-induced hypertension (disorder)"] PostpartumHTN
with "Pregnancy Ending in Delivery" Delivery
such that start of Global."Normalize Interval"(PostpartumHTN.onset) 6 weeks or less after
Coalesce(start of Global."Normalize Interval"(Delivery.performed), Delivery.abatement)
define "Delivery Procedure Group":
[Procedure: "Delivery Live Births"]
union [Procedure: "Delivery Procedure"]
union [Procedure: "Pregnancy Procedure Delivery CPT"]
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"]
//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 = 98Kb)