Initial Checking with all 820 MLMs

This commit is contained in:
2020-02-02 00:54:01 -05:00
parent c59dc6de2e
commit 840d0432f4
828 changed files with 239162 additions and 0 deletions

View File

@@ -0,0 +1,300 @@
maintenance:
title: FORM_SET_SKIN_ANTIBIOTICS_OUTPATIENT;;
mlmname: FORM_SET_SKIN_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 Skin Antibiotics Outpatient order set
;;
explanation: This MLM is called from Skin Antibiotics Outpatient Order Set
Change history
05.09.2016 JML CSR 34091: Created for Skin Antibiotic Outpatient Order Set
;;
keywords: Called MLMs, Antibiotic Skin, 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:="";
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 := ();
cephalexin_logic_run := false;
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
//Define fields
Cephalexin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 1 );
Clindamycin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 2 );
Amoxicillin_Levaquin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 9 );
Keflex_Levaquin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 11 );
Clindamycin_Levaquin_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 12 );
Cephalexin2_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 13 );
Clindamycin2_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 14 );
Doxycycline_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 10 );
Bactrim_Chk := first of ( field_list WHERE field_list.DataItemName = "PRX_Checkbox1"
AND field_list.Control_MultiFieldOccNum = 20 );
Antibiotics_Grid := first of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid"
AND field_list.Control_MultiFieldOccNum = 1 );
Antibiotics_Grid_Value := Antibiotics_Grid.Value;
Cephalexin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Cephalexin 500mg Cap" );
Clindamycin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Clindamycin 150mg Cap" );
Amoxicillin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Amoxicillin/Clavulanic Acid 875mg Tab" );
Doxycycline := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Doxycycline 100mg Cap" );
Bactrim := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Sulfamethox 800mg/Trimeth 160mg DS Tab" );
Levaquin := first of ( Antibiotics_Grid_Value WHERE Antibiotics_Grid_Value.Name = "Levofloxacin 500mg Tab" );
Cephalexin_Dose := first of ( field_list WHERE field_list.DataItemName = "DosageLow"
AND field_list.Control_MultiFieldOccNum = 1 );
// 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;
ht := comb_ht_wt_val.height;
weightvalue := (wt as number);
endif;
// 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;
endif;
if ( CallingEvent = "FieldChange" ) then
//********* Height / Weight Measurements *******
if ( CallingField = "CombinedMeasurements|1" ) then
if ( Cephalexin_Chk.Value = true OR Keflex_Levaquin_Chk.Value = true OR Cephalexin2_Chk.Value ) then
cephalexin_logic_run := true;
endif;
endif;
//********************* CEPHALEXIN (KEFLEX) *************************
if ( CallingField = "PRX_Checkbox1|1" OR CallingField = "PRX_Checkbox1|13" ) then
if ( CallingField = "PRX_Checkbox1|1" ) then
fieldValue := Cephalexin_Chk.Value;
elseif ( CallingField = "PRX_Checkbox1|13" ) then
fieldValue := Cephalexin2_Chk.Value;
endif;
if ( fieldValue = true ) then
Cephalexin.IsSelected := true;
cephalexin_logic_run := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
cephalexin_logic_run := false;
Cephalexin.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//************* CLINDAMYCIN ***********************
if (CallingField = "PRX_Checkbox1|2" OR CallingField = "PRX_Checkbox1|14" ) then
if ( CallingField = "PRX_Checkbox1|2" ) then
fieldValue := Clindamycin_Chk.Value;
elseif ( CallingField = "PRX_Checkbox1|14" ) then
fieldValue := Clindamycin2_Chk.Value;
endif;
if ( fieldValue = true ) then
Clindamycin.IsSelected := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
Clindamycin.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//************** AMOXICILLIN + LEVAQUIN ********************
if ( CallingField = "PRX_Checkbox1|9" ) then
fieldValue := Amoxicillin_Levaquin_Chk.Value;
if ( fieldValue = true ) then
Amoxicillin.IsSelected := true;
Levaquin.IsSelected := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
Amoxicillin.IsSelected := false;
Levaquin.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//******** CEPHALEXIN (KEFLEX) + LEVAQUIN *****************
if ( CallingField = "PRX_Checkbox1|11" ) then
fieldValue := Keflex_Levaquin_Chk.Value;
if ( fieldValue = true ) then
Cephalexin.IsSelected := true;
Levaquin.IsSelected := true;
cephalexin_logic_run := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
cephalexin_logic_run := false;
Cephalexin.IsSelected := false;
Levaquin.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//******** CLINDAMYCIN + LEVAQUIN *******************
if ( CallingField = "PRX_Checkbox1|12" ) then
fieldValue := Clindamycin_Levaquin_Chk.Value;
if ( fieldValue = true ) then
Clindamycin.IsSelected := true;
Levaquin.IsSelected := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
Clindamycin.IsSelected := false;
Levaquin.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//************ DOXYCYCLINE ******************
if ( CallingField = "PRX_Checkbox1|10" ) then
fieldValue := Doxycycline_Chk.Value;
if ( fieldValue = true ) then
Doxycycline.IsSelected := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
Doxycycline.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
//************ BACTRIM ************************
if ( CallingField = "PRX_Checkbox1|20" ) then
fieldValue := Bactrim_Chk.Value;
if ( fieldValue = true ) then
Bactrim.IsSelected := true;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, true, "";
elseif ( fieldValue = false ) then
Bactrim.IsSelected := false;
rtnValue := call enable_chkbx_mlm WITH this_communication, this_form, client_info_obj, CallingField, false, "";
endif;
endif;
endif; //End FieldChange
if ( cephalexin_logic_run = true ) then
if ( weightvalue = 0 OR weightvalue IS NULL ) then
//Display message that weight is missing
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "Weight Based Dosing Requires Weight To Be Entered." , "Alert","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
else
if ( weightvalue <= 110 ) then
Cephalexin_Dose.Value := 500;
elseif ( weightvalue > 110 ) then
Cephalexin_Dose.Value := 1000;
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: