Initial Checking with all 820 MLMs
This commit is contained in:
156
MLMStripper/bin/Debug/FORM/FORM_CHG_PERFLOCATION.mlm
Normal file
156
MLMStripper/bin/Debug/FORM/FORM_CHG_PERFLOCATION.mlm
Normal file
@@ -0,0 +1,156 @@
|
||||
maintenance:
|
||||
|
||||
title: Charging: If we select override billing location show more items;;
|
||||
mlmname: FORM_CHG_PerfLocation;;
|
||||
arden: version 2;;
|
||||
version: 4.50;;
|
||||
institution: St Clair Charger MLM;;
|
||||
author: Robert Spence, Eclipsys Corp;;
|
||||
specialist: ;;
|
||||
date: 2006-03-31;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: This MLM sets the field PRN Reason text to visible and mandatory if IsPRN true.
|
||||
|
||||
;;
|
||||
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, PRN, PRN Reason text
|
||||
;;
|
||||
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;
|
||||
CallingField :=this_communication.CallingFieldName;
|
||||
CallingEvent := this_communication.CallingEvent;
|
||||
FormType := this_communication.FormType;
|
||||
|
||||
|
||||
// This sets the visible control on the field dataitem - CHG_OVERRIDE_WITH
|
||||
OverRideLoc_field := last of (field_list
|
||||
where field_list.DataItemName = "CHG_OR_LOC" );
|
||||
|
||||
PerfLoc_field := last of (field_list
|
||||
where field_list.DataItemName = "CHG_PerfLoc" );
|
||||
|
||||
Notes_field := last of (field_list
|
||||
where field_list.DataItemName = "CHG_Comment");
|
||||
|
||||
ORWith_field := last of (field_list
|
||||
where field_list.DataItemName = "CHG_OR_WITH");
|
||||
|
||||
SetID_field := last of (field_list
|
||||
where field_list.DataItemName = "CHG_RS_SETID");
|
||||
|
||||
// this_communication.DisplayForm := "Yes";
|
||||
// this_communication.Message := "MLM Field :" || CallingField || "\n" ||
|
||||
// "MLM Event :" || CallingEvent || "\n" ||
|
||||
// "Form type :" || FormType;
|
||||
// this_communication.MessageType := "Informational";
|
||||
|
||||
|
||||
If CallingEvent="FormOpen"
|
||||
then
|
||||
If FormType ="OrderSet"
|
||||
then
|
||||
ClientGuid:=this_communication.ClientGUID;
|
||||
ClientVisitGUID:=this_communication.ClientVisitGUID;
|
||||
|
||||
//Retrieve Patient{{{SINGLE-QUOTE}}}s Current Location
|
||||
CurrLocation:= read last
|
||||
{"SELECT currentlocation "
|
||||
|| " FROM cv3clientvisit "
|
||||
|| " WHERE ClientGUID = " || SQL(ClientGuid)
|
||||
|| " And GUID = " || SQL(ClientVisitGUID)};
|
||||
|
||||
ORWith_field.Value :=CurrLocation;
|
||||
Notes_field.value :="Billing Location: " || ORWith_field.Value;
|
||||
elseif FormType = "Order"
|
||||
then
|
||||
If SetID_field.Value = False
|
||||
then
|
||||
ClientGuid:=this_communication.ClientGUID;
|
||||
ClientVisitGUID:=this_communication.ClientVisitGUID;
|
||||
|
||||
CurrLocation:= read last
|
||||
{"SELECT currentlocation "
|
||||
|| " FROM cv3clientvisit "
|
||||
|| " WHERE ClientGUID = " || SQL(ClientGuid)
|
||||
|| " And GUID = " || SQL(ClientVisitGUID)};
|
||||
|
||||
ORWith_field.Value :=CurrLocation;
|
||||
Notes_field.value :="Billing Location: " || ORWith_field.Value;
|
||||
endif;
|
||||
endif;
|
||||
elseif CallingEvent = "FieldChange"
|
||||
then
|
||||
If OverRideLoc_field.value=true
|
||||
then
|
||||
If (PerfLoc_field.value = "") or (PerfLoc_field.value is null)
|
||||
then
|
||||
PerfLoc_field.control_Visible:=TRUE;
|
||||
else
|
||||
Notes_field.value :="Billing Location: " || PerfLoc_field.value;
|
||||
endif;
|
||||
else
|
||||
PerfLoc_field.control_Visible:=False;
|
||||
PerfLoc_field.value:="";
|
||||
|
||||
If ORWith_field.value is not null
|
||||
then
|
||||
Notes_field.value :="Billing Location: " || ORWith_field.Value;
|
||||
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:
|
||||
Reference in New Issue
Block a user