Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Get Summary |
0 |
define "Get Summary":
if "Is Recommendation Applicable?"
then 'Recommend opioid agonist or partial agonist treatment with methadone maintenance therapy or buprenorphine'/* and/or behavioral therapy' */
else null
Library Name | Name | sequence |
OpioidCDSCommonConfig |
Age Less than 18 Years Is Enabled |
1 |
// Opioid Review Useful
define "Age Less than 18 Years Is Enabled":
true
Library Name | Name | sequence |
OpioidCDSCommon |
Patient 18 or Older? |
2 |
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 |
3 |
// 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 |
4 |
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 |
5 |
// 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 |
6 |
define "Opioid Use Disorder Lookback Period":
Interval[Today() - 90 days, Today()]
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Presence of Diagnosis of Opioid Use Disorder |
7 |
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 |
8 |
define "Positive Result from Opioid Use Disorder Evaluation Tool":
true
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Inclusion Criteria |
9 |
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 |
10 |
define "Exclusion Criteria":
false
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Is Recommendation Applicable? |
11 |
define "Is Recommendation Applicable?":
"Inclusion Criteria"
and not "Exclusion Criteria"
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Get Detail |
12 |
define "Get Detail":
if "Is Recommendation Applicable?"
then null
else null
Library Name | Name | sequence |
OpioidCDSREC12PatientView |
Get Indicator |
13 |
define "Get Indicator":
if "Is Recommendation Applicable?"
then 'warning'
else null
|