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,145 @@
maintenance:
title: Pediatric Acetaminophen Dosing Message;;
mlmname: FORM_Rx_Pediatric_Acetaminophen;;
arden: version 2.5;;
version: 5.50;;
institution: St Clair Hospital;;
author: Teresa Spicuzza, Allscripts ;;
specialist: Teresa Spicuzza, Allscripts;;
date: 2011-11-18;;
validation: testing;;
library:
purpose: Used for displaying correct recommended daily dosage of acetaminophen
;;
explanation: This MLM is called from PRX forms that are attached to orders containing acetaminophen.
Change history
04.03.2012 TMS Change informational message for maximum dose for pediatric patients based upon
patient weight and age. Created for CSR 26905
01.30.2013 TMS Changed call to "Form_HoldOrder_RequestedTime" MLM to be on FormOpen only. That MLM
has been updated with additional logic for Now and Then dosing that must be initiated
even if the order is not in a hold session. CSR 26926
07.23.2013 TMS Change informational message for maximum dose for non pediatric patients to 3gms for
all orders except IV acetaminophen which remains at 4gms. CSR 30976
10.09.2013 TMS Change informational message for maximum dose for pediatric patients from 90mg/kg/day to
75mg/kg/day. HD Ticket 161277
04.11.2017 TMS Changed MLM to be called from "Form_HoldOrder_RequestedTime" to keep calls on FormOpen
from one {{{SINGLE-QUOTE}}}master{{{SINGLE-QUOTE}}} MLM, being done in preparation for using hidden default dosing CSR 35364.
;;
keywords: Called MLMs, Acetaminophen, pediatric dosing
;;
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;
Order_Name := this_communication.PrimaryObj.Name;
comm_obj := this_communication.primaryobj;
called_by := this_communication.CallingEvent;
call_field := this_communication.CallingFieldName;
session_type := comm_obj.internalprocessingtype;
CR := 13 formatted with "%c";
LF := 10 formatted with "%c";
CRLF:= CR||LF;
Note_fld := last of (field_list where field_list.DataItemName = "PRX_NOTECOMMENT0");
Ped_message := "Do not exceed maximum pediatric Acetaminophen dose of 75mg/kg/24 hours from all sources.";
Std_message := "Do not exceed 3gm of Acetaminophen daily from oral/rectal sources." || CRLF ||
"As of July 2013, total daily acetaminophen dose is now 3gm/day per Med Exec.";
nomessage := " ";
// if hold session set requested time to scheduled/start time with no time specified
// if not hold session call MLM for other "start now logic"
// if called_by ="FormOpen" and session_type = "Hold" then
// if called_by ="FormOpen" then
// HoldOrder := MLM {{{SINGLE-QUOTE}}}Form_HoldOrder_RequestedTime{{{SINGLE-QUOTE}}};
// (this_communication, this_form) := call HoldOrder with this_communication, this_form, client_info_obj;
// endif;
If Order_name matches pattern "%Acetaminophen%" then
Ped_message := "Do not exceed maximum pediatric Acetaminophen dose of 75mg/kg/24 hours from all sources.";
If Order_name matches pattern "% Inj" then
Std_message := "Do not exceed 4gm of Acetaminophen daily from all sources.";
else
Std_message := "Do not exceed 3gm of Acetaminophen daily from oral/rectal sources." || CRLF ||
"As of July 2013, total daily acetaminophen dose is now 3gm/day per Med Exec.";
endif;
WeightValue, obsname := read last {"Select o.ValueText, oci.name from CV3ClientDocumentcur cd "
|| " join CV3ClientDocDetailcur cdd on (cdd.ClientDocumentGUID = cd.GUID AND cdd.ClientGUID = " || SQL(ClientGuid) || ") "
|| " join CV3ObservationDocumentcur od on cdd.CLientDocumentGUID = od.OwnerGUID and od.active = 1 "
|| " join CV3ObsCatalogMasterItem on od.ObsMasterItemGUID = CV3ObsCatalogMasterItem.GUID "
|| " join CV3Observationcur o on o.GUID = od.ObservationGUID "
|| " LEFT OUTER JOIN CV3User u ON o.UserGUID = u.GUID "
|| " join cv3obscatalogitem oci on oci.guid = o.obsitemguid and oci.name in ({{{SINGLE-QUOTE}}}Weight in kg - Peds{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}Weight - kg{{{SINGLE-QUOTE}}})"
|| " where cd.clientguid = " || SQL(ClientGuid) || " and cd.chartguid = " || SQL(ChartGuid)
|| " and o.ValueText is not null "
|| " order by cd.authoreddtm asc " };
if exists (client_info_obj) then
(birthdate,dobM,dobD,dobY) := read last {ClientInfo: BirthDate, BirthMonthNum, BirthDayNum, BirthYearNum
REFERENCING client_info_obj};
endif;
patientAge := (NOW - birthdate) / (1 year);
if (patientAge < 18.00) and (((weightvalue as number) <= 43.2) or (weightvalue is null)) then
Note_fld.value := Ped_message;
else
Note_fld.value := Std_message;
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: