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

107 lines
3.2 KiB
Plaintext

maintenance:
title: FORM_SET_PEDIATRIC_IV_RATE;;
mlmname: FORM_SET_PEDIATRIC_IV_RATE;;
arden: version 2.5;;
version: 5.50;;
institution: St Clair Hospital;;
author: Don Warnick, Allscripts ;;
specialist: Bryan Berkeybile, Allscripts;;
date: 2013-08-02;;
validation: testing;;
library:
purpose:
;;
explanation: This MLM is called from the IV Fluid Order Set, Pediatric IV Bolus grid. The MLM updates
the rate field on the IV Infusion Orders form with 20x the most recent patient weight in kg.
We needed to add the MLM_From Order Set field to the OS and form to make the value visible
in the grid.
Change history
2013.08.02 DJW CSR 13570 Created
;;
keywords: Called MLMs
;;
knowledge:
type: data-driven;;
data:
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
include standard_libs;
using "ObjectsPlusXA.SCM.Forms";
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
// 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;
ChartGuid := this_communication.ChartGUID;
FormName := this_form.Name;
//Retrieve Fields
IV := last of (field_list where field_list.DataItemName = "MultiOrderGrid" AND field_list.Control_MultiFieldOccNum = 2);
IV_List := IV.Value;
CombinedMeasurements := first of (field_list WHERE field_list.DataItemName = "CombinedMeasurements");
CombinedMeasurements_fld := CombinedMeasurements.Value;
patient_weight := CombinedMeasurements_fld.Weight;
if (CallingEvent = "FieldChange")
then
If (CallingField = "CombinedMeasurements|1")
then
if (patient_weight > 0)
then
IV_List.IsReadOnly := (false);
endif;
elseif (CallingField = "Multiordergrid|2") and (patient_weight = 0)
then
IV_List.IsReadOnly := (true);
IV_List.IsSelected := (false);
dialogResult := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with "\n Please enter a calculation weight for this patient. ", "Error","OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}};
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: