Id: |
OpioidCDSREC12PatientView |
Url: |
Library - Recommendation #12 (patient-view) - Evidence-based Treatment for Patients with Opioid Use Disorder |
Version: |
2022.1.0 |
Name: |
OpioidCDSREC12PatientView |
Title: |
Library - Recommendation #12 (patient-view) - Evidence-based Treatment for Patients with Opioid Use Disorder |
Status: |
active |
Experimental: |
true |
Type: |
system: http://terminology.hl7.org/CodeSystem/library-type
code: logic-library
|
Date: |
2025-01-10 16:49:36+0000 |
Publisher: |
Centers for Disease Control and Prevention (CDC) |
Related Artifacts: |
Dependencies
|
Parameters: |
Name | Type | Min | Max | In/Out |
Patient | Patient | 0 | 1 | Out |
Opioid Use Disorder Lookback Period | Period | 0 | 1 | Out |
Not Receiving Evidence-Based Treatment for Opioid Use Disorder | boolean | 0 | 1 | Out |
Presence of Diagnosis of Opioid Use Disorder | boolean | 0 | 1 | Out |
Positive Result from Opioid Use Disorder Evaluation Tool | boolean | 0 | 1 | Out |
Inclusion Criteria | boolean | 0 | 1 | Out |
Exclusion Criteria | boolean | 0 | 1 | Out |
Is Recommendation Applicable? | boolean | 0 | 1 | Out |
Get Indicator | string | 0 | 1 | Out |
Get Summary | string | 0 | 1 | Out |
Get Detail | Resource | 0 | 1 | Out |
|
Content: text/cql |
library OpioidCDSREC12PatientView version '2022.1.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include OpioidCDSCommon version '2022.1.0' called Common
include OpioidCDSCommonConfig version '2022.1.0' called Config
context Patient
define "Opioid Use Disorder Lookback Period":
Interval[Today() - 90 days, Today()]
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
)
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"
)
define "Positive Result from Opioid Use Disorder Evaluation Tool":
true
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"
define "Exclusion Criteria":
false
define "Is Recommendation Applicable?":
"Inclusion Criteria"
and not "Exclusion Criteria"
define "Get Indicator":
if "Is Recommendation Applicable?"
then 'warning'
else null
define "Get Summary":
if "Is Recommendation Applicable?"
then 'Recommend opioid agonist or partial agonist treatment with methadone maintenance therapy or buprenorphine'
else null
define "Get Detail":
if "Is Recommendation Applicable?"
then null
else null
|
|
Content: application/elm+xml |
Encoded data (44596 characters)
|
|
Content: application/elm+json |
Encoded data (79948 characters)
|
|