maintenance: title: Form_Lovenox_Dose_calc;; mlmname: Form_Lovenox_Dose_calc;; arden: version 2;; version: 4.50;; institution: St. Clair Hospital;; author: Teresa M. Spicuzza (Teresa.Spicuzza@stclair.org), 412.942.1721 ;; specialist: Eclipsys Corporation;; date: 2008-09-09;; validation: testing;; library: purpose: Calculate Lovenox dose based on weight with dosing recommendations for decreased kidney function. ;; explanation: Dosing Weight in Kilograms * Dosing = Dose Change history 09.09.2008 DW Initial build 02.26.2012 TMS Revised to disallow override when CrCl < 27 ml/min. Additional Messages for clarity. 10.18.2012 TMS Added hold order logic for start time and start now. CSR 26926 06.01.2016 TMS Added EstCrClval to argument being returned from CrCl MLM call as needed for other calculated med orders (Vanco). CSR 34154, 34156 05.08.2017 TMS Update dose cap from 150mg to 190mg for 1mg/kg dosing. CSR 33671 ;; keywords: lovenox, dose, weight; ;; knowledge: type: data-driven;; data: // This MLM is passed three arguments, of types // communication_type, form_type and client info object respectively. (this_communication, // Communication object this_form, // Form object client_info_obj // Arden ClientInfo object ) := argument; comm_obj := this_communication.primaryobj; called_by := this_communication.CallingEvent; call_field := this_communication.CallingFieldName; if called_by_editor then client_guid := "9000001369400200"; visit_guid := visit_obj.GUID; chart_guid := "9000001918900170"; orderId := "1000002689073001"; called_by := "FormOpen"; else client_guid := this_communication.ClientGUID; visit_guid := this_communication.ClientVisitGUID; chart_guid := this_communication.ChartGuid; orderid := this_comm.ItemID; endif; //Initialize MLM pointers: str_parse := mlm {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}}; // Assigns fields passed in the Form object to the Field object field_list:= this_form.fields; If (call_field = "PRX_Generic_CB") or (CallingEvent = "FormOpen") then creatinine_calculator := mlm {{{SINGLE-QUOTE}}}FORM_MLM_CREATININE_CLEARANCE{{{SINGLE-QUOTE}}}; (this_communication, this_form, EstCrClval) := call creatinine_calculator with this_communication, this_form, client_info_obj; endif; // Get patient weight comb_ht_wt_field := first of (field_list where field_list.DataItemName = "CombinedMeasurements"); if exists comb_ht_wt_field then comb_ht_wt_val := comb_ht_wt_field.value; wt := comb_ht_wt_val.weight; weightvalue := (wt as number); endif; creatinine := first of (field_list where field_list.DataItemName = "PRX_CrCl_Estimated"); creatininevalue := creatinine.value; // Define other fields dosing10 := first of (field_list where field_list.DataItemName = "PRX_Lovenox1mgDosing"); dosing15 := first of (field_list where field_list.DataItemName = "PRX_Lovenox1.5mgDosing"); dose := first of (field_list where field_list.DataItemName = "DosageLow"); con := first of (field_list where field_list.DataItemName = "PRX_CONCENTRATION"); str := first of (field_list where field_list.DataItemName = "PRX_CONCSTRENGTH"); struom := first of (field_list where field_list.DataItemName = "PRX_CONCSTRENGTHUOM"); strvol := first of (field_list where field_list.DataItemName = "PRX_CONCSTRVOLUME"); strvoluom := first of (field_list where field_list.DataItemName = "PRX_CONCSTRVOLUMEUOM"); worxcode := first of (field_list where field_list.DataItemName = "PRX_DRUGIDCODE"); override := first of (field_list where field_list.DataItemName = "PRX_DosageOverride"); override_value := override.value; frequencyx := first of (field_list where field_list.DataItemName = "FrequencyCode"); frequency := frequencyx.Value; q24nowstat := ("Q24H","NOW","STAT","ONCE"); nowstat := ("NOW","STAT","ONCE"); mayprocess:= "YES"; start_now := last of (field_list where field_list.DataItemName = "PRX_Dosing Start Now" ); requested_time := last of (field_list where field_list.DataItemName = "RequestedTime" ); requested_time_value := requested_time.value; order_freq_summary := frequency.FrequencySummary; session_type := comm_obj.internalprocessingtype; // Define messages messageA := "Max Lovenox dose in patients with CrCl less than 30ml/min is 1mg/kg SQ Q24H. \n"; messageB := "Recommended Lovenox dose for CrCl 30ml/min or above is 1mg/kg SQ Q12H. \n"; messageC := "Max Lovenox dose for morbidly obese patients with a CrCl 30ml/min or above is 190mg SQ Q12H. Unfractionated heparin may be a consideration in morbidly obese patients. \n"; messageD := "Max Lovenox dose for morbidly obese patients with a CrCl less than 30ml/min is 190mg SQ Q24H. Unfractionated heparin may be a consideration in renally impaired/dialysis patients and/or morbidly obese patients. \n"; messageE := "Lovenox not appropriate for patients weighing less than 30kg. \n"; messageF := "Lovenox 1.5 mg/kg is not appropriate for patients greater than 136kg. \n\n Max Lovenox dose for morbidly obese patients with a CrCl greater than 30ml/min is 1mg/kg (max 150mg) SQ Q12H. Unfractionated heparin may be a consideration in morbidly obese patients. \n"; messageG := "Lovenox 1.5 mg/kg is only dosed Q24H. \n"; messageH := "Lovenox 1.5 mg/kg is not appropriate for patients greater than 136kg. \n\n Max Lovenox dose for morbidly obese patients with a CrCl less than 30ml/min is 1mg/kg (max 150mg) SQ Q24H. Unfractionated heparin may be a consideration in renally impaired/dialysis patients and/or morbidly obese patients. \n"; messageR := "Max Lovenox 1.5mg/kg one time dose for obese patients is 200mg. Unfractionated heparin may be a consideration in morbidly obese patients. \n"; messageQ := "Max Lovenox 1mg/kg one time dose for morbidly obese patients is 190mg. Unfractionated heparin may be a consideration in morbidly obese patients. \n"; messageY := "\n You may override the recommended dose by selecting the Override box. \n"; // Hold order processing If session_type = "Hold" then If exists frequencyx and order_freq_summary = "STAT" then frequency.FrequencySummary := NULL ; endif; start_now.control_read_only := true; requested_time_value.ReqTimeCode := "Scheduled/Start Time"; endif; // Set value of message Z (patient creatinine between 27 & 33) If creatininevalue >= 27 and creatininevalue <= 33 then messageZ := "\n Patients CrCl is estimated to " || creatininevalue || ". Please use clinical judgement in determining dosing regimen. \n"; else messageZ := " "; endif; // Set value of message X (patient creatinine between < 27 no override allowed) If creatininevalue < 27 then messageX := " "; else messageX := "\n You may override the recommended frequency by selecting the Override box. \n"; endif; // Toggle between 1.0 and 1.5 dosing If call_field = "PRX_Lovenox1mgDosing" and dosing10.value = True then dosing15.value := False; dosing := "1"; endif; If call_field = "PRX_Lovenox1mgDosing" and dosing10.value = False then dosing15.value := True; dosing:= "1.5"; endif; If call_field = "PRX_Lovenox1.5mgDosing" and dosing15.value = True then dosing10.value := False; dosing:= "1.5"; endif; If call_field = "PRX_Lovenox1.5mgDosing" and dosing15.value = False then dosing10.value := True; dosing:= "1"; endif; If ((call_field <> "PRX_Lovenox1mgDosing" and call_field <> "PRX_Lovenox1.5mgDosing") or call_field is null) and dosing10.value = True then dosing := "1"; endif; If ((call_field <> "PRX_Lovenox1.5mgDosing" and call_field <> "PRX_Lovenox1.5mgDosing") or call_field is null) and dosing15.value = True then dosing := "1.5"; endif; // If frequency is blank If frequency.FrequencySummary is not null then // Patient is too small If weightvalue < 30 then mayprocess := "NO"; messagetext := messageE; this_communication.Message := messagetext || messageZ ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; //////////////////////////////////////////// 1.5 dosing section //////////////////////////////////////////// elseif (dosing = "1.5") then // Patient is too big.....CrCl is high... frequency is Q24H if (weightvalue > 136.4 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H") then mayprocess := "NO"; messagetext := messageF; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is too big.....CrCl is high... one time frequency elseif (weightvalue > 136.4 and creatininevalue >= 30 and frequency.FrequencySummary in NowStat) then mayprocess := "YES"; weightvalue := 133; messagetext := messageR; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is too big.....CrCl is low elseif (weightvalue > 136.4 and creatininevalue < 30) then mayprocess := "NO"; messagetext := messageH; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is too big.....CrCl is high.....frequency = Q12H elseif (weightvalue > 136.4 and creatininevalue > 30 and frequency.FrequencySummary = "Q12H") then mayprocess := "NO"; messagetext := messageF; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is low.....frequency = Q12H elseif (weightvalue <= 136.4 and creatininevalue <= 30 and frequency.FrequencySummary = "Q12H") then mayprocess := "NO"; messagetext := messageG; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is <=30 and >=27.....frequency = Q24hr/NOW/STAT/ONCE......no override elseif (weightvalue <= 136.4 and creatininevalue <= 30 and creatininevalue >= 27 and frequency.FrequencySummary in q24nowstat and override.value = False) then mayprocess := "NO"; messagetext := messageA; this_communication.Message := messagetext || messageZ || messageY ; this_communication.MessageType := "Informational"; override.control_read_only := False; // Patient is just right.....CrCl is <=30 and >=27.....frequency = Q24hr/NOW/STAT/ONCE.....recommended dose was ovverridden elseif (weightvalue <= 136.4 and creatininevalue <= 30 and creatininevalue >= 27 and frequency.FrequencySummary in q24nowstat and override.value = True) then mayprocess := "YES"; override.control_read_only := False; // Patient is just right.....CrCl is < 27.....frequency = Q24hr/NOW/STAT/ONCE......no override allowed elseif (weightvalue <= 136.4 and creatininevalue < 27 and frequency.FrequencySummary in q24nowstat and override.value = False) then mayprocess := "NO"; messagetext := messageA; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is high.....frequency =Q12H elseif ( weightvalue <= 136.4 and creatininevalue >= 30 and frequency.FrequencySummary not in q24nowstat) then mayprocess := "NO"; dose.value := NULL; messagetext := messageG; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is high.....frequency = NOW/STAT/ONCE elseif ( weightvalue <= 136.4 and creatininevalue >= 30 and frequency.FrequencySummary in nowstat ) then mayprocess := "YES"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is high.....frequency = Q24hr elseif ( weightvalue <= 136.4 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H" ) then mayprocess := "YES"; If messageZ <> " " then this_communication.Message := messageZ ; this_communication.MessageType := "Informational"; endif; override.control_read_only := True; override.value := False; endif; /* end of 1.5 section */ else /* proceed to 1.0 section (dosing <> 1.5) */ //////////////////////////////////////////// 1.0 dosing section //////////////////////////////////////////////////////////////////////////////////////// // Patient is obese.....CrCl is okay.....frequency = Q24hr......no override if (weightvalue > 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H" and override.value = False) then mayprocess := "NO"; messagetext := messageC; this_communication.Message := messagetext || messageZ || messageX; this_communication.MessageType := "Informational"; override.control_read_only := False; // Patient is obese.....CrCl is okay.....frequency = Q24hr.....recommended dose was overridden elseif (weightvalue > 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H" and override.value = True) then mayprocess := "YES"; weightvalue := 190; override.control_read_only := False; // Patient is obese.....CrCl is okay.....frequency = Q12hr elseif (weightvalue > 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q12H") then mayprocess := "YES"; weightvalue := 190; messagetext := messageC; this_communication.Message := messagetext || messageZ ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is obese.....CrCl is okay.....frequency = NOW/STAT/ONCE elseif (weightvalue > 195 and creatininevalue >= 30 and frequency.FrequencySummary in q24nowstat) then mayprocess := "YES"; weightvalue := 190; messagetext := messageQ; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is obese.....CrCl is too low (< 30 and >= 27).....frequency = Q12H......no override elseif (weightvalue > 195 and creatininevalue < 30 and creatininevalue >= 27 and frequency.FrequencySummary not in q24nowstat and override.value = False) then mayprocess := "NO"; messagetext := messageD; this_communication.Message := messagetext || messageZ || messageX ; this_communication.MessageType := "Informational"; override.control_read_only := False; override.value := False; // Patient is obese.....CrCl is too low (<27).....frequency = Q12H......no override allowed elseif (weightvalue > 195 and creatininevalue < 27 and frequency.FrequencySummary not in q24nowstat ) then mayprocess := "NO"; messagetext := messageD; this_communication.Message := messagetext || messageZ ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is obese.....CrCl is too low (< 30 and >= 27).....frequency = Q12H .....recommended dose was ovverridden elseif (weightvalue > 195 and creatininevalue < 30 and creatininevalue >= 27 and frequency.FrequencySummary not in q24nowstat and override.value = True) then mayprocess := "YES"; weightvalue := 190; // messagetext := messageC; // this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := False; // Patient is obese.....CrCl is too low.....frequency = Q24 elseif (weightvalue > 195 and creatininevalue < 30 and frequency.FrequencySummary = "Q24H" ) then mayprocess := "YES"; weightvalue := 190; messagetext := messageD; this_communication.Message := messagetext || messageZ ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is obese.....CrCl is too low.....frequency = NOW/STAT/ONCE elseif (weightvalue > 195 and creatininevalue < 30 and frequency.FrequencySummary in nowstat) then mayprocess := "YES"; weightvalue := 190; messagetext := messageQ; this_communication.Message := messagetext ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is okay.....frequency = Q24hr......no override elseif ( weightvalue <= 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H" and override.value = False) then mayprocess := "NO"; messagetext := messageB; this_communication.Message := messagetext || messageZ || messageX ; this_communication.MessageType := "Informational"; override.control_read_only := False; // Patient is just right.....CrCl is okay.....frequency = Q24hr.....recommended dose was ovverridden elseif ( weightvalue <= 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q24H" and override.value = True) then mayprocess := "YES"; override.control_read_only := False; // Patient is just right.....CrCl is okay.....frequency = Q12hr elseif (weightvalue <= 195 and creatininevalue >= 30 and frequency.FrequencySummary = "Q12H") then mayprocess := "YES"; If messageZ <> " " then this_communication.Message :=messageZ ; this_communication.MessageType := "Informational"; endif; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is okay.....frequency = NOW/STAT/ONCE elseif (weightvalue <= 195 and creatininevalue >= 30 and frequency.FrequencySummary in nowstat) then mayprocess := "YES"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is too low.....frequency = Q24 elseif ( weightvalue <= 195 and creatininevalue < 30 and frequency.FrequencySummary = "Q24H") then mayprocess := "YES"; If messageZ <> " " then this_communication.Message := messageZ ; this_communication.MessageType := "Informational"; endif; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is too low.....frequency = NOW/STAT/ONCE elseif ( weightvalue <= 195 and creatininevalue < 30 and frequency.FrequencySummary in nowstat ) then mayprocess := "YES"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is too low.....frequency = Q12H......no override elseif (weightvalue <= 195 and creatininevalue < 30 and creatininevalue >= 27 and frequency.FrequencySummary not in q24nowstat and override.value = False) then mayprocess := "NO"; messagetext := messageA; this_communication.Message := messagetext || messageZ || messageX ; this_communication.MessageType := "Informational"; override.control_read_only := False; // Patient is just right.....CrCl is too low (<27).....frequency = Q12H......no override allowed elseif (weightvalue<= 195 and creatininevalue < 27 and frequency.FrequencySummary not in q24nowstat ) then mayprocess := "NO"; messagetext := messageA; this_communication.Message := messagetext || messageZ ; this_communication.MessageType := "Informational"; override.control_read_only := True; override.value := False; // Patient is just right.....CrCl is too low.....frequency = Q12H.....recommended dose was ovverridden elseif (weightvalue <= 195 and creatininevalue < 30 and creatininevalue >= 27 and frequency.FrequencySummary not in q24nowstat and override.value = True) then mayprocess := "YES"; override.control_read_only := False; endif; /* end of 1.0 section */ endif; /* end of proceessing for patient{{{SINGLE-QUOTE}}}s not too small */ //////////////////////////////////////////// Process Fields Section //////////////////////////////////////////// If mayprocess = "YES" then calc_map_list :=( // dsg wl wu ds con s su v vu id "1|30|34.4|30|(30mg/0.3ml)|30|MG|0.3|ML|06817", "1|34.5|35.4|40|(40mg/0.4ml)|40|MG|0.4|ML|05997", "1|35.5|43.4|40|(40mg/0.4ml)|40|MG|0.4|ML|05997", "1|43.5|46.4|45|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1|46.5|53.4|50|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1|53.5|56.4|55|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1|56.5|63.4|60|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1|63.5|66.4|65|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1|66.5|73.4|70|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1|73.5|76.4|75|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1|76.5|83.4|80|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1|83.5|86.4|85|(100mg/ml)|100|MG|1|ML|06999", "1|86.5|93.4|90|(100mg/ml)|100|MG|1|ML|06999", "1|93.5|96.4|95|(100mg/ml)|100|MG|1|ML|06999", "1|96.5|105.4|100|(100mg/ml)|100|MG|1|ML|06999", "1|105.5|115.4|110|(120mg/ml)|120|MG|1|ML|07500", "1|115.5|125.4|120|(120mg/ml)|120|MG|1|ML|07500", "1|125.5|135.4|130|(150mg/ml)|150|MG|1|ML|07501", "1|135.5|145.4|140|(150mg/ml)|150|MG|1|ML|07501", "1|145.5|155.4|150|(150mg/ml)|150|MG|1|ML|07501", "1|155.5|165.4|160|(2 x 80mg)| | | | |03468", "1|165.5|175.4|170|(100 + 70mg)| | | | |03469", "1|175.5|185.4|180|(100 + 80mg)| | | | |03470", "1|185.5|195.4|190|(100 + 90mg)| | | | |03471", "1.5|29.5|31.4|45|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1.5|31.5|35.4|50|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1.5|35.5|37.4|55|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1.5|37.5|42.4|60|(60mg/0.6ml)|60|MG|0.6|ML|06997", "1.5|42.5|44.4|65|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1.5|44.5|48.4|70|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1.5|48.5|51.4|75|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1.5|51.5|55.4|80|(80mg/0.8ml)|80|MG|0.8|ML|06998", "1.5|55.5|57.4|85|(100mg/ml)|100|MG|1|ML|06999", "1.5|57.5|61.4|90|(100mg/ml)|100|MG|1|ML|06999", "1.5|61.5|64.4|95|(100mg/ml)|100|MG|1|ML|06999", "1.5|64.5|70.4|100|(100mg/ml)|100|MG|1|ML|06999", "1.5|70.5|76.4|110|(120mg/ml)|120|MG|1|ML|07500", "1.5|76.5|83.4|120|(120mg/ml)|120|MG|1|ML|07500", "1.5|83.5|90.4|130|(150mg/ml)|150|MG|1|ML|07501", "1.5|90.5|96.4|140|(150mg/ml)|150|MG|1|ML|07501", "1.5|96.5|103.4|150|(150mg/ml)|150|MG|1|ML|07501", "1.5|103.5|110.4|160|(2 x 80mg)| | | | |03468", "1.5|110.5|116.4|170|(100 + 70mg)| | | | |03469", "1.5|116.5|123.4|180|(100 + 80mg)| | | | |03470", "1.5|123.5|130.4|190|(100 + 90mg)| | | | |03471", "1.5|130.5|136.4|200|(2 X 100mg)| | | | |03472" ); for i in 1 seqto count calc_map_list do calc_element_list := call str_parse with calc_map_list[i], "|"; field1 := calc_element_list[1]; field2 := calc_element_list[2]; field3 := calc_element_list[3]; field4 := calc_element_list[4]; field5 := calc_element_list[5]; field6 := calc_element_list[6]; field7 := calc_element_list[7]; field8 := calc_element_list[8]; field9 := calc_element_list[9]; field10:= calc_element_list[10]; field2conv := (field2 as number); field3conv := (field3 as number); if (dosing = field1) and (weightvalue >= field2conv) and (weightvalue <= field3conv) then dose.value := field4; con.value := field5; str.value := field6; struom.value := field7; strvol.value := field8; strvoluom.value:= field9; worxcode.value := field10; endif; enddo; /* for i in 1 seqto count calc_map_list do */ else dose.value := ""; con.value := ""; str.value := ""; struom.value := ""; strvol.value := ""; strvoluom.value:= ""; worxcode.value := ""; endif; /* may process = YES */ else; /* frequency has been entered */ endif; /* frequency has been entered */ ;; evoke: ;; logic: Conclude true; ;; action: // This MLM returns two parameters, of types //communication_type and form_type respectively. return this_communication, this_form; ;; Urgency: 50;; end: