Library Name | Name | sequence |
OpioidCDSCommonConfig |
Age Less than 18 Years Is Enabled |
0 |
// Opioid Review Useful
define "Age Less than 18 Years Is Enabled":
true
Library Name | Name | sequence |
OpioidCDSCommon |
Patient 18 or Older? |
1 |
define "Patient 18 or Older?":
Config."Age Less than 18 Years Is Enabled"
and AgeInYears() >= 18
Library Name | Name | sequence |
OpioidCDSCommonConfig |
Evidence Based Treatment Criteria For Opioid Use Disorder |
2 |
// Recommendation 12
define "Evidence Based Treatment Criteria For Opioid Use Disorder":
true
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Not Receiving Evidence-Based Treatment for Opioid Use Disorder |
3 |
define "Not Receiving Evidence-Based Treatment for Opioid Use Disorder":
Config."Evidence Based Treatment Criteria For Opioid Use Disorder"
and not (
if Config."Can the implementing EHR support queries for past medications by date range?" then
exists (
[MedicationRequest: Common."Buprenorphine and methadone medications"] MR
where MR.status in { 'active', 'completed' }
and date from MR.authoredOn during day of "Opioid Use Disorder Lookback Period"
)
else
true
/* update 2022 removes "behavioral therapy condition"
or exists (
[Procedure: Common."Substance misuse behavioral counseling"] P
where P.status ~ 'completed'
and (
case
when P.performed is FHIR.dateTime then
Interval[FHIRHelpers.ToDateTime(P.performed as FHIR.dateTime), FHIRHelpers.ToDateTime(P.performed as FHIR.dateTime)]
when P.performed is FHIR.Period then
FHIRHelpers.ToInterval(P.performed as FHIR.Period)
else
null as Interval<DateTime>
end
) during day of "Opioid Use Disorder Lookback Period"
)*/
)
Library Name | Name | sequence |
OpioidCDSCommon |
US Core-Categorized Conditions |
4 |
// 3. Medications indicating end of life
/* or exists (
"Medications Indicating End of Life"
) */
define "US Core-Categorized Conditions":
[Condition: category in "Encounter Diagnosis Condition Category"]
union [Condition: category in "Problem List Condition Category"]
union [Condition: category in "US Core Health Concern Condition Category"]
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Opioid Use Disorder Lookback Period |
5 |
define "Opioid Use Disorder Lookback Period":
Interval[Today() - 90 days, Today()]
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Presence of Diagnosis of Opioid Use Disorder |
6 |
define "Presence of Diagnosis of Opioid Use Disorder":
exists (
Common."US Core-Categorized Conditions" C
where C.code in Common."Opioid misuse disorders"
and C.clinicalStatus in Common."Active Condition"
and date from C.recordedDate during day of "Opioid Use Disorder Lookback Period"
)
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Positive Result from Opioid Use Disorder Evaluation Tool |
7 |
define "Positive Result from Opioid Use Disorder Evaluation Tool":
true
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Inclusion Criteria |
8 |
define "Inclusion Criteria":
Common."Patient 18 or Older?"
and "Not Receiving Evidence-Based Treatment for Opioid Use Disorder"
and "Presence of Diagnosis of Opioid Use Disorder"
and "Positive Result from Opioid Use Disorder Evaluation Tool"
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Exclusion Criteria |
9 |
define "Exclusion Criteria":
false
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Is Recommendation Applicable? |
10 |
define "Is Recommendation Applicable?":
"Inclusion Criteria"
and not "Exclusion Criteria"
|