556 lines
27 KiB
Plaintext
556 lines
27 KiB
Plaintext
maintenance:
|
|
|
|
title: Surgical Antibiotic Prophylaxis Orders;;
|
|
mlmname: FORM_Set_Surg_Antibiotic_Prophylaxis;;
|
|
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 Surgical Antibiotic Prophylaxis Order Set
|
|
|
|
Change history
|
|
09.21.2011 TMS Moved to Prod
|
|
04.09.2013 TMS Modified to change orders to Mini-bags instead of Mini-syringes. Dose calculations and
|
|
Worx code assignment done on order item MLM instead of order set MLM.
|
|
11.13.2015 TMS Updated with changes for cefazolin and cefoxitin dosing and to add additional drugs
|
|
per order set revision. CSR 33885
|
|
11.30.2014 TMS Remove Cefoxitin from list of orders requiring a weight. Order is correct, however if
|
|
there is no weight on the patient, they are being alerted. HD ticket 1955493
|
|
|
|
|
|
|
|
;;
|
|
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;
|
|
|
|
// 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" );
|
|
Dose := first of (field_list where field_list.DataItemName = "DosageLow");
|
|
|
|
Cefazolin := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 1);
|
|
Clindamycin := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 2);
|
|
Cefoxitin := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 3);
|
|
GentamicinMS := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 4);
|
|
GentamicinPB := last of (field_list where field_list.DataItemName = "DosageLow" and field_List.Control_MultiFieldOccNum = 5);
|
|
|
|
CefazolinDose := Cefazolin.Value;
|
|
ClindamycinDose := Clindamycin.Value;
|
|
CefoxitinDose := Cefoxitin.Value;
|
|
GentamicinMSDose := GentamicinMS.Value;
|
|
GentamicinPBDose := GentamicinPB.Value;
|
|
|
|
CefazolinID := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode" and field_List.Control_MultiFieldOccNum = 1);
|
|
ClindamycinID := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode" and field_List.Control_MultiFieldOccNum = 2);
|
|
CefoxitinID := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode" and field_List.Control_MultiFieldOccNum = 3);
|
|
GentamicinMSID := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode" and field_List.Control_MultiFieldOccNum = 4);
|
|
GentamicinPBID := last of (field_list where field_list.DataItemName = "PRX_DrugIDCode" and field_List.Control_MultiFieldOccNum = 5);
|
|
|
|
CefazolinCode := CefazolinID.Value;
|
|
ClindamycinCode := ClindamycinID.Value;
|
|
CefoxitinCode := CefoxitinID.Value;
|
|
GentamicinMSCode := GentamicinMSID.Value;
|
|
GentamicinPBCode := GentamicinPBID.Value;
|
|
|
|
Guidelines1 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 1);
|
|
Guidelines2 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 2);
|
|
Guidelines3 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 3);
|
|
Guidelines4 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 4);
|
|
Guidelines5 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 5);
|
|
Guidelines6 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 6);
|
|
Guidelines7 := last of (field_list where field_list.DataItemName = "MultiOrderInline" and field_List.Control_MultiFieldOccNum = 7);
|
|
|
|
GuidelineBox1 := Guidelines1.Value;
|
|
GuidelineBox2 := Guidelines2.Value;
|
|
GuidelineBox3 := Guidelines3.Value;
|
|
GuidelineBox4 := Guidelines4.Value;
|
|
GuidelineBox5 := Guidelines5.Value;
|
|
GuidelineBox6 := Guidelines6.Value;
|
|
GuidelineBox7 := Guidelines7.Value;
|
|
|
|
RequestedTime1 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 1);
|
|
RequestedTime2 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 2);
|
|
RequestedTime3 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 3);
|
|
RequestedTime4 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 4);
|
|
RequestedTime5 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 5);
|
|
RequestedTime6 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 6);
|
|
RequestedTime7 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 7);
|
|
RequestedTime8 := last of (field_list where field_list.DataItemName = "RequestedTime" and field_List.Control_MultiFieldOccNum = 8);
|
|
RequestedDate9 := last of (field_list where field_list.DataItemName = "RequestedDate" and field_List.Control_MultiFieldOccNum = 9);
|
|
|
|
Grid1Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 1);
|
|
Grid1Orders_List := Grid1Orders.Value;
|
|
Grid2Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 2);
|
|
Grid2Orders_List := Grid2Orders.Value;
|
|
Grid3Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 3);
|
|
Grid3Orders_List := Grid3Orders.Value;
|
|
Grid4Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 4);
|
|
Grid4Orders_List := Grid4Orders.Value;
|
|
Grid5Orders := last of (field_list where field_list.DataItemName = "MultiOrderGrid" and field_List.Control_MultiFieldOccNum = 5);
|
|
Grid5Orders_List := Grid5Orders.Value;
|
|
|
|
Found_Cefazolin := first of (Grid1Orders_List where Grid1Orders_List.Name = "Cefazolin:");
|
|
Found_Vancomycin := first of (Grid1Orders_List where Grid1Orders_List.Name = "Vancomycin:");
|
|
Found_Clindamycin := first of (Grid2Orders_List where Grid2Orders_List.Name = "Clindamycin:");
|
|
Found_Clindamycin2 := last of (Grid2Orders_List where Grid2Orders_List.Name = "Clindamycin:");
|
|
Found_Vancomycin2 := first of (Grid2Orders_List where Grid2Orders_List.Name = "Vancomycin:");
|
|
Found_GentamicinMS := first of (Grid2Orders_List where Grid2Orders_List.Name = "Gentamicin Mini-Syringe:");
|
|
Found_GentamicinPB := last of (Grid2Orders_List where Grid2Orders_List.Name = "Gentamicin:");
|
|
Found_Cefoxitin := last of (Grid3Orders_List where Grid3Orders_List.Name = "Cefoxitin:");
|
|
Found_Clindamycin3 := last of (Grid4Orders_List where Grid4Orders_List.Name = "Clindamycin:");
|
|
Found_Gentamicin2MB := first of (Grid4Orders_List where Grid4Orders_List.Name = "Gentamicin: Mini-Syringe:");
|
|
Found_Gentamicin2PB := last of (Grid4Orders_List where Grid4Orders_List.Name = "Gentamicin:");
|
|
Found_Cipro500 := last of (Grid5Orders_List where Grid5Orders_List.Name = "Ciprofloxacin 500mg Tab");
|
|
Found_Cipro750 := last of (Grid5Orders_List where Grid5Orders_List.Name = "Ciprofloxacin 750mg Tab");
|
|
Found_Pip_Taz := last of (Grid5Orders_List where Grid5Orders_List.Name = "Piperacillin/Tazobactam:");
|
|
CefazolinBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 1);
|
|
CefazolinBoxValue := CefazolinBox.Value;
|
|
|
|
VancomycinBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 2);
|
|
VancomycinBoxValue := VancomycinBox.Value;
|
|
|
|
ClindamycinBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 3);
|
|
ClindamycinBoxValue := ClindamycinBox.Value;
|
|
|
|
Vancomycin2Box := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 4);
|
|
Vancomycin2BoxValue := Vancomycin2Box.Value;
|
|
|
|
ClindaGentBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 5);
|
|
ClindaGentBoxValue := ClindaGentBox.Value;
|
|
|
|
PCNAllergyBox1 := last of (field_list where field_list.DataItemName = "PRX_Checkbox1" and field_List.Control_MultiFieldOccNum = 6);
|
|
PCNAllergyBox1Value := PCNAllergyBox1.Value;
|
|
|
|
UnasynBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox2" and field_List.Control_MultiFieldOccNum = 1);
|
|
UnasynBoxValue := UnasynBox.Value;
|
|
|
|
CefoxitinBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox2" and field_List.Control_MultiFieldOccNum = 2);
|
|
CefoxitinBoxValue := CefoxitinBox.Value;
|
|
|
|
ClindaGent2Box := last of (field_list where field_list.DataItemName = "PRX_Checkbox2" and field_List.Control_MultiFieldOccNum = 3);
|
|
ClindaGent2BoxValue := ClindaGent2Box.Value;
|
|
|
|
MetronGentBox := last of (field_list where field_list.DataItemName = "PRX_Checkbox2" and field_List.Control_MultiFieldOccNum = 4);
|
|
MetronGentBoxValue := MetronGentBox.Value;
|
|
|
|
PCNAllergyBox2 := last of (field_list where field_list.DataItemName = "PRX_Checkbox2" and field_List.Control_MultiFieldOccNum = 5);
|
|
PCNAllergyBox2Value := PCNAllergyBox2.Value;
|
|
|
|
AdminInstruct := last of (field_list where field_list.DataItemName = "AdminInstructions" and field_List.Control_MultiFieldOccNum = 1);
|
|
AdminInstructValue := AdminInstruct.Value;
|
|
|
|
// Obtain Coded Allergen Guids
|
|
(AllergenGuids) := read
|
|
{ " select guid from cv3allergen where code like {{{SINGLE-QUOTE}}}Penicill%{{{SINGLE-QUOTE}}}"};
|
|
|
|
// Retrieve coded and possible typed in allergies to penicillin
|
|
(PCNAllergy) := read last
|
|
{ " Select Status from CV3AllergyDeclaration "
|
|
|| " where ((clientvisitguid = " || SQL(clientvisitguid) || ") and "
|
|
|| " ((Text like {{{SINGLE-QUOTE}}}penicil%{{{SINGLE-QUOTE}}} or text like {{{SINGLE-QUOTE}}}%pcn%{{{SINGLE-QUOTE}}}) and Status = {{{SINGLE-QUOTE}}}active{{{SINGLE-QUOTE}}} and TypeCodeForOther = {{{SINGLE-QUOTE}}}drug{{{SINGLE-QUOTE}}} )) or "
|
|
|| " ((clientvisitguid = " || SQL(clientvisitguid) || ") and "
|
|
|| " (AllergenGUID in ( " ||SQL(allergenguids) || ") and Status = {{{SINGLE-QUOTE}}}active{{{SINGLE-QUOTE}}})) "
|
|
};
|
|
|
|
// Check for MRSA Result
|
|
|
|
(ResultValue) := read last
|
|
{"SELECT tol.text "
|
|
|| " from cv3ordercatalogmasteritem ocmi with (nolock) "
|
|
|| " join cv3order o with (nolock) on o.ordercatalogmasteritemguid = ocmi.guid and o.clientguid = " || SQL(clientguid) || " and o.chartguid = " || SQL(chartguid) || " and o.clientvisitguid = " || SQL(clientvisitguid)
|
|
|| " and o.orderstatuscode In ({{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}RESC{{{SINGLE-QUOTE}}}{{{SINGLE-QUOTE}}}RESI{{{SINGLE-QUOTE}}}) "
|
|
|| " and o.name = {{{SINGLE-QUOTE}}}Nasal Screen for MRSA (Infection Control){{{SINGLE-QUOTE}}} "
|
|
|| " left join cv3BasicObservation bo with (nolock) on bo.OrderGuid = o.guid and bo.clientguid = " || SQL(clientguid) || " and bo.chartguid = " || SQL(chartguid) || " and bo.clientvisitguid = " || SQL(clientvisitguid)
|
|
|| " and bo.itemname = {{{SINGLE-QUOTE}}}culture{{{SINGLE-QUOTE}}} "
|
|
|| " left join cv3textualobservationline tol with (nolock) on tol.observationguid = bo.guid and tol.clientguid = " || SQL(clientguid)
|
|
|| " order by o.significantdtm " };
|
|
|
|
if ResultValue = "METHICILLIN RESISTANT STAPHYLOCOCCUS AUREUS" then MRSAPositive := "Yes"; else MRSAPositive := "No"; endif;
|
|
|
|
// Check for MRSA Flag
|
|
|
|
(MRSAHist) := read last
|
|
{ " select case when EnterpriseClientcol8 in ({{{SINGLE-QUOTE}}}MRSA{{{SINGLE-QUOTE}}},{{{SINGLE-QUOTE}}}Both{{{SINGLE-QUOTE}}}) then {{{SINGLE-QUOTE}}}Yes{{{SINGLE-QUOTE}}} else {{{SINGLE-QUOTE}}}{{{SINGLE-QUOTE}}} end "
|
|
|| " from cv3enterpriseclientdata where clientguid = " || SQL(clientguid) || " " };
|
|
if exist MRSAHist then MRSAHistory := "Yes"; else MRSAHistory := "No"; endif;
|
|
|
|
If (VancomycinBoxValue = True or CefazolinBoxValue = True or ClindamycinBoxValue = True or ClindaGentBoxValue = True
|
|
or Vancomycin2BoxValue or ClindaGent2BoxValue = True or MetronGentBoxValue = True) and weightvalue = 0 then
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Please enter a weight to calculate dosing.","Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
|
|
CurrentLocation := read last
|
|
{"Select CurrentLocation "
|
|
||" From cv3Clientvisit "
|
|
||" Where Guid = " || SQL(ClientVisitGuid)
|
|
||" and VisitStatus = {{{SINGLE-QUOTE}}}ADM{{{SINGLE-QUOTE}}}" };
|
|
|
|
If CallingEvent = "FormOpen" then
|
|
GuidelineBox1.IsReadOnly := (True);
|
|
GuidelineBox2.IsReadOnly := (True);
|
|
GuidelineBox3.IsReadOnly := (True);
|
|
GuidelineBox4.IsReadOnly := (True);
|
|
GuidelineBox5.IsReadOnly := (True);
|
|
GuidelineBox6.IsReadOnly := (True);
|
|
GuidelineBox7.IsReadOnly := (True);
|
|
Grid2Orders_List.IsReadOnly := (True,True,True,True);
|
|
Grid1Orders_List.IsReadOnly := (True,True);
|
|
Grid3Orders_List.IsReadOnly := (True,True);
|
|
Grid4Orders_List.IsReadOnly := (True,True,True,True);
|
|
AdminInstruct.value := "Begin < 60 minutes prior to start of procedure.";
|
|
If CurrentLocation = "St. Clair Hospital Anc" then
|
|
RequestedTime1.control_visible := false;
|
|
RequestedTime2.control_visible := false;
|
|
RequestedTime3.control_visible := false;
|
|
RequestedTime4.control_visible := false;
|
|
RequestedTime5.control_visible := false;
|
|
RequestedTime6.control_visible := false;
|
|
RequestedTime7.control_visible := false;
|
|
RequestedTime8.control_visible := false;
|
|
RequestedDate9.control_visible := false;
|
|
// UnasynBox.control_visible := false;
|
|
// NeoErythBox.Control_Read_Only := true;
|
|
endif;
|
|
|
|
endif;
|
|
|
|
/*
|
|
If CallingEvent in ("FormOpen", "FieldChange") then
|
|
If (weightvalue > 0 and weightvalue < 80) and patientage >= 12 then
|
|
Cefazolin.Value := 1;
|
|
Clindamycin.Value := 600;
|
|
Cefoxitin.Value := 1;
|
|
CefazolinID.Value := "08498";
|
|
ClindamycinID.Value := "08508";
|
|
CefoxitinID.Value := "08515";
|
|
endif;
|
|
If patientage < 12 then
|
|
CefazolinID.Value := "08498";
|
|
ClindamycinID.Value := "08508";
|
|
CefoxitinID.Value := "08515";
|
|
endif;
|
|
If weightvalue >= 80 then
|
|
Cefazolin.Value := 2;
|
|
Clindamycin.Value := 900;
|
|
Cefoxitin.Value := 2;
|
|
CefazolinID.Value := "08499";
|
|
ClindamycinID.Value := "08509";
|
|
CefoxitinID.Value := "08516";
|
|
endif;
|
|
If weightvalue = 0 then
|
|
Cefazolin.Value := Null;
|
|
Clindamycin.Value := Null;
|
|
Cefoxitin.Value := Null;
|
|
CefazolinID.Value := "";
|
|
ClindamycinID.Value := "";
|
|
CefoxitinID.Value := "";
|
|
endif;
|
|
|
|
endif;
|
|
|
|
// Calc Gent Dose
|
|
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
|
|
GentamicinMS.Value :=gentdose; GentamicinMSID.Value := "02060"; GentType := "MS";
|
|
else
|
|
GentamicinPB.Value := gentdose; GentamicinPBID.Value := "00062"; GentType := "PB";
|
|
endif;
|
|
|
|
if gentdose = 40 then GentamicinMS.Value := gentdose; GentamicinMSID.Value := "08582"; GentType := "MS"; endif;
|
|
if gentdose = 60 then GentamicinMS.Value := gentdose; GentamicinMSID.Value := "08513"; GentType := "MS"; endif;
|
|
if gentdose = 80 then GentamicinMS.Value := gentdose; GentamicinMSID.Value := "08390"; GentType := "MS"; endif;
|
|
if gentdose = 100 then GentamicinMS.Value := gentdose; GentamicinMSID.Value := "08392"; GentType := "MS"; endif;
|
|
if gentdose = 120 then GentamicinMS.Value := gentdose; GentamicinMSID.Value := "00191"; GentType := "MS"; endif;
|
|
*/
|
|
If CallingEvent = "FieldChange" then
|
|
// Not Requiring GI Prophylaxis Cefazolin
|
|
If CallingField = "PRX_Checkbox1|1" then
|
|
If CefazolinBoxValue = True then
|
|
Found_Cefazolin.IsSelected := True;
|
|
ClindamycinBox.control_read_only := True;
|
|
Vancomycin2Box.control_read_only := True;
|
|
ClindaGentBox.control_read_only := True;
|
|
Found_Clindamycin.control_read_only := True;
|
|
Grid1Orders_List.IsReadOnly := (False,True);
|
|
|
|
If (MRSAPositive = "Yes" or MRSAHistory = "Yes") and (PCNAllergy <> "Active" or PCNAllergy is null) then
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Your patient may be flagged as MRSA Positive, consider ordering Vancomycin in addition to Cefazolin.","Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
|
|
If PCNAllergy = "Active" and MRSAPositive = "No" and MRSAHistory = "No" then
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Your patient may have a documented allergy to Penicillin, please review Allergies before continuing. ","Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
|
|
If (MRSAPositive = "Yes" or MRSAHistory = "Yes") and PCNAllergy = "Active" then
|
|
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Your patient may be flagged as MRSA Positive. " || "\n - and - " || "\n Your patient may have a documented allergy to Penicillin. " || "\n\n Please review before ordering.","Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
|
|
else
|
|
|
|
Found_Cefazolin.IsSelected := False;
|
|
Found_Vancomycin.IsSelected := False;
|
|
ClindamycinBox.control_read_only := False;
|
|
ClindaGentBox.control_read_only := False;
|
|
Vancomycin2Box.control_read_only := False;
|
|
VancomycinBox.value := False;
|
|
Grid1Orders_List.IsReadOnly := (True,True);
|
|
endif;
|
|
endif;
|
|
// Not Requiring GI Prophylaxis MRSA Vancomycin
|
|
If CallingField = "PRX_Checkbox1|2" then
|
|
If VancomycinBoxValue = True then
|
|
Found_Vancomycin.IsSelected := True;
|
|
Found_Cefazolin.IsSelected := True;
|
|
CefazolinBox.Value:= True;
|
|
ClindamycinBox.control_read_only := True;
|
|
ClindaGentBox.control_read_only := True;
|
|
Vancomycin2Box.control_read_only := True;
|
|
Grid1Orders_List.IsReadOnly := (False,False);
|
|
else
|
|
Found_Vancomycin.IsSelected := False;
|
|
Grid1Orders_List.IsReadOnly := (False,True);
|
|
endif;
|
|
endif;
|
|
// Not Requiring GI Prophylaxis PCN Allergy Clindamycin
|
|
If CallingField = "PRX_Checkbox1|3" then
|
|
If ClindamycinBoxValue = True then
|
|
Found_Clindamycin.IsSelected := True;
|
|
CefazolinBox.control_read_only := True;
|
|
VancomycinBox.control_read_only := True;
|
|
Vancomycin2Box.control_read_only := True;
|
|
ClindaGentBox.control_read_only := True;
|
|
PCNAllergyBox1.Control_read_only := True;
|
|
Grid2Orders_List.IsReadOnly := (False,True,True,True);
|
|
else
|
|
Found_Clindamycin.IsSelected := False;
|
|
CefazolinBox.control_read_only := False;
|
|
VancomycinBox.control_read_only := False;
|
|
Vancomycin2Box.control_read_only := False;
|
|
ClindaGentBox.control_read_only := False;
|
|
PCNAllergyBox1.Control_read_only := False;
|
|
Grid2Orders_List.IsReadOnly := (True,True,True,True);
|
|
endif;
|
|
endif;
|
|
// Not Requiring GI Prophylaxis PCN Allergy Vancomycin
|
|
If CallingField = "PRX_Checkbox1|4" then
|
|
If Vancomycin2BoxValue = True then
|
|
Found_Vancomycin2.IsSelected := True;
|
|
VancomycinBox.control_read_only := True;
|
|
ClindamycinBox.control_read_only := True;
|
|
CefazolinBox.control_read_only := True;
|
|
ClindaGentBox.control_read_only := True;
|
|
PCNAllergyBox1.Control_read_only := True;
|
|
Grid2Orders_List.IsReadOnly := (True,False,True,True);
|
|
else
|
|
Found_Vancomycin2.IsSelected := False;
|
|
CefazolinBox.control_read_only := False;
|
|
VancomycinBox.control_read_only := False;
|
|
ClindamycinBox.control_read_only := False;
|
|
ClindaGentBox.control_read_only := False;
|
|
PCNAllergyBox1.Control_read_only := False;
|
|
Grid2Orders_List.IsReadOnly := (True,True,True,True);
|
|
endif;
|
|
endif;
|
|
// Not Requiring GI Prophylaxis PCN Allergy OB Gyne Clindamycin-Gentamicin
|
|
If CallingField = "PRX_Checkbox1|5" then
|
|
If ClindaGentBoxValue = True then
|
|
Grid2Orders_List.IsSelected := (False,False,True,True);
|
|
Grid2Orders_List.IsReadOnly := (True,True,False,False);
|
|
VancomycinBox.control_read_only := True;
|
|
ClindamycinBox.control_read_only := True;
|
|
CefazolinBox.control_read_only := True;
|
|
Vancomycin2Box.control_read_only := True;
|
|
PCNAllergyBox1.Control_read_only := True;
|
|
Else
|
|
Grid2Orders_List.IsSelected := (False,False,False,False);
|
|
Grid2Orders_List.IsReadOnly := (True,True,True,True);
|
|
VancomycinBox.control_read_only := False;
|
|
ClindamycinBox.control_read_only := False;
|
|
CefazolinBox.control_read_only := False;
|
|
Vancomycin2Box.control_read_only := False;
|
|
PCNAllergyBox1.Control_read_only := False;
|
|
endif;
|
|
endif;
|
|
|
|
If CallingField = "PRX_Checkbox1|6" then
|
|
If PCNAllergyBox1Value = True then
|
|
|
|
AdminInstruct.Value := "May give with Reported PCN allergy. Begin < 60 minutes prior to start of procedure.";
|
|
else
|
|
AdminInstruct.Value := "Begin < 60 minutes prior to start of procedure.";
|
|
endif;
|
|
endif;
|
|
// Colorectal Surgeries Cefoxitin or Unasyn
|
|
If (CallingField = "PRX_Checkbox2|1") then
|
|
If UnasynBoxValue = True then
|
|
Grid3Orders_List.IsSelected := (False,True);
|
|
Grid3Orders_List.IsReadOnly := (True,False);
|
|
ClindaGent2Box.control_read_only := True;
|
|
CefoxitinBox.control_read_only := True;
|
|
MetronGentBox.control_read_only := True;
|
|
else
|
|
Grid3Orders_List.IsSelected := (False,False);
|
|
Grid3Orders_List.IsReadOnly := (True,True);
|
|
ClindaGent2Box.control_read_only := False;
|
|
CefoxitinBox.control_read_only := False;
|
|
MetronGentBox.control_read_only := False;
|
|
endif;
|
|
endif;
|
|
If (CallingField = "PRX_Checkbox2|2") then
|
|
If CefoxitinBoxValue = True then
|
|
Grid3Orders_List.IsSelected := (True,False);
|
|
Grid3Orders_List.IsReadOnly := (False,True);
|
|
ClindaGent2Box.control_read_only := True;
|
|
UnasynBox.control_read_only := True;
|
|
MetronGentBox.control_read_only := True;
|
|
else
|
|
Grid3Orders_List.IsSelected := (False,False);
|
|
Grid3Orders_List.IsReadOnly := (True,True);
|
|
ClindaGent2Box.control_read_only := False;
|
|
UnasynBox.control_read_only := False;
|
|
MetronGentBox.control_read_only := False;
|
|
endif;
|
|
endif;
|
|
|
|
// Colorectal Surgeries Penicillin Allergy Clindamycin plus Gentamicin
|
|
If CallingField = "PRX_Checkbox2|3" then
|
|
If ClindaGent2BoxValue = True then
|
|
|
|
Grid4Orders_List.IsSelected := (True,True,False,False);
|
|
Grid4Orders_List.IsReadOnly := (False,False,True,True );
|
|
UnasynBox.control_read_only := True;
|
|
CefoxitinBox.control_read_only := True;
|
|
MetronGentBox.control_read_only := True;
|
|
Else
|
|
Grid4Orders_List.IsSelected := (False,False,False,False);
|
|
Grid4Orders_List.IsReadOnly := (True,True,True,True);
|
|
UnasynBox.control_read_only := False;
|
|
CefoxitinBox.control_read_only := False;
|
|
MetronGentBox.control_read_only := False;
|
|
endif;
|
|
endif;
|
|
// Colorectal Surgeries Penicillin Allergy Metronidazole plus Gentamicin
|
|
If CallingField = "PRX_Checkbox2|4" then
|
|
If MetronGentBoxValue = True then
|
|
|
|
Grid4Orders_List.IsSelected := (False,False,True,True);
|
|
Grid4Orders_List.IsReadOnly := (True,True,False,False);
|
|
UnasynBox.control_read_only := True;
|
|
CefoxitinBox.control_read_only := True;
|
|
ClindaGent2Box.control_read_only := True;
|
|
Else
|
|
Grid4Orders_List.IsSelected := (False,False,False,False);
|
|
Grid4Orders_List.IsReadOnly := (True,True,True,True);
|
|
UnasynBox.control_read_only := False;
|
|
CefoxitinBox.control_read_only := False;
|
|
ClindaGent2Box.control_read_only := False;
|
|
endif;
|
|
endif;
|
|
|
|
If CallingField = "PRX_Checkbox2|5" then
|
|
If PCNAllergyBox2Value = True then
|
|
|
|
AdminInstruct.Value := "May give with Reported PCN allergy. Begin < 60 minutes prior to start of procedure.";
|
|
else
|
|
AdminInstruct.Value := "Begin < 60 minutes prior to start of procedure.";
|
|
endif;
|
|
endif;
|
|
|
|
If CallingEvent = "FieldChange" then
|
|
If Found_Cipro500.IsSelected = True then Grid5Orders_List.IsReadOnly := (False, True,True);
|
|
elseIf Found_Cipro750.IsSelected = True then Grid5Orders_List.IsReadOnly := (True, False, True);
|
|
elseIf Found_Pip_Taz.IsSelected = True then Grid5Orders_List.IsReadOnly := (True,True,False);
|
|
else Grid5Orders_List.IsReadOnly := (False, False,False);
|
|
endif;
|
|
|
|
endif;
|
|
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:
|