Id: |
OpioidCDSREC11PatientView |
Url: |
Library - Recommendation #11 Patient View - Concurrent Use of Opioids and Benzodiazepines |
Version: |
2022.1.0 |
Name: |
OpioidCDSREC11PatientView |
Title: |
Library - Recommendation #11 Patient View - Concurrent Use of Opioids and Benzodiazepines |
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 |
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 | string | 0 | 1 | Out |
Concurrent Benzodiazepine Prescription Issue | DetectedIssue | 0 | 1 | Out |
|
Content: text/cql |
library OpioidCDSREC11PatientView 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
include OpioidCDSRoutines version '2022.1.0' called Routines
context Patient
define "Inclusion Criteria":
(
exists (Common."Active Ambulatory Benzodiazepine Rx")
and exists (Common."Active Ambulatory Opioid Rx")
)
and not Common."Patient Age Less Than 18"
and Routines."Is Opioid Review Useful?"
define "Exclusion Criteria":
Common."End of Life Assessment"
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 'Patient has active prescriptions for opioid pain medication and benzodiazepines'
else null
define "Get Detail":
if "Is Recommendation Applicable?"
then 'Avoid prescribing opioid pain medication and benzodiazepines concurrently whenever possible'
else null
define "Concurrent Benzodiazepine Prescription Issue":
DetectedIssue {
status: FHIR.DetectedIssueStatus { value: 'preliminary' },
code: FHIR.CodeableConcept { text: FHIR.string { value: "Get Summary" } },
severity: FHIR.DetectedIssueSeverity { value: 'moderate' },
patient: FHIR.Reference { reference: FHIR.string { value: 'Patient/' + Patient.id } },
identified: FHIR.dateTime { value: Now() },
implicated:
(Common."Active Ambulatory Benzodiazepine Rx" union Common."Active Ambulatory Opioid Rx") M
return FHIR.Reference { reference: FHIR.string { value: 'MedicationRequest/' + M.id } },
detail: FHIR.string { value: "Get Detail" },
reference: FHIR.uri { value: 'http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/opioidcds-11-patient-view'}
}
|
|
Content: application/elm+xml |
Encoded data (38284 characters)
|
|
Content: application/elm+json |
Encoded data (67056 characters)
|
|