Initial Checking with all 820 MLMs

This commit is contained in:
2020-02-02 00:54:01 -05:00
parent c59dc6de2e
commit 840d0432f4
828 changed files with 239162 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
maintenance:
title: FORM_SET_FBC_POSTPARTUM_ORDERS;;
mlmname: FORM_SET_FBC_POSTPARTUM_ORDERS;;
arden: version 2.5;;
version: 6.10;;
institution: St. Clair Hospital;;
author: Juliet M Law, Allscripts x7461;;
specialist: Peggy Karish, Allscripts ext 7441;;
date: 2014-10-09;;
validation: testing;;
library:
purpose: Automatically select nursing instruction order based on prescence of lab result on mother.
;;
explanation: This MLM is called from the FBC Postpartum Order Set. On Form open, based on the existence and result of
the Type and Screen lab RH Negative result on the mother, the appropriate nursing isntruction will be selected.
;;
keywords: Called MLMs, FBC, Postpartum, RH Negative
;;
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;
client_guid := this_communication.ClientGUID;
visit_guid := this_communication.ClientVisitGUID;
chart_guid := this_communication.ChartGUID;
pObj := this_communication.PrimaryObj;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
//Retrieve relevant form fields
Nurse_Instr := last of ( field_list WHERE field_list.DataItemName = "MultiOrderGrid"
AND field_list.Control_MultiFieldOccNum = 15 );
Nurse_Instr_Val := Nurse_Instr.Value;
RH_Nurse_Instr := Nurse_Instr_Val[3];
//Fire on Form Open event
if ( CallingEvent = "FormOpen" ) then
//Retrieve RH Negative result from Type and Screen lab
rh_result := read last {"SELECT IsNull(tol.Text,{{{SINGLE-QUOTE}}}{{{SINGLE-QUOTE}}})"
|| " FROM CV3ClientVisit cv WITH (NOLOCK) JOIN CV3Order o WITH (NOLOCK)"
|| " ON cv.ClientGUID = o.ClientGUID"
|| " AND cv.GUID = o.ClientVisitGUID"
|| " AND cv.ChartGUID = o.ChartGUID"
|| " JOIN CV3BasicObservation bo WITH (NOLOCK) ON o.GUID = bo.OrderGUID"
|| " and o.ClientGUID = bo.ClientGUID "
|| " and o.ClientVisitGUID = bo.ClientVisitGUID"
|| " and o.ChartGUID = bo.ChartGUID"
|| " LEFT JOIN CV3TextualObservationLine tol WITH (NOLOCK) ON bo.GUID = tol.ObservationGUID"
|| " AND bo.ClientGUID = tol.ClientGUID"
|| " JOIN CV3OrderCatalogMasterItem om WITH (NOLOCK) ON o.OrderCatalogMasterItemGUID = om.GUID"
|| " JOIN CV3OrganizationalUnit org WITH (NOLOCK) ON om.OrgUnitGUID = org.GUID"
|| " AND org.Name = {{{SINGLE-QUOTE}}}Blood Bank{{{SINGLE-QUOTE}}}"
|| " JOIN CV3OrderStatusHistory oshentr WITH (NOLOCK) ON o.GUID = oshentr.OrderGUID"
|| " AND o.ClientGUID = oshentr.ClientGUID"
|| " AND oshentr.OrderStatusCode = {{{SINGLE-QUOTE}}}RESF{{{SINGLE-QUOTE}}}"
|| " WHERE cv.ClientGUID = " || Sql(client_guid)
|| " AND cv.GUID = " || Sql(visit_guid)
|| " AND cv.ChartGUID = " || Sql(chart_guid)
|| " AND ( o.name = {{{SINGLE-QUOTE}}}Type and Screen{{{SINGLE-QUOTE}}} OR o.Name = {{{SINGLE-QUOTE}}}Blood Type{{{SINGLE-QUOTE}}} )"
|| " AND bo.ItemName = {{{SINGLE-QUOTE}}}Blood Type (ABO/RH){{{SINGLE-QUOTE}}}"};
//If Blood Type is NEGATIVE, then automatically check nursing instruction
if ( rh_result matches pattern "%NEGATIVE" ) then
RH_Nurse_Instr.IsSelected := true;
else
RH_Nurse_Instr.IsSelected := false;
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: