brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
opioid-risk-assessmentPerforms opioid risk assessment by calculating morphine milligram equivalents (MME) from active prescriptions, applying Opioid Risk Tool scoring, and checking CDC 2022 guideline thresholds. Use when user asks to "assess opioid risk", "calculate MME", "check opioid safety", "review opioid prescriptions", mentions "morphine equivalents", "naloxone", "opioid t…
Independent GitHub snapshot · Automated classification · Original documentation governs
Perform a comprehensive opioid risk assessment by pulling all active opioid prescriptions, calculating total daily morphine milligram equivalents (MME), applying Opioid Risk Tool (ORT) scoring criteria, and evaluating against CDC 2022 Clinical Practice Guideline thresholds. Flag MME >50 (caution), MME >90 (high risk), concurrent benzodiazepine use, concurrent gabapentinoid use, and absence of naloxone co-prescription. Include CAGE-AID screening questions for substance use risk assessment.
| Resource | Purpose | Key Fields |
|---|---|---|
| MedicationRequest | Active opioid prescriptions with dosing | status, medicationCodeableConcept, dosageInstruction, dispenseRequest |
| MedicationStatement | Patient-reported opioid and concurrent substance use | status, medicationCodeableConcept, dosage |
| MedicationDispense | Opioid fill history for pattern analysis | status, medicationCodeableConcept, quantity, daysSupply, whenHandedOver |
| Patient | Demographics for ORT scoring (age, gender) | birthDate, gender |
| Condition | Psychiatric diagnoses, substance use history for ORT | code, clinicalStatus |
| Observation | Urine drug screen results, pain scores | code, valueCodeableConcept, valueQuantity |
Tool: fhir_read
resourceType: "Patient"
id: "[patient-id]"
Extract age and gender. Both are required for ORT scoring (scoring criteria differ by gender).
Tool: fhir_search
resourceType: "MedicationRequest"
queryParams: "patient=[patient-id]&status=active&_count=100"
Classify each active medication:
For each active opioid prescription:
dosageInstruction:
doseAndRate[0].doseQuantity.value = single dose amounttiming.repeat.frequency / timing.repeat.period = doses per daytiming.code.text for text-based frequency (e.g., "every 6 hours" = 4x/day)Total Daily MME = SUM(each opioid's daily dose x MME conversion factor)
| Total Daily MME | Risk Level | Action |
|---|---|---|
| < 20 | Lower risk | Standard monitoring |
| 20-49 | Moderate risk | Reassess benefits vs risks |
| 50-89 | CAUTION | Increased overdose risk. Implement risk mitigation. Prescribe naloxone. |
| >= 90 | HIGH RISK | Substantial overdose risk. Avoid increasing to this level. If already at this level, consider tapering. Prescribe naloxone. |
Concurrent Benzodiazepines (FDA Boxed Warning):
Concurrent Gabapentinoids:
Concurrent Muscle Relaxants:
Concurrent Z-drugs / Sedative-Hypnotics:
Pull relevant history from Conditions:
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&_count=100"
Look for (by SNOMED code or text):
Apply ORT scoring (see references/ort-scoring.md). Scores differ by gender.
ORT Interpretation:
| Score | Risk Category | Action |
|---|---|---|
| 0-3 | Low risk | Standard monitoring |
| 4-7 | Moderate risk | Enhanced monitoring, consider UDS, shorter prescriptions |
| >= 8 | High risk | Intensive monitoring, frequent UDS, specialty referral consideration |
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&code=19295-5,3426-4&_sort=-date&_count=5"
LOINC codes:
Check for:
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&code=72514-3,38208-5&_sort=-date&_count=5"
LOINC codes:
Evaluate: Is pain severity being regularly documented? Are functional outcomes being tracked alongside pain scores?
Check if naloxone is in the active medication list (from Step 2).
Naloxone should be co-prescribed when:
If naloxone is indicated but not prescribed, include recommendation.
Include these screening questions in the output for the clinician to ask during the visit:
CAGE-AID (Adapted to Include Drugs):
1. Have you ever felt you should CUT DOWN on your drinking or drug use?
2. Have people ANNOYED you by criticizing your drinking or drug use?
3. Have you ever felt bad or GUILTY about your drinking or drug use?
4. Have you ever had a drink or used drugs first thing in the morning to steady
your nerves or get rid of a hangover (EYE-OPENER)?
Scoring: >= 2 "yes" answers = positive screen for substance use disorder risk
OPIOID RISK ASSESSMENT - [Patient Name] (Age [X], [Gender])
Assessment Date: [date]
ACTIVE OPIOID PRESCRIPTIONS:
| Opioid | Dose | Frequency | Daily Dose | MME Factor | Daily MME |
|--------|------|-----------|-----------|------------|-----------|
| [name] | [dose] | [freq] | [daily] | [factor] | [mme] |
TOTAL DAILY MME: [sum] [RISK LEVEL: caution/high risk]
CONCURRENT HIGH-RISK MEDICATIONS:
- Benzodiazepines: [Yes/No - list if yes] [FDA BOXED WARNING]
- Gabapentinoids: [Yes/No - list if yes]
- Muscle relaxants: [Yes/No - list if yes]
- Sedative-hypnotics: [Yes/No - list if yes]
OPIOID RISK TOOL SCORE: [score] / [max] - [Low/Moderate/High Risk]
[Breakdown of scoring factors]
URINE DRUG SCREEN:
- Last UDS: [date] or NOT FOUND
- Results: [consistent/inconsistent with prescribed medications]
NALOXONE STATUS: [Prescribed / NOT PRESCRIBED - RECOMMEND]
CDC GUIDELINE COMPLIANCE:
- MME threshold: [compliant / exceeds caution / exceeds high risk]
- Concurrent CNS depressants: [compliant / non-compliant]
- UDS monitoring: [adequate / overdue / not performed]
- Naloxone co-prescribing: [compliant / non-compliant]
CAGE-AID SCREENING: [Include questions for clinician to administer]
RECOMMENDATIONS:
1. [Specific actionable recommendations based on findings]
User says: "Assess opioid risk for patient 11223."
Actions:
Result:
OPIOID RISK ASSESSMENT - Patient 11223 (Age 54, Male)
ACTIVE OPIOID PRESCRIPTIONS:
| Opioid | Dose | Frequency | Daily Dose | MME Factor | Daily MME |
|--------|------|-----------|-----------|------------|-----------|
| Oxycodone IR | 30mg | QID | 120mg | 1.5 | 180 |
| Fentanyl patch | 50mcg/hr | q72h | continuous | 2.4 | 120 |
TOTAL DAILY MME: 300 [CRITICAL - EXCEEDS 90 MME THRESHOLD BY 3.3x]
CONCURRENT HIGH-RISK MEDICATIONS:
- Benzodiazepines: YES - Lorazepam 1mg TID [FDA BOXED WARNING]
- Gabapentinoids: YES - Gabapentin 600mg TID
OPIOID RISK TOOL SCORE: 2 / 26 - Low Risk (based on available diagnoses)
- Anxiety disorder: +1
- No documented SUD history: 0
- Age >45: 0
URINE DRUG SCREEN:
- Last UDS: 8 months ago [OVERDUE - recommend at least every 6 months at this MME]
NALOXONE STATUS: NOT PRESCRIBED [URGENT - RECOMMEND IMMEDIATE CO-PRESCRIPTION]
RECOMMENDATIONS:
1. [CRITICAL] Total MME 300 far exceeds CDC caution threshold (50) and high-risk threshold (90).
Discuss gradual taper plan. Target reduction of 10% per month.
2. [CRITICAL] Concurrent opioid + benzodiazepine. FDA boxed warning for respiratory depression.
Develop plan to taper lorazepam. Consider non-benzodiazepine anxiolytics.
3. [URGENT] Prescribe naloxone (Narcan nasal spray 4mg). Educate patient and household contacts.
4. [HIGH] Obtain urine drug screen at next visit.
5. [HIGH] Reassess functional goals. Opioid therapy at this level should demonstrate
meaningful functional improvement.
6. [MODERATE] Consider pain management specialty referral for multimodal approach.
7. [MODERATE] Consider gabapentin taper given concurrent opioid risk.
User says: "Patient 55667, age 38 female, is being considered for opioid therapy for chronic pain. Run opioid risk assessment."
Actions:
Result:
OPIOID RISK ASSESSMENT - Patient 55667 (Age 38, Female)
PRE-PRESCRIBING ASSESSMENT
CURRENT OPIOID USE: None
OPIOID RISK TOOL SCORE: 8 / 26 - HIGH RISK
- Personal history of alcohol dependence: +3
- Depression/anxiety: +1
- Age 25-44 (female): +4
NOTE: Family history of substance abuse not documented - if positive, score increases further.
CONCURRENT MEDICATIONS OF CONCERN:
- Cyclobenzaprine (muscle relaxant) - would add CNS depression if opioid started
- Escitalopram (SSRI) - serotonin syndrome risk with tramadol if considered
CAGE-AID SCREENING QUESTIONS (administer before prescribing decision):
1. Have you ever felt you should CUT DOWN on your drinking or drug use?
2. Have people ANNOYED you by criticizing your drinking or drug use?
3. Have you ever felt bad or GUILTY about your drinking or drug use?
4. Have you ever had a drink or used drugs first thing in the morning (EYE-OPENER)?
RECOMMENDATIONS:
1. [HIGH] ORT score of 8 indicates HIGH RISK for opioid misuse. If opioids are prescribed:
- Start at lowest effective dose
- Use immediate-release only initially
- Short supply (7-14 day prescriptions)
- Baseline UDS before prescribing
- UDS every 1-3 months
- PDMP check before each prescription
- Prescribe naloxone from the start
2. [HIGH] Administer CAGE-AID screening before decision.
3. [HIGH] Consider non-opioid alternatives first:
- Duloxetine (FDA-approved for fibromyalgia, also treats depression/anxiety)
- Pregabalin (FDA-approved for fibromyalgia)
- Physical therapy
- Cognitive behavioral therapy for chronic pain
4. [MODERATE] Obtain UDS baseline if opioids will be prescribed.
5. [MODERATE] Document informed consent discussion including addiction risk.
6. [MODERATE] If opioids started, do not exceed 50 MME without reassessment.
dosageInstruction.text or medicationCodeableConcept.text.drug-interaction-checker - Check opioid interactions with full medication listprescription-appropriateness-review - Broader review including Beers criteria for elderly on opioidsmedication-adherence-assessment - Assess opioid fill patterns for early refills or gapsmedication-reconciliation - Ensure all opioid sources are captured before MME calculation