271 lines
8.0 KiB
Plaintext
271 lines
8.0 KiB
Plaintext
maintenance:
|
|
|
|
title: ED Respiratory Page Mapping Many Grids;;
|
|
mlmname: FORM_Set_ED_Respiratory_Many;;
|
|
arden: version 2;;
|
|
version: 4.50;;
|
|
institution: St Clair ED Respiratory;;
|
|
author: Robert Spence, Eclipsys Corp Ext 7461;;
|
|
specialist: Lisa Hancher, Eclipsys Corp ext PINT;;
|
|
date: 2008-03-17;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: When user selects items on an order set, fill in a summary line (special instructions)
|
|
This field is to be mapped to one on the pager form.
|
|
This MLM will then fill in the data based on the selected checkboxes, having the interface only need to
|
|
look at the data within the pager form (not every order in the set)
|
|
|
|
;;
|
|
|
|
explanation: This MLM is called from the ED Respiratory Order Set (ED_Respiratory)
|
|
|
|
Change history
|
|
|
|
06.24.2010 DW Added code for 2 new orderset items
|
|
07.26.2017 AnkitM CSR 33723: Changed wording from {{{SINGLE-QUOTE}}}Xopenex{{{SINGLE-QUOTE}}} to {{{SINGLE-QUOTE}}}Levalbuterol{{{SINGLE-QUOTE}}}
|
|
07.26.2017 AnkitM CSR 33723: Changed "Levalbuterol 10 mg/hr" to "Levalbuterol 5 mg/hr" and "Levalbuterol 15 mg/hr" to "Levalbuterol 7.5 mg/hr" as per asked by Robert.
|
|
;;
|
|
keywords: Called MLMs, Respiratory ORder Sert, ED
|
|
;;
|
|
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;
|
|
|
|
|
|
/*******************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;
|
|
ClientGuid:=this_communication.ClientGUID;
|
|
ClientChartGUID:=this_communication.ChartGUID;
|
|
|
|
//Associate Mapped Fields
|
|
SpecInst_fld := last of (field_list where field_list.DataItemName = "SpecialInstructions");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//*** Get values from First grid
|
|
//*** SA (Albuterol/Atrovent/Xopenex)
|
|
|
|
SAAAX_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 4);
|
|
SAAAX_list :=SAAAX_fld.Value;
|
|
SAAAX_Sel :=SAAAX_list.IsSelected;
|
|
|
|
Albuterol_1 := Last(First 1 from SAAAX_Sel);
|
|
Albuterol_2 := Last(First 2 from SAAAX_Sel);
|
|
Albuterol_Atrovent_1 := Last(First 3 from SAAAX_Sel);
|
|
Atrovent_1 := Last(First 4 from SAAAX_Sel);
|
|
Atrovent_2 := Last(First 5 from SAAAX_Sel);
|
|
Levalbuterol_1 := Last(First 6 from SAAAX_Sel);
|
|
Levalbuterol_2 := Last(First 7 from SAAAX_Sel);
|
|
|
|
|
|
//*** Get values from 2nd grid
|
|
//*** SA (Racepinephrine/Pulmicort)
|
|
|
|
SARP_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 12);
|
|
SARP_list :=SARP_fld.Value;
|
|
SARP_Sel :=SARP_list.IsSelected;
|
|
|
|
Race_1 := Last(First 1 from SARP_Sel);
|
|
Pulm_1 := Last(First 2 from SARP_Sel);
|
|
Pulm_2 := Last(First 3 from SARP_Sel);
|
|
|
|
//*** Get values from 3rd grid
|
|
//*** Spontaneous Aerosol Unspecified Dose
|
|
|
|
SAUD_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 8);
|
|
SAUD_list :=SAUD_fld.Value;
|
|
SAUD_Sel :=SAUD_list.IsSelected;
|
|
|
|
Albuterol_3 := Last(First 1 From SAUD_Sel);
|
|
Atrovent_3 := Last(First 2 From SAUD_Sel);
|
|
Lidocaine_1 := Last(First 3 From SAUD_Sel);
|
|
Mucomyst_1 := Last(First 4 From SAUD_Sel);
|
|
|
|
|
|
//*** Get values from 4th grid
|
|
//*** Continuous Bronchodilators
|
|
|
|
CB_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 6);
|
|
CB_list :=CB_fld.Value;
|
|
CB_Sel :=CB_list.IsSelected;
|
|
|
|
CB_Alb_10mg := Last(First 1 From CB_Sel);
|
|
CB_Alb_15mg := Last(First 2 From CB_Sel);
|
|
CB_Atr_1mg := Last(First 3 From CB_Sel);
|
|
CB_Xop_10mg := Last(First 4 From CB_Sel);
|
|
CB_Xop_15mg := Last(First 5 From CB_Sel);
|
|
CB_AlbAt_10mg := Last(First 6 From CB_Sel);
|
|
CB_AlbAt_15mg := Last(First 7 From CB_Sel);
|
|
|
|
//*** Get values from 5th grid
|
|
//*** Edumecation / Instruction
|
|
|
|
Edumecate_fld := last of (field_list where field_list.DataItemName = "MultiOrderGrid"
|
|
and field_List.Control_MultiFieldOccNum = 5);
|
|
Edumecate_list :=Edumecate_fld.Value;
|
|
Edumecate_Sel :=Edumecate_list.IsSelected;
|
|
|
|
|
|
Ed_Inst_1 := Last(First 1 from Edumecate_Sel);
|
|
Ed_Inst_2 := Last(First 2 from Edumecate_Sel);
|
|
|
|
ListSA_Text:="";
|
|
ListCB_Text:="";
|
|
|
|
Spec_All_Text :="";
|
|
|
|
// Now make the special instructions used for the beeper.
|
|
|
|
// SPONTANEOUS AEROSOLS
|
|
|
|
If (Albuterol_1 = True) or (Albuterol_2 = True) or (Albuterol_3 = True) then
|
|
Spontaneous:=True;
|
|
ListSA_Text := ListSA_Text || "Albuterol, ";
|
|
endif;
|
|
|
|
If (Albuterol_Atrovent_1) = True then
|
|
Spontaneous := True;
|
|
ListSA_Text := ListSa_Text || "Albuterol /Atrovent, ";
|
|
endif;
|
|
|
|
IF (Atrovent_1 =True) or (Atrovent_2 = True) or (Atrovent_3=True) then
|
|
Spontaneous:=True;
|
|
ListSA_Text := ListSA_Text || "Atrovent, ";
|
|
endif;
|
|
|
|
If (Levalbuterol_1 = True) or (Levalbuterol_2 = True) then
|
|
Spontaneous := True;
|
|
ListSA_Text := ListSA_Text || "Levalbuterol, ";
|
|
endif;
|
|
|
|
IF (Race_1 = True) then
|
|
Spontaneous := True;
|
|
ListSA_Text := ListSA_Text || "Racepinephrine, ";
|
|
endif;
|
|
|
|
IF (Pulm_1 = True) or (Pulm_2 =True) then
|
|
SPontaneous := True;
|
|
ListSA_Text := ListSA_Text || "Pulmicort, ";
|
|
endif;
|
|
|
|
If (Lidocaine_1 = True) then
|
|
SPontaneous := True;
|
|
ListSA_Text := ListSA_Text || "Lidocaine, ";
|
|
endif;
|
|
|
|
If (Mucomyst_1 = True) then
|
|
SPontaneous := True;
|
|
ListSA_Text := ListSA_Text || "Mucomyst, ";
|
|
endif;
|
|
|
|
// CONTINUOUS BRONCHODILATORS
|
|
|
|
If (CB_Alb_10mg) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Albuterol 10 mg/hr, ";
|
|
endif;
|
|
|
|
If (CB_Alb_15mg ) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Albuterol 15 mg/hr, ";
|
|
endif;
|
|
|
|
If (CB_Atr_1mg) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Atrovent 1 mg/hr, ";
|
|
endif;
|
|
|
|
If (CB_Xop_10mg ) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Levalbuterol 5 mg/hr, ";
|
|
endif;
|
|
|
|
If (CB_Xop_15mg ) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Levalbuterol 7.5 mg/hr, ";
|
|
endif;
|
|
|
|
|
|
If (CB_AlbAt_10mg ) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Albuterol 10 mg / Atrovent 1mg/hr, ";
|
|
endif;
|
|
|
|
If (CB_AlbAt_15mg ) = True then
|
|
ContBronc :=True;
|
|
ListCB_Text := ListCB_Text || "Albuterol 15 mg / Atrovent 1mg/hr, ";
|
|
endif;
|
|
|
|
|
|
If Spontaneous = True then
|
|
Spec_All_Text := Spec_All_Text || "SPONTANEOUS AEROSOL: " || ListSA_Text;
|
|
endif;
|
|
|
|
If ContBronc = True then
|
|
Spec_All_Text := Spec_All_Text || "CONT. BRONCHODILATOR: " || ListCB_Text;
|
|
endif;
|
|
|
|
// Add EDUmeCATION INSTRUCTIONS
|
|
|
|
If (Ed_Inst_1 = True) or (Ed_Inst_2=True) then
|
|
Spec_All_Text := Spec_All_Text || "EDUCATION";
|
|
endif;
|
|
|
|
SpecInst_fld.Value := Spec_All_Text;
|
|
|
|
|
|
/* Debugging Messages
|
|
this_communication.DisplayForm := "Yes";
|
|
this_communication.Message := "Grid one is " || Albuterol_1 || ", " ||
|
|
Albuterol_2 || ", " ||
|
|
Albuterol_Atrovent_1|| ", " ||
|
|
Atrovent_1|| ", " ||
|
|
Atrovent_2|| ", " ||
|
|
Xopenex_1 || ", " ||
|
|
Xopenex_2 ;
|
|
this_communication.MessageType := "Informational";
|
|
|
|
*/
|
|
;;
|
|
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:
|