317 lines
11 KiB
Plaintext
317 lines
11 KiB
Plaintext
maintenance:
|
|
|
|
title: SCIP Surgical Antibiotic Prophylaxis Orders;;
|
|
mlmname: FORM_SCIP_Abx_Dosing;;
|
|
arden: version 2.5;;
|
|
version: 5.50;;
|
|
institution: St Clair Hospital;;
|
|
author: Teresa Spicuzza, Allscripts ;;
|
|
specialist: Teresa Spicuzza, Allscripts;;
|
|
date: 2011-04-01;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Used for Surgical Antibiotic Prophylaxis Weight Based Dosing
|
|
;;
|
|
|
|
explanation: This MLM is called from antibiotics on the SCIP Antibiotic Order Sets
|
|
|
|
Change history
|
|
04.8.2013 TMS Moved to Prod as part of Mini-syringe to Mini-bag project
|
|
MLM supplies the correct WORx Code, Dose and UOM for an order
|
|
based upon the patient{{{SINGLE-QUOTE}}}s current weight. CSR 31359
|
|
11.12.2015 TMS Updated with OPSU Preop changes for Cefazolin dose and weight ranges.
|
|
CSR 33885
|
|
02.08.2018 JML CSR 35885 - Updated MLM to include diliuent change for Amikacin dosing
|
|
09.05.2018 TMS CSR #37176, 37177, 37178, 37062 Added query for OldOrtho to use the
|
|
old Cefazolin Dosing for Ortho order sets not yet updated by review.
|
|
11.20.2018 TMS CSR{{{SINGLE-QUOTE}}}s 37583 (Abdominoplasty Post Op), 37556 (Post Op Lap Chole) and
|
|
37557 (Wound Debridement Post Op Orders): Changed to use new cefazolin dosing.
|
|
11.20.2018 TMS CSR{{{SINGLE-QUOTE}}}s 37583 (Abdominoplasty Post Op), 37556 (Post Op Lap Chole) and
|
|
37557 (Wound Debridement Post Op Orders): Changed to use new cefazolin dosing.
|
|
12.03.2018 TMS CSR{{{SINGLE-QUOTE}}}s 37585 (Gastric Bypass Post Op)and 37533 (Post Op Vascular Surgery):
|
|
Changed to use new cefazolin dosing.
|
|
12.17.2018 TMS CSR 37346 (Fractured Hip Post Op Orders), 37345 (Total Hip Replacement Post Op Orders),
|
|
37344 (Total Knee Replacement Post Op Orders): Changed to use new cefazolin dosing.
|
|
02.20.2019 TMS 37530 (Post Op Open Chole) Changed to use new cefazolin dosing.
|
|
01.15.2020 TMS 38595 (Post Op Foot and Ankle) Changed to use new cefazolin dosing.
|
|
01.15.2020 TMS 37873 (Free Flap Post Op) Added to use static dosing for Cefazolin and Clindamycin.
|
|
|
|
|
|
|
|
;;
|
|
keywords: Called MLMs, Antibiotic Prophylaxis, Weight Based Dosing
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
|
|
|
|
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
|
include standard_libs;
|
|
|
|
using "ObjectsPlusXA.SCM.Forms";
|
|
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
|
|
|
// 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;
|
|
|
|
ClientGuid := this_communication.ClientGUID;
|
|
ChartGuid := this_communication.ChartGUID;
|
|
ClientVisitGuid := this_communication.ClientVisitGUID;
|
|
/*******************Make Changes To Spelling And Flags In This Section*******************/
|
|
|
|
/* Set to True if a decision.log is needed.*/
|
|
log_execution_info := False;
|
|
|
|
|
|
/***************************************************************************************/
|
|
|
|
// Initialize error message
|
|
error_message:="";
|
|
|
|
// Assigns fields passed in the Form object to the Field object
|
|
field_list:= this_form.fields;
|
|
CallingEvent := this_communication.CallingEvent;
|
|
CallingField := this_communication.CallingFieldName;
|
|
|
|
AltSCIPDosingParentSet := read {"select GUID from CV3OrderCatalogSet where name = {{{SINGLE-QUOTE}}}Free Flap Post Op Orders{{{SINGLE-QUOTE}}}"};
|
|
AltSCIPDosingSet := read {"select GUID from CV3OrderCatalogSet where name = {{{SINGLE-QUOTE}}}SCIP Antibiotics: Free Flap Surgery{{{SINGLE-QUOTE}}}"};
|
|
|
|
|
|
|
|
|
|
// 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;
|
|
|
|
// Get patient age
|
|
(patientage) := read last
|
|
{
|
|
" select "
|
|
||" case when "
|
|
||" right({{{SINGLE-QUOTE}}}00{{{SINGLE-QUOTE}}} + cast (datepart (MM,getdate()) as varchar),2) + right({{{SINGLE-QUOTE}}}00{{{SINGLE-QUOTE}}} + cast (datepart (DD,getdate()) as varchar),2) < "
|
|
||" right({{{SINGLE-QUOTE}}}00{{{SINGLE-QUOTE}}} + cast (birthmonthnum as varchar),2) + right({{{SINGLE-QUOTE}}}00{{{SINGLE-QUOTE}}} + cast (birthdaynum as varchar),2) "
|
|
||" then datediff (yy, cast (birthyearnum as varchar) ,getdate()) -1 "
|
|
||" else datediff (yy, cast (birthyearnum as varchar) ,getdate()) "
|
|
||" end "
|
|
||" from cv3client with (nolock) where guid = " || ClientGuid || " "
|
|
};
|
|
//
|
|
If patientage < 12 and CallingEvent = "FormOpen" then;
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Patient under 12 years of age." ||"\n Please call physician for dosing. " ,"Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
//
|
|
|
|
// Define other fields
|
|
StartNow := last of (field_list where field_list.DataItemName = "PRX_Dosing Start Now" );
|
|
Prebuilt := last of (field_list where field_list.DataItemName = "PRX_PrebuiltOrder");
|
|
SP := " ";
|
|
CR := 13 formatted with "%c";
|
|
LF := 10 formatted with "%c";
|
|
CRLF:= CR||LF;
|
|
TAB := 9 formatted with "%c";
|
|
|
|
Dose := last of (field_list where field_list.DataItemName = "DosageLow");
|
|
Diluent := last of (field_list where field_list.DataItemName = "BaseSolution");
|
|
DoseUnit := last of (field_list where field_list.DataItemName = "Uom");
|
|
|
|
DoseValue := Dose.Value;
|
|
DiluentValue := Diluent.Value;
|
|
DoseUnitValue := DoseUnit.Value;
|
|
NS50ml := "0.9% NaCl 50ml .";
|
|
NS100ml := "0.9% NaCl 100ml .";
|
|
D5W100ml := "D5W 100ml .";
|
|
D5W250ml := "D5W 250ml .";
|
|
AbxName := last of (field_list where field_list.DataItemName = "PRX_AntibioticNameForMLM");
|
|
AbxNameValue := AbxName.Value;
|
|
WorxCode := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode");
|
|
WorxCodeValue :=WorxCode.Value;
|
|
OPSU_Preop_Order := last of (field_list where field_list.DataItemName = "PRX_SCIP_PREOP");
|
|
|
|
|
|
If CallingEvent in ("FormOpen", "FieldChange") and AbxNameValue is not null then
|
|
|
|
If this_communication.CatalogParentOrderSetGUID in AltSCIPDosingParentSet or this_communication.CatalogOrderSetGUID in AltSCIPDosingSet then
|
|
|
|
If patientage >= 12 then
|
|
If AbxNameValue = "Cefazolin" then
|
|
|
|
Dose.Value := 1;
|
|
DoseUnit.Value := "gm";
|
|
DiluentValue.Name := NS50ml;
|
|
DiluentValue.Dose := 50;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08498P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
If AbxNameValue = "Clindamycin" then
|
|
|
|
Dose.Value := 600;
|
|
DoseUnit.Value := "mg";
|
|
DiluentValue.Name := NS50ml;
|
|
DiluentValue.Dose := 50;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08508P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
Endif;
|
|
|
|
elseif this_communication.CatalogParentOrderSetGUID not in AltSCIPDosingParentSet and this_communication.CatalogOrderSetGUID not in AltSCIPDosingSet then
|
|
|
|
If (weightvalue > 0 and weightvalue < 80) and patientage >= 12 then
|
|
If AbxNameValue = "Cefoxitin" then
|
|
|
|
Dose.Value := 1;
|
|
DoseUnit.Value := "gm";
|
|
DiluentValue.Name := NS50ml;
|
|
DiluentValue.Dose := 50;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08515P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
If AbxNameValue = "Clindamycin" then
|
|
|
|
Dose.Value := 600;
|
|
DoseUnit.Value := "mg";
|
|
DiluentValue.Name := NS50ml;
|
|
DiluentValue.Dose := 50;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08508P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
endif; //(weightvalue > 0 and weightvalue < 80) and patientage >= 12
|
|
|
|
If weightvalue >= 80 then
|
|
|
|
If AbxNameValue = "Cefoxitin" then
|
|
|
|
Dose.Value := 2;
|
|
DoseUnit.Value := "gm";
|
|
DiluentValue.Name := NS100ml;
|
|
DiluentValue.Dose := 100;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08516P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
If AbxNameValue = "Clindamycin" then
|
|
|
|
Dose.Value := 900;
|
|
DoseUnit.Value := "mg";
|
|
DiluentValue.Name := NS100ml;
|
|
DiluentValue.Dose := 100;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08509P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
endif; //weightvalue >= 80
|
|
|
|
If (weightvalue > 0 and weightvalue < 120) and patientage >= 12 then
|
|
|
|
If AbxNameValue = "Cefazolin" then
|
|
|
|
Dose.Value := 2;
|
|
DoseUnit.Value := "gm";
|
|
DiluentValue.Name := NS100ml;
|
|
DiluentValue.Dose := 100;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "08499P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
endif;
|
|
|
|
If weightvalue >= 120 and patientage >= 12 then
|
|
If AbxNameValue = "Cefazolin" then
|
|
|
|
Dose.Value := 3;
|
|
DoseUnit.Value := "gm";
|
|
DiluentValue.Name := NS100ml;
|
|
DiluentValue.Dose := 100;
|
|
DiluentValue.Uom := "ml";
|
|
WorxCode.Value := "00467P";
|
|
Prebuilt.Value := True;
|
|
Endif;
|
|
|
|
endif;
|
|
|
|
|
|
If weightvalue = 0 then
|
|
Dose.Value := Null;
|
|
WORxCode.Value := "";
|
|
|
|
endif;
|
|
|
|
endif;
|
|
|
|
|
|
endif; //CallingEvent in ("FormOpen", "FieldChange") and AbxNameValue is not null
|
|
|
|
// Calc Gent Dose
|
|
If AbxNameValue = "Gentamicin" then
|
|
DiluentValue.Name := NS50ml;
|
|
DiluentValue.Dose := 50;
|
|
DiluentValue.Uom := "ml";
|
|
|
|
rawdose := weightvalue * 1.5;
|
|
|
|
If patientage >= 12 then
|
|
gentdose := INT((rawdose + 5)/10)*10;
|
|
else
|
|
gentdose := INT((rawdose + 2.5)/5)*5;
|
|
endif;
|
|
|
|
if gentdose >0 and gentdose <= 250 then
|
|
Dose.Value := gentdose; WorxCode.Value := "00062";
|
|
Prebuilt.value := False;
|
|
endif;
|
|
|
|
if gentdose = 80 then Dose.Value := gentdose; WorxCode.Value := "08390P"; Prebuilt.value := True; endif;
|
|
if gentdose = 100 then Dose.Value := gentdose; WorxCode.Value := "08392P"; Prebuilt.value := True; endif;
|
|
if gentdose = 120 then Dose.Value := gentdose; WorxCode.Value := "00191P"; Prebuilt.value := True; endif;
|
|
if gentdose = 240 then Dose.Value := gentdose; WorxCode.Value := "00313P"; Prebuilt.value := True; endif;
|
|
endif;
|
|
|
|
//Calc Amikacin Dose
|
|
if AbxNameValue = "Amikacin" then
|
|
|
|
amikadose := Dose.Value;
|
|
|
|
if ( amikadose <= 500 ) then
|
|
DiluentValue.Name := D5W100ml;
|
|
DiluentValue.Dose := 100;
|
|
DiluentValue.Uom := "ml";
|
|
elseif ( amikadose > 500 ) then
|
|
DiluentValue.Name := D5W250ml;
|
|
DiluentValue.Dose := 250;
|
|
DiluentValue.UOM := "ml";
|
|
endif;
|
|
|
|
WorxCode.Value := "08075";
|
|
endif;
|
|
|
|
;;
|
|
evoke: // No evoke statement
|
|
;;
|
|
logic:
|
|
|
|
conclude True;
|
|
;;
|
|
action:
|
|
// This MLM returns two parameters, of types communication_type and form_type respectively.
|
|
return this_communication, this_form;
|
|
;;
|
|
end:
|