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,327 @@
maintenance:
title: St.Clair Direct info to AdminInstructions;;
mlmname: FORM_Direct_Info_to_AdminInstructions;;
arden: version 2;;
version: 4.50;;
institution: St Clair Hospital;;
author: Claudia Benson, Claudia.Benson@stclair.org, (412) 942-1307;;
specialist: Eclipsys Corporation;;
date: 2006-10-11;;
validation: testing;;
library:
purpose: To add selected meds to the Comments field
;;
explanation: This generic MLM can be called from several order forms:
- RESP SA IPPB
- RESP Contin Bronch
- RESP Med-Artif Airwy
- RESP Spont Aerosol
- (others?)
If a particular form is used, specified in the configuration list below, then other
field labels and values, also in the list, will be made appended to the Administration
Instructions.
Change History
03.27.2007 DW Added to Atrovent 0.25 list of meds that are added to Admin Instructions field
05.22.2008 DW Added RESP_Arformoterol 15mcg to list of meds that are added to Admin Instructions field
05.28.2008 DW Added Arfomoterol, Racepinephrine, and Pulmocort 1 mg to the Administration Instructions
08.27.2008 RS Added logic to summarize data to the field MLM_Manual Rep Forms for Resp Page instructions
02.21.2013 TMS Added logic to clear stop after field for one time and STAT frequencies. CSR 26557
01.14.2015 TMS Added new form map for "RESP Spont Aerosol" CSR 32176
09.26.2016 JML CSR 33723: Changed all wording references from {{{SINGLE-QUOTE}}}Xopenex{{{SINGLE-QUOTE}}} to {{{SINGLE-QUOTE}}}Levalbuterol{{{SINGLE-QUOTE}}}
04.07.2017 JML CSR 34699: Added new Levalbuterol data items to Continuous Bronchodilator OS
Rules:
Trigger on formopen or fieldchange.
Use list of
forms,
delimiter to be used between appended values,
fields to append to the Admin Instructions.
This MLM calls 2 other MLMs:
UTIL_STRING_PARSE: A utility for parsing the config list of forms and fields.
FORM_GENERIC_Display: A form-called MLM for displaying other, dependent fields.
;;
keywords: Called MLMs, Form fields, Respiratory Meds
;;
knowledge:
type: data-driven;;
data:
/***********************Make Changes To Spelling And Flags In This Section***********************/
//NOTE: THE RELATIVE ORDER OF ITEMS MUST BE MAINTAINED WITHIN LISTS!!!
//MUST HAVE THE FOLLOWING ORDER FOR EACH ELEMENT ITEM:
//"FORM_NAME|DELIMITER|FIELDS_TO_APPEND_TO_ADMIN_INSTRUCTIONS"
form_map_list :=
("RESP SA IPPB|:|RESP_Albuterol 2.5mg/3ml NSS,RESP_Arformoterol 15mcg,RESP_Albuterol 1.25mg/3ml NSS,"||
"RESP_Albuterol Dose,RESP_Alupent 0.2mg/2.5ml NSS,RESP_Alupent 0.3mg/2.5ml NSS,"||
"RESP_Atrovent 0.25 mg/3 ml NSS,RESP_Atrovent 0.5mg/3ml NSS,RESP_Atrovent Dose,RESP_Lidocaine Volume,"||
"RESP_Mucomyst volume,RESP_Mucomyst %,RESP_NSS 2.5cc,RESP_NSS 3cc,RESP NSS amount,RESP_Pentamidine 600mg,"||
"RESP_Pentamidine Dose,RESP_Pulmicort 0.5mg,RESP_Pulmicort 1mg,"||
"RESP_Racepinephrine 0.5ml (Vaponephrine),RESP_Xopenex,RESP_Xopenex 0.63mg/3ml NSS,"||
//(20070110) Change requested by Claudia Benson: remove "IsPRN,RESP_PRN" from admin instruc.
// "RESP_Xopenex 1.25mg/3ml NSS,IsPRN,RESP_PRN Reasons,UseWakingHourOnly"
"RESP_Xopenex 1.25mg/3ml NSS,UseWakingHourOnly"
//End of change (20070110)
,"RESP Contin Bronch|:|RESP_Albuterol 10mg/hr,RESP_Albuterol Dose- mg/hr,RESP_Albuterol 15mg/hr,"||
"RESP_Atrovent mg/hr,RESP_Atrovent 1 mg/hr,RESP_Xopenex 5 mg/hr,RESP_Xopenex 7.5mg/hr"
,"RESP Spont Aerosol|:|RESP_Albuterol 2.5mg/3ml NSS,RESP_Arformoterol 15mcg,RESP_Albuterol 1.25mg/3ml NSS,"||
"RESP_Albuterol Dose,RESP_Alupent 0.2mg/2.5ml NSS,RESP_Alupent 0.3mg/2.5ml NSS,"||
"RESP_Atrovent 0.25 mg/3 ml NSS,RESP_Atrovent 0.5mg/3ml NSS,RESP_Atrovent Dose,RESP_Lidocaine Volume,"||
"RESP_Mucomyst volume,RESP_Mucomyst %,RESP_NSS 2.5cc,RESP_NSS 3cc,RESP NSS amount,RESP_Pentamidine 600mg,"||
"RESP_Pentamidine Dose,RESP_Pulmicort 0.5mg,RESP_Pulmicort 1mg,"||
"RESP_Racepinephrine 0.5ml (Vaponephrine),RESP_Xopenex,RESP_Xopenex 0.63mg/3ml NSS,"||
"RESP_Xopenex 1.25mg/3ml NSS,UseWakingHourOnly"
,"RESP Med-Artif Airwy|:|RESP_Mucomyst volume,RESP NSS amount,Resp Instruction_Lines5"
,"YOUR_FORM_NAME_HERE|YOUR_DELIM|APPEND_FIELD_1,APPEND_FIELD_2,APPEND_FIELD_3,...etc."
);
// data item name for Admin Instructions
admin_instr_din := "AdminInstructions";
OneTimeFreq := ("STAT", "ONCE");
/************************************************************************************************/
// 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;
//Initialize MLM pointers:
str_parse := mlm {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}};
gen_dsply := mlm {{{SINGLE-QUOTE}}}FORM_GENERIC_Display{{{SINGLE-QUOTE}}};
// Display any realated fields first:
(this_communication, this_form) := call gen_dsply
with this_communication, this_form, client_info_obj;
// Initialize messages
error_message:="";
admin_instr_msg := "";
page_text_msg := "";
// Assigns fields passed in the Form object to the Field object
field_list:= this_form.fields;
CallingForm := this_form.name;
CallingEvent := this_communication.CallingEvent;
CallingField := this_communication.CallingFieldName;
FrequencyCode := first of (field_list WHERE field_list.DataItemName="FrequencyCode") ;
FrequencyCode_value := FrequencyCode.value;
StopAfter := first of (field_list WHERE field_list.DataItemName="StopAfter" AND field_list.Label= "Stop After");
StopAfter_Value := StopAfter.Value;
if called_by_editor then
CallingForm := "RESP Med-Artif Airwy";
endif;
// remove Stop After value for one time frequencies
if ((CallingField = "StopAfter" or CallingEvent = "FormClose"))and FrequencyCode_value.FrequencySummary in OneTimeFreq then
StopAfter_Value.NUMBER := NULL;
StopAfter_Value.Option := "";
endif;
for i in 1 seqto count form_map_list do
// parse the form mapper:
form_element_list := call str_parse with form_map_list[i], "|";
test_form_name := form_element_list[1]; //Lookup form name from map list
// Test for proper form
if CallingForm = test_form_name then
//Find admin instruc field:
admin_instr := last of (field_list where field_list.DataItemName = admin_instr_din);
page_text := last of (field_list where field_list.DataItemName = "MLM_Manual Resp Forms");
if exists admin_instr then
admin_instr.value := admin_instr_msg;
page_text.value := page_text_msg;
page_del := "" ;
dlm := form_element_list[2]; //lookup delimeter
//Lookup appending fields, from map list
test_append_field_list := call str_parse with form_element_list[3], ",";
for k in 1 seqto count test_append_field_list do
// Test for proper field
test_append_field := test_append_field_list[k];
append_field := first of
(field_list where field_list.DataItemName = test_append_field);
if exists append_field and (append_field.value is not null
and append_field.value <> FALSE) then
// Add selected meds to the Special Instructions field
admin_instr.value := admin_instr.value || append_field.label;
If append_field.label matches pattern "Albuterol%"
then
If page_text.value matches pattern "Albuterol%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Albuterol;";
endif;
elseif append_field.label matches pattern "%Atrovent%"
then
If page_text.value matches pattern "%Atrovent%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Atrovent;";
endif;
elseif append_field.label matches pattern "%Alupent%"
then
If page_text.value matches pattern "%Alupent%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Alupent;";
endif;
elseif append_field.label matches pattern "%Arformoterol%"
then
If page_text.value matches pattern "%Arformoterol%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Arformoterol;";
endif;
elseif append_field.label matches pattern "%Alupent%"
then
If page_text.value matches pattern "%Alupent%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Alupent;";
endif;
elseif append_field.label matches pattern "%Racepinephrine%"
then
If page_text.value matches pattern "%Racepinephrine%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Racepinephrine;";
endif;
elseif append_field.label matches pattern "%Pulmicort%"
then
If page_text.value matches pattern "%Pulmicort%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Pulmicort;";
endif;
elseif append_field.label matches pattern "%Pentamidine%"
then
If page_text.value matches pattern "%Pentamidine%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Pentamidine;";
endif;
elseif append_field.label matches pattern "Levalbuterol%"
then
If page_text.value matches pattern "%Levalbuterol%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Levalbuterol;";
endif;
elseif append_field.label matches pattern "%Lidocaine%"
then
If page_text.value matches pattern "%Lidocaine%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Lidocaine;";
endif;
elseif append_field.label matches pattern "%Mucomyst%"
then
If page_text.value matches pattern "%Mucomyst%"
then
DoNaught := True;
else
page_text.value := page_text.value || "Mucomyst;";
endif;
elseif append_field.label matches pattern "%NSS%"
then
If page_text.value matches pattern "%NSS%"
then
DoNaught := True;
else
page_text.value := page_text.value || "NSS;";
endif;
endif;
if append_field.datatype <> "checkbox" then
if append_field.dataitemname = "RESP_PRN Reasons" then
admin_instr.value := admin_instr.value || " - " || append_field.value;
else
admin_instr.value := admin_instr.value || " " || append_field.value;
endif;
endif; // append_field.datatype <> "checkbox"
admin_instr.value := admin_instr.value || " " || dlm || " " ;
/*
// FOR DEBUGGING PURPOSES: display a message to the user
this_communication.Message :=
"callingform = "|| callingform
|| "\nCallingEvent = " || CallingEvent
|| "\ntest_form_name = " || test_form_name
|| "\ntest_field = " || test_field
|| "\ntest_append_field = " || test_append_field
|| "\nappend_field = " || append_field.dataitemname
|| "\nadmin_instr_din = " || admin_instr_din
|| "\nadmin_instr.value = " || admin_instr.value;
this_communication.MessageType := "Informational";
*/
endif; // exists append_field and ...
enddo; // for k in 1 seq to count test_manditory_field_list
endif; // exists admin_instr
endif; // CallingForm = test_form_name
enddo; // for i in 1 seqto count form_map_list
;;
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: