-
Type:
Question
-
Resolution: Done
-
Priority:
Moderate
-
Component/s: None
-
None
-
EP
Hello,
Request assistance to write logic as concisely as possible without duplicating multiple statements. Medication, dispensed is to be added along with Medication, order is there a way to add this without duplicating several statements. See examples below. FYI-Measure revisions also include assessing for 90 or more days with < 90 MMEs that have at least one day with >90 MMEs and then in the numerator assessing for scripts of =>90 MMES for 15 or more days that are in the 90 + CMD. Draft logic attached. Logic seemed okay with first pass through Bonnie, prior to most recent change to add Medication, dispensed. Thank you.
define function "MedicationOrderRelevantPeriod"(OpioidMedicationOrder "Medication, Order" ):
Interval[start of OpioidMedicationOrder.relevantPeriod, if OpioidMedicationOrder.daysSupplied is not null then start of OpioidMedicationOrder.relevantPeriod + Quantity
else
end of OpioidMedicationOrder.relevantPeriod]
define function "MedicationDispensedRelevantPeriod"(OpioidMedicationDispensed "Medication, Dispensed" ):
Interval[start of OpioidMedicationDispensed.relevantPeriod, if OpioidMedicationDispensed.daysSupplied is not null then start of OpioidMedicationDispensed.relevantPeriod + Quantity
else
end of OpioidMedicationDispensed.relevantPeriod]
define "Opioid Prescription Order in Measurement Period":
"Opioid Medication Order during Measurement Period" Opioid
return
define "Opioid Prescription Dispensed in Measurement Period":
"Opioid Medication Dispensed during Measurement Period" Opioid
return