Initial Checking with all 820 MLMs
This commit is contained in:
127
MLMStripper/bin/Debug/FORM/FORM_NUR_RESTRAINT.mlm
Normal file
127
MLMStripper/bin/Debug/FORM/FORM_NUR_RESTRAINT.mlm
Normal file
@@ -0,0 +1,127 @@
|
||||
maintenance:
|
||||
|
||||
title: Ordering: Prevent the selection of conflicting Isolation Types and require at least one type be selected;;
|
||||
mlmname: FORM_Nur_Restraint;;
|
||||
arden: version 2;;
|
||||
version: 4.50;;
|
||||
institution: St Clair Isolation Set MLM;;
|
||||
author: Don Warnick and Kathy Kennedy, Eclipsys Corp;;
|
||||
specialist: ;;
|
||||
date: 2006-11-07;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: Prevent the simultaneous slection of two conflicting Restraint Types and increments the Due at field value to 1 hr post initiated time
|
||||
;;
|
||||
|
||||
explanation: This MLM is called from the NUR_RestraintBehvMgt and NUR_RestraintMed Mgt restraint forms .
|
||||
If Restraint Type, "Physical" is selected, then the "Chemical" selection becomes unavailable and vice versa
|
||||
The Due At field value is 1 hr after the Initated Time
|
||||
|
||||
|
||||
;;
|
||||
keywords: Called MLMs, Form fields, Restraint
|
||||
;;
|
||||
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;
|
||||
|
||||
// 1. Hide the Chemical Restraint selection if a Physical Restraint is entered and vice versa
|
||||
// 2. Set the Due at time to 1 hour after the Initiated Time
|
||||
|
||||
physical := last of (field_list where field_list.DataItemName = "NUR_RestraintPhysicalType" );
|
||||
chemical := last of (field_list where field_list.DataItemName = "NUR_RestraintChemicalType" );
|
||||
initiated_date := last of (field_list where field_list.DataItemName = "NUR_Intiated Date" );
|
||||
initiated_time := last of (field_list where field_list.DataItemName = "NUR_Time" );
|
||||
due := last of (field_list where field_list.DataItemName = "NUR_Time2" );
|
||||
continuation_date := last of (field_list where field_list.DataItemName = "NUR_Requested Date" );
|
||||
continuation_time := last of (field_list where field_list.DataItemName = "NUR_Time3" );
|
||||
requested_date := last of (field_list where field_list.DataItemName = "RequestedDate");
|
||||
|
||||
If this_communication.CALLINGEVENT = "FormOpen" then
|
||||
if exists initiated_date.value then
|
||||
initiated_date.control_read_only := true;
|
||||
initiated_time.control_read_only := true;
|
||||
continuation_date.Value := requested_date.value;
|
||||
continuation_time.Value := "";
|
||||
continuation_date.control_read_only := false;
|
||||
continuation_time.control_read_only := false;
|
||||
continuation_date.control_mandatory := True;
|
||||
continuation_time.control_mandatory := True;
|
||||
due.control_read_only := true;
|
||||
physical.control_read_only := true;
|
||||
chemical.control_read_only := true;
|
||||
physical.control_mandatory := false;
|
||||
chemical.control_mandatory := false;
|
||||
else
|
||||
initiated_date.value := requested_date.value;
|
||||
continuation_date.control_mandatory := false;
|
||||
continuation_time.control_mandatory := false;
|
||||
continuation_date.control_read_only := true;
|
||||
continuation_time.control_read_only := true;
|
||||
endif;
|
||||
else
|
||||
|
||||
If initiated_time.value is null
|
||||
then
|
||||
due.value := "";
|
||||
else
|
||||
initiated_plus_1:=(initiated_time.value as time) + 1 hour;
|
||||
due.Value:= Hour of initiated_plus_1|| ":" || Minute of initiated_plus_1;
|
||||
endif;
|
||||
|
||||
If physical.value is not null
|
||||
then
|
||||
chemical.control_read_only := True;
|
||||
chemical.control_mandatory := False;
|
||||
else
|
||||
chemical.control_read_only := False;
|
||||
chemical.control_mandatory := True;
|
||||
endif;
|
||||
|
||||
If chemical.value is not null
|
||||
then
|
||||
physical.control_read_only := True;
|
||||
physical.control_mandatory := False;
|
||||
else
|
||||
physical.control_read_only := False;
|
||||
physical.control_mandatory := True;
|
||||
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:
|
||||
Reference in New Issue
Block a user