Files
St.Clair/MLMStripper/bin/Debug/FORM/FORM_SET_NEWBORN_PROFILE_ADMISSION.mlm

216 lines
7.6 KiB
Plaintext

maintenance:
title: NewBorn Profile Admission Order Set;;
mlmname: FORM_Set_NewBorn_Profile_Admission;;
arden: version 2;;
version: 4.50;;
institution: St Clair Admissions;;
author: Robert Spence, Eclipsys Corp Ext 7461;;
specialist: Peggy Karish, Eclipsys Corp ext 7441;;
date: 2008-04-10;;
validation: testing;;
library:
purpose: Used for grids that perform all true or no risk
;;
explanation: This MLM is called from the Patient Profile- NewBorn Admission Orders
;;
keywords: Called MLMs, Respiratory ORder Set, New Born Admission
;;
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;
If CallingField = "MultiOrderCheckBox|2" then
NoRisk := "No Discharge Risk Criteria";
OccNumber := 2;
Elseif CallingField = "MultiOrderCheckBox|9" then
NoRisk := "No Pediatric Nutritional Risk";
OccNumber := 9;
Elseif CallingField = "MultiOrderCheckBox|7" then
NoRisk := "No Parent Smoking Risk";
OccNumber := 7;
endif;
// Now do True and false logic for EVERY grid on this form
//Get the multi order grid check box value
Grid_fld := last of (field_list where field_list.DataItemName = "MultiOrderCheckBox"
and field_List.Control_MultiFieldOccNum = OccNumber);
Grid_list :=Grid_fld.Value;
Grid_SelList := Grid_List.IsSelected;
Found_NoRisk:= First of (Grid_list where Grid_list.Name = NoRisk );
ListMembs:= count Grid_SelList;
AllButNo:= ();
FalseList := ();
TrueList := ();
for k in (1 seqto (ListMembs-1)) do
AllButNo:= AllButNo, Grid_SelList[k];
FalseList := FalseList,False;
TrueList := TrueList ,True;
enddo;
OneOfRest := true in AllButNo;
If Found_NoRisk.IsSelected = True then
Grid_List.IsSelected:= FalseList , True;
Grid_List.IsReadOnly:= TrueList , False;
endif;
If (Found_NoRisk.IsSelected = False) and (OneOfRest = False) then // deselected No Risk
Grid_List.IsSelected := FalseList , False;
Grid_List.IsReadOnly := FalseList , False;
Endif;
If (OneOfRest = True) and (Found_NoRisk.IsSelected = False) then
Found_NoRisk.IsSelected := False;
Found_NoRisk.IsReadOnly := True;
endif;
/////////////////////////////////////////////////////////////////////////////////////////////////////
// Now for the extras per grid //
/////////////////////////////////////////////
If CallingField = "MultiOrderCheckBox|7" then
SmokeCon_fld := last of (field_list where field_list.DataItemName = "MultiOrderCheckBox"
and field_List.Control_MultiFieldOccNum = 5);
SmokeCon_list :=SmokeCon_fld.Value;
Found_SmokeConOrder:= first of (SmokeCon_list where SmokeCon_list.Name = "Pulmonary Health Education Consult");
Smoke_Comment := last of (field_list where field_list.DataItemName = "NUR_Comment 3");
Smoke_ConReason := last of (field_list where field_list.DataItemName = "RESP Pulmonary Health Education");
PrevUseToB_Fld := last of (field_list where field_list.DataItemName = "NUR_CheckBox 4");
PrevUseToB_Value := PrevUseToB_Fld.Value;
PrevLess12_Fld := last of (field_list where field_list.DataItemName = "NUR_CheckBox 5");
PrevLess12_Value:= PrevLess12_Fld.Value;
If Found_NoRisk.IsSelected = True then
Smoke_Comment.Value := "";
Smoke_ConReason := " ";
Smoke_ConReason := "";
endif;
Found_UTBOrder:= first of (Grid_list where Grid_list.Name = "Parent Uses Tobacco");
UTB_Selected:= Found_UTBOrder.IsSelected;
Found_Less12Order := first of (Grid_list where Grid_list.Name = "Parent Quit Tobacco- Last 12 months");
Less12_Selected := Found_Less12Order.IsSelected;
If Less12_Selected = PrevLess12_Value then
Robert:="KEWL";
Else
If Less12_Selected = True then
Found_UTBOrder.IsReadOnly := True;
Found_SmokeConOrder.IsSelected := True;
Found_SmokeConOrder.IsReadOnly := True;
Smoke_Comment.Value := "By selecting Smoking Risk Order- an order for a Pulmonary Health Education Consult (Quit Smoking in Last 12 Months) has automatically been created";
Smoke_ConReason.Value := "Quit Smoking in Last 12 Months";
Else
Found_UTBOrder.IsReadOnly := False;
Found_SmokeConOrder.IsSelected := False;
Found_SmokeConOrder.IsReadOnly := False;
Smoke_Comment.Value := "By deselecting Smoking Risk Order- an order for a Pulmonary Health Education Consult (Quit Smoking in Last 12 Months) has automatically been removed";
Smoke_ConReason.Value := "";
Endif;
PrevLess12_Fld.Value:= Less12_Selected;
endif;
If UTB_Selected = PrevUseToB_Value then
Robert := "Still KEWL";
Else
If UTB_Selected = True then
Found_Less12Order.IsReadOnly := True;
Found_SmokeConOrder.IsSelected := True;
Found_SmokeConOrder.IsReadOnly := True;
Smoke_Comment.Value := "By selecting Smoking Risk Order- an order for a Pulmonary Health Education Consult (Smoking Cessation) has automatically been created";
Smoke_ConReason.Value := "Smoking Cessation";
Else
Found_Less12Order.IsReadonly := False;
Found_SmokeConOrder.IsSelected := False;
Found_SmokeConOrder.IsReadOnly := False;
Smoke_Comment.Value := "By deselecting Smoking Risk Order- an order for a Pulmonary Health Education Consult (Smoking Cessation) has automatically been removed";
Smoke_ConReason.Value := "";
Endif;
PrevUseToB_Fld.Value := UTB_Selected;
endif;
Elseif CallingField = "MultiOrderCheckBox|9" then
LactCon_fld := last of (field_list where field_list.DataItemName = "MultiOrderCheckBox"
and field_List.Control_MultiFieldOccNum = 5);
LactCon_list :=LactCon_fld.Value;
Found_LacConOrder:= first of (LactCon_list where LactCon_list.Name = "Lactation Consult");
Nutrition_Comment:= last of (field_list where field_list.DataItemName = "NUR_Comment 4");
Found_Breast:= first of (Grid_list where Grid_list.Name = "Breastfeeding - Newborn");
Found_Breast_Selected:= Found_Breast.IsSelected;
if Found_Breast_Selected = True then
Found_LacConOrder.IsSelected := True;
Found_LacConOrder.IsReadOnly := True;
Nutrition_Comment.Value := "By selecting Breastfeeding - Newborn, an order for a Lactation Consult has automatically been created";
else
Found_LacConOrder.IsSelected := False;
Found_LacConOrder.IsReadOnly := False;
Nutrition_Comment.Value := "By deselecting Breastfeeding - Newborn, an order for a Lactation Consult has automatically been removed";
endif;
endif;
/* this_communication.DisplayForm := "Yes";
this_communication.Message := "One Of Rest Selection is " || OneOfRest|| "\n\n" ||
"NoRisk Select" || Found_NoRisk.IsSelected || "\n\n" ||
"NoRisk Value " || Found_NoRisk.Value;
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: