@prefix fhir: <http://hl7.org/fhir/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/sct/> .

# - resource -------------------------------------------------------------------

[] a fhir:PlanDefinition;
  fhir:Resource.id [ fhir:value "opioidcds-12-patient-view"], [ fhir:value "effective-data-requirements"];
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-recommendationdefinition";
       fhir:index 0
     ], [
       fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-publishableplandefinition";
       fhir:index 1
     ]
  ];
  fhir:DomainResource.extension [
     fhir:index 0;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "shareable" ]
  ], [
     fhir:index 1;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "computable" ]
  ], [
     fhir:index 2;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "executable" ]
  ], [
     fhir:index 3;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-knowledgeCapability" ];
     fhir:Extension.value [ fhir:value "publishable" ]
  ], [
     fhir:index 4;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSCommonConfig" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Age Less than 18 Years Is Enabled" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "// CDC 2022 General Inclusion Criteria\ndefine \"Age Less than 18 Years Is Enabled\":\n  true" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "0" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 5;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSCommon" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Patient 18 or Older?" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Patient 18 or Older?\":\n  Config.\"Age Less than 18 Years Is Enabled\"\n    and AgeInYears() >= 18" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "1" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 6;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSCommonConfig" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Evidence Based Treatment Criteria For Opioid Use Disorder" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "// Recommendation 12\ndefine \"Evidence Based Treatment Criteria For Opioid Use Disorder\":\n  true" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "2" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 7;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSCommonConfig" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Can the implementing EHR support queries for past medications by date range?" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "// Subroutine 2 - Past Medications\ndefine \"Can the implementing EHR support queries for past medications by date range?\":\n  true" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "3" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 8;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Opioid Use Disorder Lookback Period" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Opioid Use Disorder Lookback Period\":\n  Interval[Today() - 90 days, Today()]" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "4" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 9;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Not Receiving Evidence-Based Treatment for Opioid Use Disorder" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Not Receiving Evidence-Based Treatment for Opioid Use Disorder\":\n  Config.\"Evidence Based Treatment Criteria For Opioid Use Disorder\"\n    and not (\n        if Config.\"Can the implementing EHR support queries for past medications by date range?\" then\n          exists (\n            [MedicationRequest: Common.\"Buprenorphine and methadone medications\"] MR\n              where MR.status in { 'active', 'completed' }\n                and date from MR.authoredOn during day of \"Opioid Use Disorder Lookback Period\"\n          )\n        else\n            true\n    /* update 2022 removes \"behavioral therapy condition\"\n      or exists (\n        [Procedure: Common.\"Substance misuse behavioral counseling\"] P\n          where P.status ~ 'completed'\n            and (\n              case\n                when P.performed is FHIR.dateTime then\n                  Interval[FHIRHelpers.ToDateTime(P.performed as FHIR.dateTime), FHIRHelpers.ToDateTime(P.performed as FHIR.dateTime)]\n                when P.performed is FHIR.Period then\n                  FHIRHelpers.ToInterval(P.performed as FHIR.Period)\n                else\n                  null as Interval<DateTime>\n                end\n            ) during day of \"Opioid Use Disorder Lookback Period\"\n      )*/\n    )" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "5" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 10;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSCommon" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "US Core-Categorized Conditions" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "// 3. Medications indicating end of life\n    /* or exists (\n      \"Medications Indicating End of Life\"\n    ) */\n\ndefine \"US Core-Categorized Conditions\":\n  [Condition: category in \"Encounter Diagnosis Condition Category\"]\n    union [Condition: category in \"Problem List Condition Category\"]\n    union [Condition: category in \"US Core Health Concern Condition Category\"]" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "6" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 11;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Presence of Diagnosis of Opioid Use Disorder" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Presence of Diagnosis of Opioid Use Disorder\":\n  exists (\n    Common.\"US Core-Categorized Conditions\" C\n      where C.code in Common.\"Opioid misuse disorders\"\n        and C.clinicalStatus in Common.\"Active Condition\"\n        and date from C.recordedDate during day of \"Opioid Use Disorder Lookback Period\"\n    )" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "7" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 12;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Positive Result from Opioid Use Disorder Evaluation Tool" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Positive Result from Opioid Use Disorder Evaluation Tool\":\n  true" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "8" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 13;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Inclusion Criteria" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Inclusion Criteria\":\n  Common.\"Patient 18 or Older?\"\n    and \"Not Receiving Evidence-Based Treatment for Opioid Use Disorder\"\n    and \"Presence of Diagnosis of Opioid Use Disorder\"\n    and \"Positive Result from Opioid Use Disorder Evaluation Tool\"" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "9" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 14;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Exclusion Criteria" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Exclusion Criteria\":\n  false" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "10" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 15;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "OpioidCDSREC12PatientView" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "Is Recommendation Applicable?" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define \"Is Recommendation Applicable?\":\n  \"Inclusion Criteria\"\n    and not \"Exclusion Criteria\"" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "11" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 16;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "FHIRHelpers" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "ToString" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define function ToString(value string): value.value" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "12" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 17;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "FHIRHelpers" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "ToConcept" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define function ToConcept(concept FHIR.CodeableConcept):\n    if concept is null then\n        null\n    else\n        System.Concept {\n            codes: concept.coding C return ToCode(C),\n            display: concept.text.value\n        }" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "13" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 18;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "FHIRHelpers" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "ToCode" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define function ToCode(coding FHIR.Coding):\n    if coding is null then\n        null\n    else\n        System.Code {\n          code: coding.code.value,\n          system: coding.system.value,\n          version: coding.version.value,\n          display: coding.display.value\n        }" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "14" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 19;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "FHIRHelpers" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "ToString" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define function ToString(value MedicationRequestStatus): value.value" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "15" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 20;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "libraryName" ];
       fhir:Extension.value [ fhir:value "FHIRHelpers" ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "name" ];
       fhir:Extension.value [ fhir:value "ToDateTime" ]
     ], [
       fhir:index 2;
       fhir:Extension.url [ fhir:value "statement" ];
       fhir:Extension.value [ fhir:value "define function ToDateTime(value dateTime): value.value" ]
     ], [
       fhir:index 3;
       fhir:Extension.url [ fhir:value "displaySequence" ];
       fhir:Extension.value [ fhir:value "16" ]
     ];
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition" ]
  ], [
     fhir:index 21;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-softwaresystem" ];
     fhir:Extension.value [
       fhir:Reference.reference [ fhir:value "Device/cqf-tooling" ]
     ]
  ], [
     fhir:index 22;
     fhir:Extension.url [ fhir:value "http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements" ];
     fhir:Extension.value [ fhir:value "#effective-data-requirements" ]
  ];
  fhir:PlanDefinition.url [ fhir:value "http://fhir.org/guides/cdc/opioid-cds/PlanDefinition/opioidcds-12-patient-view"];
  fhir:PlanDefinition.identifier [
     fhir:index 0;
     fhir:Identifier.use [ fhir:value "official" ];
     fhir:Identifier.value [ fhir:value "cdc-opioid-guidance" ]
  ];
  fhir:PlanDefinition.version [ fhir:value "2022.1.0"];
  fhir:PlanDefinition.name [ fhir:value "PlanDefinition_Recommendation_12_Patient_View"];
  fhir:PlanDefinition.title [ fhir:value "Recommendation #12 - Evidence-based Treatment for Patients with Opioid Use Disorder (patient-view)"];
  fhir:PlanDefinition.type [
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/plan-definition-type" ];
       fhir:Coding.code [ fhir:value "eca-rule" ];
       fhir:Coding.display [ fhir:value "ECA Rule" ]
     ]
  ];
  fhir:PlanDefinition.status [ fhir:value "draft"];
  fhir:PlanDefinition.experimental [ fhir:value "true"];
  fhir:PlanDefinition.date [ fhir:value "2025-08-06"];
  fhir:PlanDefinition.publisher [ fhir:value "Centers for Disease Control and Prevention (CDC)"];
  fhir:PlanDefinition.contact [
     fhir:index 0;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "https://www.cdc.gov" ]
     ]
  ];
  fhir:PlanDefinition.description [ fhir:value "Clinicians should offer or arrange treatment with evidence-based medications to treat patients with opioid use disorder. Detoxification on its own, without medications for opioid use disorder, is not recommended for opioid use disorder because of increased risks for resuming drug use, overdose, and overdose death."];
  fhir:PlanDefinition.useContext [
     fhir:index 0;
     fhir:UsageContext.code [
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/usage-context-type" ];
       fhir:Coding.code [ fhir:value "focus" ];
       fhir:Coding.display [ fhir:value "Clinical Focus" ]
     ];
     fhir:UsageContext.value [
       a sct:1336192000;
       fhir:CodeableConcept.coding [
         fhir:index 0;
         a sct:1336192000;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ];
         fhir:Coding.code [ fhir:value "1336192000" ];
         fhir:Coding.display [ fhir:value "Opioid use disorder (disorder)" ]
       ]
     ]
  ];
  fhir:PlanDefinition.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [ fhir:index 0 ]
  ];
  fhir:PlanDefinition.purpose [ fhir:value "The 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain is intended to improve communication between clinicians and patients about the benefits and risks of pain treatments, including opioid therapy; improve the effectiveness and safety of pain treatment; mitigate pain; improve function and quality of life for patients with pain; and reduce risks associated with opioid pain therapy, including opioid use disorder, overdose, and death. The recommendations do not apply to pain related to sickle cell disease or cancer or to patients receiving palliative or end-of-life care."];
  fhir:PlanDefinition.usage [ fhir:value "Medication treatment of opioid use disorder has been associated with reduced risk for overdose and overall deaths. Identification of opioid use disorder represents an opportunity for a clinician to initiate potentially life-saving interventions, and the clinician should collaborate with the patient regarding their safety to increase the likelihood of successful treatment."];
  fhir:PlanDefinition.copyright [ fhir:value "© CDC 2016+."];
  fhir:PlanDefinition.topic [
     fhir:index 0;
     fhir:CodeableConcept.text [ fhir:value "Opioid Prescribing" ]
  ];
  fhir:PlanDefinition.author [
     fhir:index 0;
     fhir:ContactDetail.name [ fhir:value "Kensaku Kawamoto, MD, PhD, MHS" ]
  ], [
     fhir:index 1;
     fhir:ContactDetail.name [ fhir:value "Bryn Rhodes" ]
  ], [
     fhir:index 2;
     fhir:ContactDetail.name [ fhir:value "Floyd Eisenberg, MD, MPH" ]
  ], [
     fhir:index 3;
     fhir:ContactDetail.name [ fhir:value "Robert McClure, MD, MPH" ]
  ];
  fhir:PlanDefinition.relatedArtifact [
     fhir:index 0;
     fhir:RelatedArtifact.type [ fhir:value "documentation" ];
     fhir:RelatedArtifact.display [ fhir:value "2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain" ];
     fhir:RelatedArtifact.url [ fhir:value "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm" ];
     fhir:RelatedArtifact.document [
       fhir:Attachment.url [ fhir:value "https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm" ]
     ]
  ];
  fhir:PlanDefinition.library [
     fhir:value "http://fhir.org/guides/cdc/opioid-cds/Library/OpioidCDSREC12PatientView";
     fhir:index 0
  ];
  fhir:PlanDefinition.action [
     fhir:index 0;
     fhir:Element.extension [
       fhir:index 0;
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-strengthOfRecommendation" ];
       fhir:Extension.value [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/recommendation-strength" ];
           fhir:Coding.code [ fhir:value "strong" ];
           fhir:Coding.display [ fhir:value "Strong" ]
         ]
       ]
     ], [
       fhir:index 1;
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/cqf-qualityOfEvidence" ];
       fhir:Extension.value [
         fhir:CodeableConcept.coding [
           fhir:index 0;
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/evidence-quality" ];
           fhir:Coding.code [ fhir:value "high" ];
           fhir:Coding.display [ fhir:value "High quality" ]
         ]
       ]
     ];
     fhir:PlanDefinition.title [ fhir:value "Offer Evidence-based Medications to Treat Patients with Opioid Use Disorder" ];
     fhir:PlanDefinition.description [ fhir:value "For patients diagnosed with opioid use disorder, consider opioid agonist or partial agonist treatment with methadone or buprenorphine maintenance therapy. Detoxification on its own, without medications for opioid use disorder, is not recommended for opioid use disorder because of increased risks of resuming drug use, overdose, and overdose death. \r\n\r\nFor guidance regarding diagnosing and treating opioid use disorder, see [Recommendation 12 of the 2022 CDC Clinical Practice Guideline](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=evidence%20type%3A%201).-,Implementation%20Considerations,-Although%20stigma%20can).\r\n\r\n[CDC recommends against releasing patients from care due to diagnosis of opioid use disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=opioid%20use%20disorder.-,Clinicians%20should%20not%20dismiss%20patients%20from%20their%20practice%20because%20of%20opioid%20use%20disorder%20because%20this%20can%20adversely%20affect%20patient%20safety.,-Medication%20treatment%20of).\r\n\r\n[MME conversion factors should not be applied to dosage decisions related to the management of opioid use disorder](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=These%20conversion%20factors%20should%20not%20be%20applied%20to%20dosage%20decisions%20related%20to%20the%20management%20of%20opioid%20use%20disorder.).\r\n\r\n[Do not use the calculated dose in MMEs to determine the doses to use when converting one opioid to another; when converting opioids, the new opioid is typically dosed at a substantially lower dose than the calculated MME dose to avoid overdose because of incomplete cross-tolerance and individual variability in opioid pharmacokinetics](https://www.cdc.gov/mmwr/volumes/71/rr/rr7103a1.htm#:~:text=Do%20not%20use%20the,variability%20in%20opioid%20pharmacokinetics.). Consult the FDA approved product labeling for specific guidance on medications." ];
     fhir:PlanDefinition.priority [ fhir:value "urgent" ];
     fhir:PlanDefinition.trigger [
       fhir:index 0;
       fhir:TriggerDefinition.type [ fhir:value "named-event" ];
       fhir:TriggerDefinition.name [ fhir:value "patient-view" ]
     ];
     fhir:PlanDefinition.condition [
       fhir:index 0;
       fhir:PlanDefinition.kind [ fhir:value "applicability" ];
       fhir:PlanDefinition.expression [
         fhir:Expression.description [ fhir:value "Check whether the patient is 18 or older with an active condition of opioid misuse disorder and doesn't have an active prescription (order) for buprenorphine or methadone medications." ];
         fhir:Expression.language [ fhir:value "text/cql.identifier" ];
         fhir:Expression.expression [ fhir:value "Is Recommendation Applicable?" ]
       ]
     ];
     fhir:PlanDefinition.groupingBehavior [ fhir:value "visual-group" ];
     fhir:PlanDefinition.selectionBehavior [ fhir:value "any" ];
     fhir:PlanDefinition.action [
       fhir:index 0;
       fhir:PlanDefinition.description [ fhir:value "Snooze* - Patient already provided medication elsewhere to treat opioid use disorder, snooze 3 months" ]
     ], [
       fhir:index 1;
       fhir:PlanDefinition.description [ fhir:value "Snooze* - Patient declined medication therapy, snooze 3 months" ]
     ], [
       fhir:index 2;
       fhir:PlanDefinition.description [ fhir:value "Document - Will order medication to treat opioid use disorder" ]
     ], [
       fhir:index 3;
       fhir:PlanDefinition.description [ fhir:value "Refer - Will refer patient to SUD specialist" ]
     ], [
       fhir:index 4;
       fhir:PlanDefinition.description [ fhir:value "Snooze* - N/A see comments, snooze 3 months" ]
     ]
  ] .

# -------------------------------------------------------------------------------------

