325 lines
13 KiB
Plaintext
325 lines
13 KiB
Plaintext
maintenance:
|
|
|
|
title: FORM_SET_PNEUMONIA_ANTIBIOTICS_OUTPATIENT;;
|
|
mlmname: FORM_SET_PNEUMONIA_ANTIBIOTICS_OUTPATIENT;;
|
|
arden: version 2.5;;
|
|
version: 15.10;;
|
|
institution: St Clair Hospital;;
|
|
author: Juliet M. Law, Allscripts ;;
|
|
specialist: Peggy Leschak, Allscripts;;
|
|
date: 2016-05-09;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Used for Pneumonia Antibiotics Outpatient order set
|
|
;;
|
|
|
|
explanation: This MLM is called from Pneumonia Antibiotics Outpatient Order Set
|
|
|
|
Change history
|
|
05.09.2016 JML CSR 34091: Created for Pneumonia Antibiotic Outpatient Order Set
|
|
|
|
;;
|
|
keywords: Called MLMs, Antibiotic Pneumonia, Outpatient, 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;
|
|
PrimaryObjdetail:=this_communication.PrimaryObj;
|
|
OrderSetName := PrimaryObjdetail.OrderSetName;
|
|
|
|
/*******************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:="";
|
|
|
|
display_field_mlm := mlm {{{SINGLE-QUOTE}}}FORM_FUNC_DISPLAY_FORM_FIELD{{{SINGLE-QUOTE}}};
|
|
enable_chkbx_mlm := mlm {{{SINGLE-QUOTE}}}FORM_Func_Disable_OS_Checkboxes{{{SINGLE-QUOTE}}};
|
|
antibiotic_guideline_mlm := mlm {{{SINGLE-QUOTE}}}FORM_FUNC_DISPLAY_ANTIBIOTIC_GUIDELINES{{{SINGLE-QUOTE}}};
|
|
|
|
exceptFld := ();
|
|
|
|
// Assigns fields passed in the Form object to the Field object
|
|
field_list:= this_form.fields;
|
|
CallingEvent := this_communication.CallingEvent;
|
|
CallingField := this_communication.CallingFieldName;
|
|
|
|
Azithromycin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 1 );
|
|
Doxycycline_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 2 );
|
|
Cefuroxime_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 3 );
|
|
Cefaclor_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 5 );
|
|
Levofloxacin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 10 );
|
|
Amoxicillin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1" AND field_list.Control_MultiFieldOccNum = 11 );
|
|
|
|
Antibiotics_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 1 );
|
|
Antibiotics_Grid_Value := Antibiotics_Grid.Value;
|
|
Alternative_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 2 );
|
|
Alternative_Grid_Value := Alternative_Grid.Value;
|
|
|
|
Azithromycin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Azithromycin 250mg Tab" );
|
|
Doxycycline := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Doxycycline 100mg Cap" );
|
|
Cefuroxime := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Cefuroxime 500mg Tab" );
|
|
Cefaclor := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Cefaclor 250mg Cap" );
|
|
Amoxicillin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Amoxicillin 500mg Cap" );
|
|
Levofloxacin := first of ( Alternative_Grid_Value WHERE Alternative_Grid_Value.Name = "Levofloxacin 750mg Tab" );
|
|
|
|
// Get patient age
|
|
(birthDate) := read last {ClientInfo: BirthDate REFERENCING client_info_obj};
|
|
|
|
patientAge := (NOW - birthDate) / (1 year);
|
|
|
|
If patientage < 11.99 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;
|
|
|
|
|
|
if ( CallingEvent = "FormOpen" ) then
|
|
( this_communication, this_form ) := call antibiotic_guideline_mlm WITH this_communication, this_form, client_info_obj;
|
|
|
|
for item IN Antibiotics_Grid_Value do
|
|
item.IsReadonly := true;
|
|
enddo;
|
|
for drug IN Alternative_Grid_Value do
|
|
drug.IsReadonly := true;
|
|
enddo;
|
|
endif;
|
|
|
|
if ( CallingEvent = "FieldChange" ) then
|
|
|
|
//********** AZITHROMYCIN *********************
|
|
if ( CallingField = "PRX_Checkbox1|1" ) then
|
|
|
|
fieldValue := Azithromycin_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Azithromycin.IsSelected := true;
|
|
|
|
exceptFld := exceptFld, Cefuroxime_Chk.DataItemName || "|" || Cefuroxime_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefaclor_Chk.DataItemName || "|" || Cefaclor_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Amoxicillin_Chk.DataItemName || "|" || Amoxicillin_Chk.Control_MultiFieldOccNum;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
Azithromycin.IsSelected := false;
|
|
|
|
if ( Cefuroxime_Chk.Value = true OR Cefaclor_Chk.value = true OR Amoxicillin_Chk.Value = true ) then
|
|
exceptFld := exceptFld, Levofloxacin_Chk.DataItemName || "|" || Levofloxacin_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
|
|
endif;
|
|
|
|
//*********** DOXYCYCLINE *********************
|
|
if ( CallingField = "PRX_Checkbox1|2" ) then
|
|
|
|
fieldValue := Doxycycline_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Doxycycline.IsSelected := true;
|
|
|
|
exceptFld := exceptFld, Cefuroxime_Chk.DataItemName || "|" || Cefuroxime_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefaclor_Chk.DataItemName || "|" || Cefaclor_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Amoxicillin_Chk.DataItemName || "|" || Amoxicillin_Chk.Control_MultiFieldOccNum;
|
|
|
|
if ( Cefuroxime_Chk.Value = true OR Cefaclor_Chk.value = true OR Amoxicillin_Chk.Value = true ) then
|
|
exceptFld := exceptFld, Levofloxacin_Chk.DataItemName || "|" || Levofloxacin_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
|
|
elseif ( fieldValue = false ) then
|
|
Doxycycline.IsSelected := false;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
|
|
endif;
|
|
endif;
|
|
|
|
//*********** CEFUROXIME ********************
|
|
if ( CallingField = "PRX_Checkbox1|3" ) then
|
|
|
|
fieldValue := Cefuroxime_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Cefuroxime.IsSelected := true;
|
|
|
|
if ( Cefaclor_Chk.Value = true ) then
|
|
Cefaclor_Chk.Value := false;
|
|
Cefaclor.IsSelected := false;
|
|
endif;
|
|
if ( Amoxicillin_Chk.Value = true ) then
|
|
Amoxicillin_Chk.Value := false;
|
|
Amoxicillin.IsSelected := false;
|
|
endif;
|
|
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefaclor_Chk.DataItemName || "|" || Cefaclor_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Amoxicillin_Chk.DataItemName || "|" || Amoxicillin_Chk.Control_MultiFieldOccNum;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
Cefuroxime.IsSelected := false;
|
|
|
|
if ( Azithromycin_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
if ( Doxycycline_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
//************* CEFACLOR ********************
|
|
if ( CallingField = "PRX_Checkbox1|5" ) then
|
|
|
|
fieldValue := Cefaclor_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Cefaclor.IsSelected := true;
|
|
|
|
if ( Cefuroxime_Chk.Value = true ) then
|
|
Cefuroxime_Chk.Value := false;
|
|
Cefuroxime.IsSelected := false;
|
|
endif;
|
|
if ( Amoxicillin_Chk.Value = true ) then
|
|
Amoxicillin_Chk.Value := false;
|
|
Amoxicillin.IsSelected := false;
|
|
endif;
|
|
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefuroxime_Chk.DataItemName || "|" || Cefuroxime_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Amoxicillin_Chk.DataItemName || "|" || Amoxicillin_Chk.Control_MultiFieldOccNum;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
Cefaclor.IsSelected := false;
|
|
|
|
if ( Azithromycin_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
if ( Doxycycline_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
endif;
|
|
|
|
//************* Amoxicillin ******************
|
|
if ( CallingField = "PRX_Checkbox1|11" ) then
|
|
fieldValue := Amoxicillin_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Amoxicillin.IsSelected := true;
|
|
|
|
if ( Cefaclor_Chk.Value = true ) then
|
|
Cefaclor_Chk.Value := false;
|
|
Cefaclor.IsSelected := false;
|
|
endif;
|
|
if ( Cefuroxime_Chk.Value = true ) then
|
|
Cefuroxime_Chk.Value := false;
|
|
Cefuroxime.IsSelected := false;
|
|
endif;
|
|
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefuroxime_Chk.DataItemName || "|" || Cefuroxime_Chk.Control_MultiFieldOccNum;
|
|
exceptFld := exceptFld, Cefaclor_Chk.DataItemName || "|" || Cefaclor_Chk.Control_MultiFieldOccNum;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
Amoxicillin.IsSelected := false;
|
|
|
|
if ( Azithromycin_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Azithromycin_Chk.DataItemName || "|" || Azithromycin_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
if ( Doxycycline_Chk.Value = false ) then
|
|
exceptFld := exceptFld, Doxycycline_Chk.DataItemName || "|" || Doxycycline_Chk.Control_MultiFieldOccNum;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, exceptFld;
|
|
endif;
|
|
|
|
endif;
|
|
|
|
//************* LEVOFLOXACIN ******************
|
|
if ( CallingField = "PRX_Checkbox1|10" ) then
|
|
|
|
fieldValue := Levofloxacin_Chk.Value;
|
|
|
|
if ( fieldValue = true ) then
|
|
Levofloxacin.IsSelected := true;
|
|
|
|
if ( Azithromycin_Chk.Value = true ) then
|
|
Azithromycin.IsSelected := false;
|
|
Azithromycin_Chk.Value := false;
|
|
endif;
|
|
|
|
if ( Doxycycline_Chk.value = true ) then
|
|
Doxycycline.IsSelected := false;
|
|
Doxycycline_Chk.Value := false;
|
|
endif;
|
|
|
|
if ( Cefuroxime_Chk.Value = true ) then
|
|
Cefuroxime.IsSelected := false;
|
|
Cefuroxime_Chk.Value := false;
|
|
endif;
|
|
if ( Cefaclor_chk.Value = true ) then
|
|
Cefaclor.IsSelected := false;
|
|
Cefaclor_Chk.Value := false;
|
|
endif;
|
|
if ( Amoxicillin_Chk.Value = true ) then
|
|
Amoxicillin_chk.Value := false;
|
|
Amoxicillin.IsSelected := false;
|
|
endif;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, exceptFld;
|
|
elseif ( fieldValue = false ) then
|
|
Levofloxacin.IsSelected := false;
|
|
|
|
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
|
|
endif;
|
|
endif;
|
|
|
|
endif; //End FieldChange event
|
|
;;
|
|
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:
|