OpioidCDSREC09
type: Library
node role: treeRoot
id:
  v: OpioidCDSREC09
text:
  status:
    v: generated
  div: Id: library-OpioidCDSREC09 Type: logic-library Version: 2022.1.0 Status: active Related: type: depends-on Resource: http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers type: depends-on Resource: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon type: depends-on Resource: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig type: depends-on Resource: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines Data Requirements: type: Procedure code filter: path: code valueset: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-review-procedure type: Observation code filter: path: code valueset: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-data-reviewed-finding Content: type: text/cql library OpioidCDSREC09 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 /* ** ** Recommendation #9 ** Clinicians should review the patient's history of controlled substance ** prescriptions using state prescription drug monitoring program (PDMP) data ** to determine whether the patient is receiving opioid dosages or dangerous ** combinations that put him or her at high risk for overdose. Clinicians ** should review PDMP data when starting opioid therapy for subacute or chronic pain ** and periodically during opioid therapy for chronic pain, ranging from ** every prescription to every 3 months ** (recommendation category: A, evidence type: 4). ** ** When ** Provider is prescribing an opioid analgesic with ambulatory misuse potential in the outpatient setting ** Prescription is for treating chronic pain. ** Opioid review is useful for this patient: ** Patient is 18 or over ** Patient does not have findings indicating limited life expectancy ** Patient does not have orders for therapies indicating end of life care ** …
contained: Parameters
  id:
    v: options
  parameter:
    name:
      v: translatorVersion
    value: string
      v: 3.22.0
  parameter:
    name:
      v: option
    value: string
      v: EnableAnnotations
  parameter:
    name:
      v: option
    value: string
      v: EnableLocators
  parameter:
    name:
      v: option
    value: string
      v: DisableListDemotion
  parameter:
    name:
      v: option
    value: string
      v: DisableListPromotion
  parameter:
    name:
      v: format
    value: string
      v: XML
  parameter:
    name:
      v: format
    value: string
      v: JSON
  parameter:
    name:
      v: analyzeDataRequirements
    value: boolean
      v: false
  parameter:
    name:
      v: collapseDataRequirements
    value: boolean
      v: true
  parameter:
    name:
      v: compatibilityLevel
    value: string
      v: 1.5
  parameter:
    name:
      v: enableCqlOnly
    value: boolean
      v: false
  parameter:
    name:
      v: errorLevel
    value: string
      v: Info
  parameter:
    name:
      v: signatureLevel
    value: string
      v: Overloads
  parameter:
    name:
      v: validateUnits
    value: boolean
      v: true
  parameter:
    name:
      v: verifyOnly
    value: boolean
      v: false
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
  value: Reference
    reference:
      v: #options
extension:
  url:
    v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem
  value: Reference
    link: http://fhir.org/guides/cdc/opioid-cds/Device/cqf-tooling
    reference:
      v: Device/cqf-tooling
url:
  v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC09
version:
  v: 2022.1.0
name:
  v: OpioidCDSREC09
title:
  v: Library - Recommendation #9 - Consider Patient's History of Controlled Substance Prescriptions
status:
  v: active
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
    code:
      v: logic-library
date:
  v: 2025-08-14T14:21:53+00:00
publisher:
  v: Centers for Disease Control and Prevention (CDC)
contact:
  telecom:
    system:
      v: url
    value:
      v: https://www.cdc.gov
related artifact:
  type:
    v: depends-on
  display:
    v: FHIR model information
  resource:
    v: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
    link: 4.0
    link: .1
related artifact:
  type:
    v: depends-on
  display:
    v: Library FHIRHelpers
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1
    link: 4.0
    link: .1
related artifact:
  type:
    v: depends-on
  display:
    v: Library Common
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0
    link: 2022.1
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Library Config
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|2022.1.0
    link: 2022.1
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Library Routines
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0
    link: 2022.1
    link: .0
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Opioid analgesics with ambulatory misuse potential
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/opioid-analgesics-with-ambulatory-misuse-potential
    link: http://fhir.org/guides/cdc/opioid-cds/ValueSet/opioid-analgesics-with-ambulatory-misuse-potential
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Community
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/medicationrequest-category-community
    link: http://fhir.org/guides/cdc/opioid-cds/ValueSet/medicationrequest-category-community
related artifact:
  type:
    v: depends-on
  display:
    v: Value set PDMP review procedure
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-review-procedure
    link: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-review-procedure
related artifact:
  type:
    v: depends-on
  display:
    v: Value set PDMP data reviewed finding

name:
  v: ContextPrescriptions
use:
  v: in
min:
  v: 0
max:
  v: *
type:
  v: MedicationRequest

name:
  v: Patient
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Patient

name:
  v: Look Back 90 Days
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: Period

name:
  v: Chronic Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: MedicationRequest

name:
  v: Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: PDMP Data Not Reviewed in Past 90 Days
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Inclusion Criteria
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Exclusion Criteria
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Is Recommendation Applicable?
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  link: http://hl7.org/fhir/StructureDefinition/Patient

type:
  v: Procedure
profile:
  v: http://hl7.org/fhir/StructureDefinition/Procedure
  link: http://hl7.org/fhir/StructureDefinition/Procedure
must support:
  v: code
must support:
  v: status
must support:
  v: performed
code filter:
  path:
    v: code
  value set:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-review-procedure
    link: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-review-procedure

type:
  v: Observation
profile:
  v: http://hl7.org/fhir/StructureDefinition/Observation
  link: http://hl7.org/fhir/StructureDefinition/Observation
must support:
  v: code
must support:
  v: status
code filter:
  path:
    v: code
  value set:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-data-reviewed-finding
    link: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pdmp-data-reviewed-finding

content type:
  v: text/cql

content type:
  v: application/elm+xml

content type:
  v: application/elm+json