Skip to content

Commit

Permalink
cleaning up rec06
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantaustin13 committed Sep 6, 2022
1 parent 4551727 commit b14ea8f
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 30 deletions.
Binary file modified input/pagecontent/assets/images/Recommendation06-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions input/pagecontent/cql/OpioidCDSREC06.cql
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ context Patient
define "Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions":
( Common."Is Opioid Analgesic with Ambulatory Misuse Potential?"( ContextPrescriptions ) ) AmbulatoryOpioidPrescription
where Routines."Is Acute Pain Prescription?"( AmbulatoryOpioidPrescription )
and Routines."Acute Pain Prescription Greater Than 7 Days?"(AmbulatoryOpioidPrescription)

define "Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential for Acute Pain":
exists( "Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions" )
Expand All @@ -62,7 +63,6 @@ define "Inclusion Criteria":
"Patient Is Being Prescribed Opioid Analgesic with Ambulatory Misuse Potential for Acute Pain"
and not "Patient Age Less Than 18"
and Routines."Is Opioid Review Useful?"
and "Order is for Long-Acting Opioid"

define "Exclusion Criteria":
false
Expand All @@ -81,12 +81,12 @@ define "Get Indicator":

define "Get Summary":
if "Is Recommendation Applicable?"
then 'Recommend limit therapy to <= 3 days to maximum of <= 7 days and to limit to immediate release opioids'
then 'Recommend limit therapy to <= 3 days to maximum of <= 7 days. When prescribing opioids for acute pain, CDC recommends prescribing no greater quantity than needed for the expected duration of severe pain'
else null

define "Get Detail":
if "Is Recommendation Applicable?"
then 'Medication requests(s): '
+ Combine(("Acute Pain Opioid Analgesic with Ambulatory Misuse Potential Prescriptions" M
return Coalesce(M.medication.text, '<Unable to determine medication name>')), ', ')
return Coalesce(M.medication.text, M.medication.coding[0].display, '<Unable to determine medication name>')), ', ')
else null
5 changes: 5 additions & 0 deletions input/pagecontent/cql/OpioidCDSRoutines.cql
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ define function "Is Acute Pain Prescription?"(prescription FHIR.MedicationReques
and prescription.dispenseRequest.expectedSupplyDuration is not null
and Common.GetDurationInDays( prescription.dispenseRequest.expectedSupplyDuration ) < 28
define function "Acute Pain Prescription Greater Than 7 Days?"(prescription FHIR.MedicationRequest):
prescription.dispenseRequest is not null
and prescription.dispenseRequest.expectedSupplyDuration is not null
and Common.GetDurationInDays( prescription.dispenseRequest.expectedSupplyDuration ) > 7
and Common.GetDurationInDays( prescription.dispenseRequest.expectedSupplyDuration ) < 28
// End of For Acute Pain Routine
// TODO: Include logic for dispensing and patient-reported events
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"extension": [
{
"url": "dateLastUpdated",
"valueDateTime": "2022-08-24"
"valueDateTime": "2022-09-06"
},
{
"url": "frequency",
Expand Down Expand Up @@ -49,9 +49,9 @@
"medicationCodeableConcept": {
"coding": [
{
"system": "http://snomed.info/sct",
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "1049502",
"display": "12 HR Oxycodone Hydrochloride 10 MG Extended Release Oral Tablet"
"display": "oxyCODONE HCl 10 MG 12HR Extended Release Oral Tablet"
}
]
},
Expand All @@ -61,7 +61,7 @@
"encounter": {
"reference": "Encounter/example-rec-06-in-criteria-met-context"
},
"authoredOn": "2022-08-24",
"authoredOn": "2022-09-06",
"dosageInstruction": [
{
"timing": {
Expand All @@ -76,10 +76,10 @@
],
"dispenseRequest": {
"validityPeriod": {
"start": "2022-08-24T00:00:00-06:00",
"end": "2022-11-24T00:00:00-07:00"
"start": "2022-09-06",
"end": "2022-12-06"
},
"numberOfRepeatsAllowed": 1,
"numberOfRepeatsAllowed": 0,
"expectedSupplyDuration": {
"value": 5.0,
"unit": "days",
Expand Down
6 changes: 3 additions & 3 deletions input/resources/library/OpioidCDSCommonConfig.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions input/resources/library/OpioidCDSREC06.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions input/resources/library/OpioidCDSREC10Common.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions input/resources/library/OpioidCDSRoutines.json

Large diffs are not rendered by default.

0 comments on commit b14ea8f

Please sign in to comment.