Library Name |
Name |
SupplementalDataElements |
SDE Sex |
|
define "SDE Sex":
case
when Patient.gender = 'male' then "M"
when Patient.gender = 'female' then "F"
else null
end
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
SDE Sex |
|
define "SDE Sex":
SDE."SDE Sex"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Qualifying Encounter During Measurement Period |
|
define "Qualifying Encounter During Measurement Period":
( [Encounter: "Office Visit"]
union [Encounter: "Outpatient Consultation"]
union [Encounter: "Nursing Facility Visit"]
union [Encounter: "Care Services in Long Term Residential Facility"]
union [Encounter: "Home Healthcare Services"]
union [Encounter: "Patient Provider Interaction"] ) ValidEncounter
where ValidEncounter.period during day of "Measurement Period"
and ValidEncounter.status = 'finished'
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Outpatient Encounter During Measurement Period |
|
define "Outpatient Encounter During Measurement Period":
( [Encounter: "Office Visit"]
union [Encounter: "Outpatient Consultation"]
union [Encounter: "Care Services in Long Term Residential Facility"]
union [Encounter: "Home Healthcare Services"]
union [Encounter: "Nursing Facility Visit"] ) QualifyingEncounter
where QualifyingEncounter.period during day of "Measurement Period"
and QualifyingEncounter.status = 'finished'
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Coronary Artery Disease Encounter |
|
define "Coronary Artery Disease Encounter":
"Outpatient Encounter During Measurement Period" ValidQualifyingEncounter
with [Condition: "Coronary Artery Disease No MI"] CoronaryArteryDisease
such that CoronaryArteryDisease.overlapsDayOfEncounter ( ValidQualifyingEncounter )
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
History of Cardiac Surgery Prior to Encounter |
|
define "History of Cardiac Surgery Prior to Encounter":
"Outpatient Encounter During Measurement Period" ValidQualifyingEncounter
with [Procedure: "Cardiac Surgery"] CardiacSurgery
such that CardiacSurgery.performed.toInterval ( ) starts before end of ValidQualifyingEncounter.period
and CardiacSurgery.status = 'completed'
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Qualifying CAD Encounter |
|
define "Qualifying CAD Encounter":
"Coronary Artery Disease Encounter"
union "History of Cardiac Surgery Prior to Encounter"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Initial Population |
|
define "Initial Population":
AgeInYearsAt(date from start of "Measurement Period") >= 18
and exists ( "Qualifying Encounter During Measurement Period" Encounter1
with "Qualifying Encounter During Measurement Period" Encounter2
such that Encounter2.id !~ Encounter1.id
)
and exists "Qualifying CAD Encounter"
|
Library Name |
Name |
AHAOverall |
Moderate or Severe LVSD Findings |
|
/*
@description: Returns a union of the following:
* Observations where the final, amended or correction ejection fraction result is <= 40
* Moderate or Severe LVSD conditions where the diagnosis has been confirmed as active
*/
define "Moderate or Severe LVSD Findings":
( [Observation: "Ejection Fraction"] EjectionFraction
where EjectionFraction.value as Quantity <= 40 '%'
and EjectionFraction.status in {'final', 'amended', 'corrected'}
)
union (
( [Condition: "Moderate or Severe LVSD"]
union ( [Condition: "Left ventricular systolic dysfunction (disorder)"] LVSDDiagnosis
where LVSDDiagnosis.severity in "Moderate or Severe" )
) ModerateOrSevereLVSD
where ModerateOrSevereLVSD.isConfirmedActiveDiagnosis()
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Qualifying CAD Encounter and Prior MI |
|
define "Qualifying CAD Encounter and Prior MI":
"Qualifying CAD Encounter" EncounterWithCADProxy
with [Condition: "Myocardial Infarction"] MyocardialInfarction
such that MyocardialInfarction.prevalenceInterval ( ) starts 3 years or less before day of start of EncounterWithCADProxy.period
and not exists AHA."Moderate or Severe LVSD Findings"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Denominator 2 |
|
define "Denominator 2":
"Initial Population"
and exists "Qualifying CAD Encounter and Prior MI"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Qualifying CAD Encounter and History of Moderate or Severe LVSD":
"Qualifying CAD Encounter" EncounterWithCADProxy
with AHA."Moderate or Severe LVSD Findings" LVSDFindings
such that Coalesce(LVSDFindings.prevalenceInterval(), LVSDFindings.effective.toInterval()) starts before end of EncounterWithCADProxy.period
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Arrhythmia with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Arrhythmia with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Arrhythmia"] ArrhythmiaDiagnosis
where ArrhythmiaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Asthma with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Asthma with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Asthma"] AsthmaDiagnosis
where AsthmaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Bradycardia with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Bradycardia with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Bradycardia"] BradycardiaDiagnosis
where BradycardiaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Hypotension with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Hypotension with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Hypotension"] HypotensionDiagnosis
where HypotensionDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
/*
* @code: Heart rate - 8867-4
* @profile: http://hl7.org/fhir/StructureDefinition/heartrate
*/
define "Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( from
["observation-heartrate"] HeartRate,
"Qualifying CAD Encounter and History of Moderate or Severe LVSD" CADEncounterModerateOrSevereLVSD
let PriorHeartRate: Last(["observation-heartrate"] MostRecentPriorHeartRate
where MostRecentPriorHeartRate.effective.toInterval() during CADEncounterModerateOrSevereLVSD.period
and MostRecentPriorHeartRate.effective.toInterval() before HeartRate.effective.toInterval()
sort by start of effective.toInterval()
)
where HeartRate.effective.toInterval ( ) during CADEncounterModerateOrSevereLVSD.period
and HeartRate.value < 50 '/min'
and PriorHeartRate.value < 50 '/min'
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( ( [AllergyIntolerance: "Beta Blocker Therapy Ingredient"]
union [AllergyIntolerance: "Substance with beta adrenergic receptor antagonist mechanism of action (substance)"] ) BetaBlockerAllergyIntolerance
where BetaBlockerAllergyIntolerance.overlapsAfterDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( ( [Condition: "Allergy to Beta Blocker Therapy"]
union [Condition: "Intolerance to Beta Blocker Therapy"] ) BetaBlockerAllergyOrIntoleranceDiagnosis
where BetaBlockerAllergyOrIntoleranceDiagnosis.overlapsAfterDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Atrioventricular Block"] AtrioventricularBlock
where AtrioventricularBlock.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Condition: "Cardiac Pacer in Situ"] CardiacPacerDiagnosis
where CardiacPacerDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and History of Moderate or Severe LVSD |
|
define "Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and History of Moderate or Severe LVSD":
exists ( [Procedure: "Cardiac Pacer"] ImplantedCardiacPacer
with "Qualifying CAD Encounter and History of Moderate or Severe LVSD" CADEncounterModerateOrSevereLVSD
such that ImplantedCardiacPacer.performed.toInterval ( ) starts before end of CADEncounterModerateOrSevereLVSD.period
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD without Cardiac Pacer |
|
define "Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD without Cardiac Pacer":
"Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
and not "Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
and not "Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Denominator Exceptions 1 |
|
/*
@commentedOut: "Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD"
@commentedOutReason: Negation issue noted in https://github.com/cqframework/cql-execution/issues/296, which is tied to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1455
*/
define "Denominator Exceptions 1":
"Has Arrhythmia with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Asthma with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Bradycardia with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Hypotension with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
or "Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and History of Moderate or Severe LVSD"
//or "Has Medical or Patient Reason for Not Ordering Beta Blocker for LVSD"
or "Has Atrioventricular Block with Qualifying CAD Encounter and History of Moderate or Severe LVSD without Cardiac Pacer"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Beta Blocker Therapy for LVSD Ordered |
|
define "Has Beta Blocker Therapy for LVSD Ordered":
exists ( [MedicationRequest: medication in "Beta Blocker Therapy for LVSD"] BetaBlockerForLVSDOrdered
where BetaBlockerForLVSDOrdered.authoredDuringDayOfEncounter ( "Qualifying CAD Encounter and History of Moderate or Severe LVSD" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Is Currently Taking Beta Blocker Therapy for LVSD |
|
define "Is Currently Taking Beta Blocker Therapy for LVSD":
exists ( [MedicationRequest: medication in "Beta Blocker Therapy for LVSD"] ActiveBetaBlockerForLVSD
with "Qualifying CAD Encounter and History of Moderate or Severe LVSD" CADEncounterModerateOrSevereLVSD
such that First((collapse(ActiveBetaBlockerForLVSD.dosageInstruction.timing.repeat.bounds DoseTime
return DoseTime.toInterval()
)) DrugPeriod
sort by start of $this
) overlaps after day of CADEncounterModerateOrSevereLVSD.period
where ActiveBetaBlockerForLVSD.status in { 'active', 'completed' }
and ActiveBetaBlockerForLVSD.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Numerator 1 |
|
define "Numerator 1":
"Has Beta Blocker Therapy for LVSD Ordered"
or "Is Currently Taking Beta Blocker Therapy for LVSD"
|
Library Name |
Name |
SupplementalDataElements |
SDE Payer |
|
define "SDE Payer":
[Coverage: type in "Payer Type"] Payer
return {
code: Payer.type,
period: Payer.period
}
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
SDE Payer |
|
define "SDE Payer":
SDE."SDE Payer"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Beta Blocker Therapy Ordered |
|
define "Has Beta Blocker Therapy Ordered":
exists ( [MedicationRequest: medication in "Beta Blocker Therapy"] BetaBlockerOrdered
where BetaBlockerOrdered.authoredDuringDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Is Currently Taking Beta Blocker Therapy |
|
define "Is Currently Taking Beta Blocker Therapy":
exists ( [MedicationRequest: medication in "Beta Blocker Therapy"] ActiveBetaBlocker
with "Qualifying CAD Encounter and Prior MI" CADEncounterMI
such that First((collapse(ActiveBetaBlocker.dosageInstruction.timing.repeat.bounds DoseTime
return DoseTime.toInterval()
)) DrugPeriod
sort by start of $this
) overlaps after day of CADEncounterMI.period
where ActiveBetaBlocker.status in { 'active', 'completed' }
and ActiveBetaBlocker.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Numerator 2 |
|
define "Numerator 2":
"Has Beta Blocker Therapy Ordered"
or "Is Currently Taking Beta Blocker Therapy"
|
Library Name |
Name |
SupplementalDataElements |
SDE Ethnicity |
|
define "SDE Ethnicity":
Patient.ethnicity E
return Tuple {
codes: { E.ombCategory } union E.detailed,
display: E.text
}
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
SDE Ethnicity |
|
define "SDE Ethnicity":
SDE."SDE Ethnicity"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Arrhythmia with Qualifying CAD Encounter and Prior MI |
|
define "Has Arrhythmia with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Arrhythmia"] ArrhythmiaDiagnosis
where ArrhythmiaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Asthma with Qualifying CAD Encounter and Prior MI |
|
define "Has Asthma with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Asthma"] AsthmaDiagnosis
where AsthmaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Bradycardia with Qualifying CAD Encounter and Prior MI |
|
define "Has Bradycardia with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Bradycardia"] BradycardiaDiagnosis
where BradycardiaDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Hypotension with Qualifying CAD Encounter and Prior MI |
|
define "Has Hypotension with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Hypotension"] HypotensionDiagnosis
where HypotensionDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and Prior MI |
|
/*
* @code: Heart rate - 8867-4
* @profile: http://hl7.org/fhir/StructureDefinition/heartrate
*/
define "Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and Prior MI":
exists ( from
["observation-heartrate"] HeartRate,
"Qualifying CAD Encounter and Prior MI" CADEncounterMI
let PriorHeartRate: Last(["observation-heartrate"] MostRecentPriorHeartRate
where MostRecentPriorHeartRate.effective.toInterval() during CADEncounterMI.period
and MostRecentPriorHeartRate.status in { 'final', 'amended', 'corrected' }
and MostRecentPriorHeartRate.effective.toInterval() before HeartRate.effective.toInterval()
sort by start of effective.toInterval()
)
where HeartRate.effective.toInterval ( ) during CADEncounterMI.period
and HeartRate.status in { 'final', 'amended', 'corrected' }
and HeartRate.value < 50 '/min'
and PriorHeartRate.value < 50 '/min'
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and Prior MI |
|
define "Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and Prior MI":
exists ( ( [AllergyIntolerance: "Beta Blocker Therapy Ingredient"]
union [AllergyIntolerance: "Substance with beta adrenergic receptor antagonist mechanism of action (substance)"] ) BetaBlockerAllergyIntolerance
where BetaBlockerAllergyIntolerance.overlapsAfterDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and Prior MI |
|
define "Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and Prior MI":
exists ( ( [Condition: "Allergy to Beta Blocker Therapy"]
union [Condition: "Intolerance to Beta Blocker Therapy"] ) BetaBlockerAllergyOrIntoleranceDiagnosis
where BetaBlockerAllergyOrIntoleranceDiagnosis.overlapsAfterDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI |
|
define "Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Atrioventricular Block"] AtrioventricularBlock
where AtrioventricularBlock.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and Prior MI |
|
define "Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and Prior MI":
exists ( [Condition: "Cardiac Pacer in Situ"] CardiacPacerDiagnosis
where CardiacPacerDiagnosis.overlapsDayOfEncounter ( "Qualifying CAD Encounter and Prior MI" )
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and Prior MI |
|
define "Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and Prior MI":
exists ( [Procedure: "Cardiac Pacer"] ImplantedCardiacPacer
with "Qualifying CAD Encounter and Prior MI" CADEncounterMI
such that ImplantedCardiacPacer.performed.toInterval ( ) starts before end of CADEncounterMI.period
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI without Cardiac Pacer |
|
define "Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI without Cardiac Pacer":
"Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI"
and not "Has Diagnosis of Cardiac Pacer in Situ with Qualifying CAD Encounter and Prior MI"
and not "Has Cardiac Pacer Device Implanted with Qualifying CAD Encounter and Prior MI"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Denominator Exceptions 2 |
|
/*
@commentedOut: "Has Medical or Patient Reason for Not Ordering Beta Blocker Therapy"
@commentedOutReason: Negation issue noted in https://github.com/cqframework/cql-execution/issues/296, which is tied to https://oncprojectracking.healthit.gov/support/browse/BONNIEMAT-1455
*/
define "Denominator Exceptions 2":
"Has Arrhythmia with Qualifying CAD Encounter and Prior MI"
or "Has Asthma with Qualifying CAD Encounter and Prior MI"
or "Has Bradycardia with Qualifying CAD Encounter and Prior MI"
or "Has Hypotension with Qualifying CAD Encounter and Prior MI"
or "Has Consecutive Heart Rates Less than 50 with Qualifying CAD Encounter and Prior MI"
or "Has Allergy or Intolerance to Beta Blocker Therapy Ingredient with Qualifying CAD Encounter and Prior MI"
or "Has Diagnosis of Allergy or Intolerance to Beta Blocker Therapy with Qualifying CAD Encounter and Prior MI"
//or "Has Medical or Patient Reason for Not Ordering Beta Blocker Therapy"
or "Has Atrioventricular Block with Qualifying CAD Encounter and Prior MI without Cardiac Pacer"
|
Library Name |
Name |
SupplementalDataElements |
SDE Race |
|
define "SDE Race":
Patient.race R
return Tuple {
codes: R.ombCategory union R.detailed,
display: R.text
}
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
SDE Race |
|
define "SDE Race":
SDE."SDE Race"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
Denominator 1 |
|
define "Denominator 1":
"Initial Population"
and exists "Qualifying CAD Encounter and History of Moderate or Severe LVSD"
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
overlapsDayOfEncounter |
|
define fluent function overlapsDayOfEncounter(Diagnosis Condition, TheEncounter Encounter):
TheEncounter Visit
where Diagnosis.isConfirmedActiveDiagnosis ( )
return Diagnosis.prevalenceInterval ( ) overlaps day of Visit.period
|
Library Name |
Name |
AHAOverall |
isConfirmedActiveDiagnosis |
|
/*
@description: Returns true if the given Condition is confirmed as active
*/
define fluent function isConfirmedActiveDiagnosis(condition Condition):
condition.isActive()
and condition.verificationStatus ~ QICoreCommon."confirmed"
|
Library Name |
Name |
QICoreCommon |
isActive |
|
/* Candidates for FHIRCommon */
/*
@description: Returns true if the given condition has a clinical status of active, recurrence, or relapse
*/
define fluent function isActive(condition Condition):
condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse"
|
Library Name |
Name |
QICoreCommon |
prevalenceInterval |
|
/*
@description: Returns an interval representing the normalized prevalence period of a given Condition.
@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting
interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
*/
define fluent function prevalenceInterval(condition Condition):
if condition.clinicalStatus ~ "active"
or condition.clinicalStatus ~ "recurrence"
or condition.clinicalStatus ~ "relapse" then
Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
else
(end of condition.abatementInterval()) abatementDate
return if abatementDate is null then
Interval[start of condition.onset.toInterval(), abatementDate)
else
Interval[start of condition.onset.toInterval(), abatementDate]
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
overlapsAfterDayOfEncounter |
|
define fluent function overlapsAfterDayOfEncounter(Event Choice<AllergyIntolerance, Condition>, EncounterList List<Encounter>):
AnyTrue(EncounterList Visit
return case
when Event is AllergyIntolerance then Interval[start of Event.onset.toInterval(), Event.lastOccurrence]overlaps after day of Visit.period
and(Event.clinicalStatus is null
or Event.clinicalStatus ~ QICoreCommon."allergy-active"
)
when Event is Condition then Event.isConfirmedActiveDiagnosis()
and Event.prevalenceInterval() overlaps after day of Visit.period
and Event.verificationStatus ~ QICoreCommon."confirmed"
else false
end
)
|
Library Name |
Name |
CADBetaBlockerTherapyPriorMIorLVSDFHIR |
authoredDuringDayOfEncounter |
|
define fluent function authoredDuringDayOfEncounter(Order Choice<MedicationRequest, MedicationNotRequested>, EncounterList List<Encounter>):
AnyTrue(EncounterList Visit
return case
when Order is MedicationRequest then Order.authoredOn during day of Visit.period
and Order.status in { 'active', 'completed' }
and Order.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
and Order.doNotPerform is not true
when Order is MedicationNotRequested then Order.authoredOn during day of Visit.period
and Order.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' }
else false
end
)
|
Library Name |
Name |
FHIRHelpers |
ToString |
|
define function ToString(value uri): value.value
|
Library Name |
Name |
FHIRHelpers |
ToCode |
|
/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
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
}
|