119 lines
3.7 KiB
Plaintext
119 lines
3.7 KiB
Plaintext
maintenance:
|
|
|
|
title: BB product mandatory Surg proc or Trans ind;;
|
|
filename: FORM_LAB_TDM;;
|
|
arden: version 2;;
|
|
version: 4.50;;
|
|
institution: Eclipsys, System MLM;;
|
|
author: Teresa Spicuzza and Beth Hilty;;
|
|
specialist: ;;
|
|
date: 2006-03-01;;
|
|
validation: testing;;
|
|
library:
|
|
purpose: This MLM removes the mandatory from the Last Dose and Time fields when the Unknown Last Dose checkbox is selected.
|
|
|
|
;;
|
|
explanation: This MLM takes the data sent to CDS from Med order form fields in the Forms and
|
|
Communications objects and compares it to Client Information to determine whether to display
|
|
certain fields and make them mandatory.
|
|
|
|
A Banner message is presented to the user to remind them that these fields must be
|
|
completed.
|
|
|
|
If the patient data does not meet the above conditions the fields are not visible on
|
|
the form.
|
|
|
|
The MLM is not run from a trigger event, but rather is called by the application.
|
|
It should be configured to run on Form Open.
|
|
|
|
;;
|
|
keywords: Called MLMs, Form fields
|
|
;;
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
// This removes the mandatory control on the field dataitem - LAB_Chem_Date_TDM and LAB_Chem_Time_TDM
|
|
|
|
Last_Dose_Date_field := first of (field_list
|
|
where field_list.DataItemName = "LAB_Chem_Date_TDM");
|
|
Last_Dose_Time_field := first of (field_list
|
|
where field_list.DataItemName = "LAB_Chem_Time_TDM");
|
|
Unknown_Dose_field := last of (field_list
|
|
where field_list.DataItemName = "LAB_Chem_CB_TDM");
|
|
If exists Unknown_Dose_field and Unknown_Dose_field.value=TRUE
|
|
|
|
then
|
|
Last_Dose_Date_label := Last_Dose_Date_field.label;
|
|
Last_Dose_Date_field.control_mandatory := FALSE;
|
|
Last_Dose_Time_field.control_mandatory := FALSE;
|
|
|
|
endif;
|
|
// If Indication in Surgery then
|
|
|
|
// If Indication = "Product for Surgery" then
|
|
// Surg_Proc_field.control_visible := TRUE;
|
|
// Surg_Proc_field.control_mandatory := TRUE;
|
|
// Trans_Ind_field.value := "";
|
|
// Trans_Ind_field.control_visible := FALSE;
|
|
// Trans_Ind_field.control_mandatory := FALSE;
|
|
// else
|
|
//
|
|
// If Indication in Transfusion then
|
|
// Trans_Ind_field.control_visible := TRUE;
|
|
// Trans_Ind_field.control_mandatory := TRUE;
|
|
// Surg_Proc_field.value := Blank;
|
|
// Surg_Proc_field.control_visible := FALSE;
|
|
// Surg_Proc_field.control_mandatory := FALSE;
|
|
// endif;
|
|
// endif;
|
|
// if Indication = NULL then
|
|
// Surg_Proc_field.control_mandatory := FALSE;
|
|
// Trans_Ind_field.control_mandatory := FALSE;
|
|
// endif;
|
|
|
|
|
|
|
|
|
|
;;
|
|
|
|
evoke: // No evoke statement
|
|
;;
|
|
logic:
|
|
|
|
conclude true;
|
|
;;
|
|
action:
|
|
// This MLM returns one parameters, of type form_type.
|
|
return this_communication, this_form;
|
|
;;
|
|
end:
|