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

102 lines
3.5 KiB
Plaintext

maintenance:
title: RX Haz Waste Disposal Instructions;;
filename: FORM_Rx_HazWaste_DispInstruct;;
arden: version 2.5;;
version: 6.10;;
institution: St. Clair Hospital;;
author: Teresa Spicuzza, Allscripts;;
specialist: ;;
date: 2014-08-05;;
validation: testing;;
library:
purpose: This MLM copies waste disposal instructions into the info box.
;;
explanation: This MLM takes the waste disposal code from the class type and copies the appropriate instructions
to the instruction field of the order.
Change History
08/05/2014 TMS Created MLM to populate Hazardous Waste disposal info to hidden field
on form. This will only display with the task and on the special notes
tab on veriscan to provide user administering medication with instructions
for Stericycle disposal method. Called from Form_Now_and_Then mlm
Go live Date of 12/9/2014 CSR 31995
;;
keywords: Called MLMs, Waste Disposal Code, Stericycle ;;
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;
OrderCatalogItemGUID := this_Communication.ItemID;
Instructions_field := last of (field_list where field_list.DataItemName = "PRX_HazDisposalMessage");
Instructions_value := Instructions_field.value;
Waste_Code:= Read Last
{" SELECT CV3CatalogClassTypeValue.Value FROM
CV3CatalogClassTypeValue INNER JOIN"
|| " CV3ClassType ON CV3CatalogClassTypeValue.ClassTypeGUID =
CV3ClassType.GUID"
|| " WHERE CV3ClassType.Code = {{{SINGLE-QUOTE}}}PRX_Haz-Waste-Disp-Sort-Code{{{SINGLE-QUOTE}}} AND
CV3CatalogClassTypeValue.CatalogMasterGUID = " || SQL(OrderCatalogItemGUID)};
If exists Instructions_field and waste_code is not null then
If waste_code = "BKC" then
Waste_info := "If any medication remains dispose of container in LARGE BLACK Waste Bin - NO Empty Containers";
Instructions_field.value := waste_info;
elseif waste_code = "BKSC" then
Waste_info := "If any medication remains dispose of container in BLACK SHARPS Bin - NO Empty Containers";
Instructions_field.value := waste_info;
elseif waste_code = "SPPM" then
Waste_info := "Place Partial or Empty Container/Wrapper in baggie and in ORANGE return to Pharmacy bin.";
Instructions_field.value := waste_info;
elseif waste_code = "SP" then
Waste_info := "If any medication remains place container in baggie and in ORANGE return to Pharmacy bin - NO Empty Containers";
Instructions_field.value := waste_info;
elseif waste_code = "SPNP" then
Waste_info := "Place Nicotine Patch adhesive backing in baggie and in ORANGE return to Pharmacy bin.";
Instructions_field.value := waste_info;
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: