OpioidCDSREC02
type: Library
node role: treeRoot
id:
  v: OpioidCDSREC02
text:
  status:
    v: generated
  div:
    v: Id: library-OpioidCDSREC02 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: CarePlan code filter: path: category valueset: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan type: Procedure code filter: path: code valueset: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure Content: type: text/cql library OpioidCDSREC02 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 #2 ** Before starting opioid therapy for subacute or chronic pain, clinicians should establish ** treatment goals with all patients, including realistic goals for pain and ** function, and should consider how opioid therapy will be discontinued if ** benefits do not outweigh risks. Clinicians should continue opioid therapy ** only if there is clinically meaningful improvement in pain and function ** that outweighs risks to patient safety ** (recommendation category: A, evidence type: 4). ** ** When ** Provider is prescribing an opioid 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 ** Patient is not undergoing active cancer treatment: ** Patient has had at l…
contained: Parameters
  id:
    v: options
  parameter:
    name:
      v: translatorVersion
    value: String
      v: 3.5.1
  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: JSON
  parameter:
    name:
      v: format
    value: String
      v: XML
  parameter:
    name:
      v: analyzeDataRequirements
    value: Boolean
      v: false
  parameter:
    name:
      v: collapseDataRequirements
    value: Boolean
      v: false
  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: None
  parameter:
    name:
      v: validateUnits
    value: Boolean
      v: true
  parameter:
    name:
      v: verifyOnly
    value: Boolean
      v: false
extension:
  url:
    v: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem
    l: cqfm-softwaresystem
  value: Reference
    l: cqf-tooling
    reference:
      v: Device/cqf-tooling
extension:
  url:
    v: http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem
    l: cqfm-softwaresystem
  value: Reference
    l: cqf-tooling
    reference:
      v: Device/cqf-tooling
extension:
  url:
    v: http://hl7.org/fhir/StructureDefinition/cqf-cqlOptions
    l: cqf-cqlOptions
  value: Reference
    l: options
    reference:
      v: #options
url:
  v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC02
  l: OpioidCDSREC02
version:
  v: 2022.1.0
name:
  v: OpioidCDSREC02
title:
  v: Library - Recommendation #2 - Opioid Therapy Goals Discussion
status:
  v: active
experimental:
  v: true
type:
  coding:
    system:
      v: http://terminology.hl7.org/CodeSystem/library-type
      l: library-type
    code:
      v: logic-library
date:
  v: 2025-11-13T15:52:38+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
    l: http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo
related artifact:
  type:
    v: depends-on
  display:
    v: Library FHIRHelpers
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers|4.0.1
    l: http://fhir.org/guides/cdc/opioid-cds/Library/FHIRHelpers
related artifact:
  type:
    v: depends-on
  display:
    v: Library Common
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon|2022.1.0
    l: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommon
related artifact:
  type:
    v: depends-on
  display:
    v: Library Config
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig|2022.1.0
    l: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSCommonConfig
related artifact:
  type:
    v: depends-on
  display:
    v: Library Routines
  resource:
    v: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines|2022.1.0
    l: http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSRoutines
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
    l: 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
    l: medicationrequest-category-community
related artifact:
  type:
    v: depends-on
  display:
    v: Value set Pain treatment plan

type:
  v: depends-on
display:
  v: Value set Pain management procedure
resource:
  v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure
  l: pain-management-procedure

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: Treatment Plan Lookback Period
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: Opioid Treatment Plan Creation or Update in Past 90 Days
use:
  v: out
min:
  v: 0
max:
  v: *
type:
  v: CarePlan

name:
  v: Had Opioid Treatment Plan Reviewed in Past 90 Days
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: No Opioid Treatment Plan Created, was Edited or 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: 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
  l: Patient

type:
  v: CarePlan
profile:
  v: http://hl7.org/fhir/StructureDefinition/CarePlan
  l: CarePlan
must support:
  v: category
must support:
  v: status
must support:
  v: created
must support:
  v: meta
must support:
  v: meta.lastUpdated
must support:
  v: author
code filter:
  path:
    v: category
  value set:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-treatment-plan
    l: pain-treatment-plan

type:
  v: Procedure
profile:
  v: http://hl7.org/fhir/StructureDefinition/Procedure
  l: Procedure
must support:
  v: code
must support:
  v: performed
must support:
  v: performer
code filter:
  path:
    v: code
  value set:
    v: http://fhir.org/guides/cdc/opioid-cds/ValueSet/pain-management-procedure
    l: pain-management-procedure

content type:
  v: text/cql

content type:
  v: application/elm+xml

content type:
  v: application/elm+json