maintenance: title: SCH_ALERT_ON_CODEINE_ORDERS ;; mlmname: SCH_ALERT_ON_CODEINE_ORDERS;; arden: version 2.5;; version: 1.00;; institution: St.Clair Hospital ;; author: Sandy Zhang ;; specialist: Amy Georgulis ;; date: 2018-08-27;; validation: testing;; library: purpose: If the patient is a child under 18 years old (1 - 17) then present a hard stop alert when the user attempts to order codeine, codeine combo, or tramadol products for the patient. No ability to proceed with hard stops. ;; explanation: Change History 08.27.2018 SZ CSR 36725: codeine and tramadol alert for children < 18 yo ;; keywords: codeine, tramadol, pediatric alert ;; citations: ;; knowledge: type: data-driven;; data: // MLM evoked on Fentanyl Patch orders codeine_tramadol_order_event := event{OrderInit User Order : WHERE Name matches pattern "%codeine%" or Name matches pattern "%tramadol%" }; // grab relevant guids ClientGuid := EVOKINGOBJECT.ClientGUID; ChartGuid := EVOKINGOBJECT.ChartGUID; userguid := EVOKINGOBJECT.UserGUID; VisitGuid := EVOKINGOBJECT.ClientVisitGUID; /************************* check 1 *****************************************/ // only proceed with alert if patient is 0 to 18 years old if (EvokingEventType = "OrderInit") then (Client_g, Client_dn, birthdate, Client_birthyearnum) := read last {ClientInfo: GUID, DisplayName, birthdate, birthyearnum}; endif; patient_age := (NOW - birthdate) / (1 year); if patient_age >= 0 and patient_age < 18 then show_alert := true; else show_alert := false; endif; /************************* Alert Details *****************************************/ // Set the med name for use in alert text/message if EVOKINGOBJECT.Name matches pattern "%codeine%" then med_name_codeine := true; med_name := "Codeine"; elseif EVOKINGOBJECT.Name matches pattern "%Tramadol%" then med_name_tramadol := true; med_name := "Tramadol"; else med_name_either := true; med_name := "Codeine/Tramadol"; endif; // alert message content if (med_name_codeine = true) then alert_message := "\n Use of codeine in ultra-rapid metabolizers causes life-threatening , high levels of morphine that has led to respiratory depression and fatalities in children. Per the FDA, Codeine is contraindicated in children under 12 years old for ALL indications and in patients 12-18 years old for cough or pain following tonsillectomy or adenoidectomy. Codeine is also not recommended for pain in children 12-18 years of age who are obese, or have severe lung disease or obstructive sleep apnea." || "\n "; endif; if (med_name_tramadol = true) then alert_message := "\n Use of tramadol in ultra-rapid metabolizers causes life-threatening , high levels of the active ingredients that has led to respiratory depression and fatalities in children. Per the FDA, tramadol is contraindicated in all children under 12 years old and in patients 12-18 years old for pain following tonsillectomy or adenoidectomy. Tramadol is also not recommended for pain in children 12-18 years of age who are obese, or have severe lung disease or obstructive sleep apnea. " || "\n "; endif; if (med_name_either = true) then alert_message := "\n" || med_name || " is contraindicated in pediatric patients (0-17 yo) due to a significant risk of respiratory depression which has led to fatalities." || "\n "; endif; // alert destination order_alert_dest := destination {alert} with [alert_type := warning, short_message := med_name || " Pediatric Alert", priority := "High", scope := Chart, rule_group := "Codeine/Tramadol Pediatric Alert", rule_number := 8000, send_with_order := "DoNotSend", alert_dialog_settings := "No Override Allowed", display_alert := true]; ;; priority: 50 ;; evoke: codeine_tramadol_order_event; ;; logic: conclude show_alert; ;; action: write alert_message at order_alert_dest; ;; Urgency: 50;; end: