Initial Checking with all 820 MLMs
This commit is contained in:
121
MLMStripper/bin/Debug/STD/STD_FUNC_DOSAGE_CALC_METHOD.mlm
Normal file
121
MLMStripper/bin/Debug/STD/STD_FUNC_DOSAGE_CALC_METHOD.mlm
Normal file
@@ -0,0 +1,121 @@
|
||||
maintenance:
|
||||
|
||||
title: Summed Dose Versus Conversion Factor Methods;;
|
||||
mlmname: STD_FUNC_DOSAGE_CALC_METHOD;;
|
||||
arden: version 2.5;;
|
||||
version: 18.4;;
|
||||
institution: Allscripts, Standard MLM;;
|
||||
author: Allscripts Healthcare Solutions, Inc.;;
|
||||
specialist: ;;
|
||||
date: 2018-10-26;;
|
||||
validation: testing;;
|
||||
|
||||
/* P r o p r i e t a r y N o t i c e */
|
||||
/* Unpublished (c) 2013 - 2018 Allscripts Healthcare, LLC. and/or its affiliates. All Rights Reserved.
|
||||
|
||||
P r o p r i e t a r y N o t i c e: This software has been provided pursuant to a License Agreement, with
|
||||
Allscripts Healthcare, LLC. and/or its affiliates, containing restrictions on its use. This software contains
|
||||
valuable trade secrets and proprietary information of Allscripts Healthcare, LLC. and/or its affiliates and is
|
||||
protected by trade secret and copyright law. This software may not be copied or distributed in any form or medium,
|
||||
disclosed to any third parties, or used in any manner not provided for in said License Agreement except with prior
|
||||
written authorization from Allscripts Healthcare, LLC. and/or its affiliates. Notice to U.S. Government Users:
|
||||
This software is {{{SINGLE-QUOTE}}}Commercial Computer Software{{{SINGLE-QUOTE}}}.
|
||||
|
||||
All product names are the trademarks or registered trademarks of Allscripts Healthcare, LLC. and/or its affiliates.
|
||||
*/
|
||||
/* P r o p r i e t a r y N o t i c e */
|
||||
|
||||
library:
|
||||
purpose: Returns a string indicating the type of dosage range calculation to use:
|
||||
SUMMED OR CONVERSION
|
||||
;;
|
||||
explanation: This MLM determines if the Dosage Range check should be done
|
||||
using the SUMMED DOSE or the CONVERSION FACTOR approach.
|
||||
|
||||
If the following conditions are met, the calculation type used will be SUMMED.
|
||||
if the order type is "Complex Order"
|
||||
if the order type is "IV-Additive" AND the first component is "Complex Order"
|
||||
If the order duration is less than 24 hours
|
||||
If the order frequency is <User Scheduled> or <Multiple>
|
||||
If the stop after option for the order is TIMES (4)
|
||||
|
||||
;;
|
||||
keywords: Dosage Range
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
( med_data_list ) := ARGUMENT;
|
||||
|
||||
/* Set to true if logging is needed.*/
|
||||
log_execution_info := false;
|
||||
|
||||
return_value := "SUMMED";
|
||||
|
||||
from_uom := med_data_list[1].freq_uom;
|
||||
order_med_frequency := med_data_list[1].order_med_frequency;
|
||||
|
||||
if order_med_frequency <> "<User Schedule>"
|
||||
then
|
||||
(time_core_uom) := read last
|
||||
{"SELECT u.Code, u.CoreUOM"
|
||||
|| " FROM CV3UnitOfMeasure u"
|
||||
|| " INNER JOIN CV3Frequency f"
|
||||
|| " ON (f.Code like {{{SINGLE-QUOTE}}}Variable Interval{{{SINGLE-QUOTE}}} AND u.Code = " || SQL(from_uom) || ")"
|
||||
|| " OR (f.Code = " || SQL(order_med_frequency) || " AND f.TimeUom = u.Code ) "
|
||||
|| " WHERE u.Active = 1"
|
||||
};
|
||||
endif;
|
||||
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic:
|
||||
|
||||
//------------------------------------
|
||||
//Calculate the Duration of the Order
|
||||
//------------------------------------
|
||||
|
||||
if med_data_list[1].stop_after_option_type = 1
|
||||
then order_duration := med_data_list[1].stop_after_value DAY;
|
||||
elseif med_data_list[1].stop_after_option_type = 2
|
||||
then order_duration := med_data_list[1].stop_after_value HOUR;
|
||||
elseif med_data_list[1].stop_after_option_type = 3
|
||||
then order_duration := med_data_list[1].stop_after_value MINUTE;
|
||||
elseif exist med_data_list[1].stop_dtm
|
||||
then order_duration := med_data_list[1].stop_dtm
|
||||
- med_data_list[1].order_med_significant_date;
|
||||
else
|
||||
order_duration := NULL;
|
||||
endif;
|
||||
|
||||
|
||||
//***************
|
||||
// CLINICAL RULE
|
||||
//***************
|
||||
|
||||
if med_data_list[1].is_order
|
||||
AND
|
||||
(med_data_list[1].med_order_type = "Complex Order"
|
||||
OR (med_data_list[1].med_order_type = "IV-Additive"
|
||||
AND med_data_list[2].med_order_type = "Complex Order")
|
||||
OR order_duration < 24 hours
|
||||
OR med_data_list[1].order_med_frequency is in ("<User Schedule>","<Multiple>")
|
||||
OR med_data_list[1].stop_after_option_type = 4 // Stop after X times(
|
||||
OR time_core_uom = "shift" // Shift based frequency
|
||||
)
|
||||
then
|
||||
return_value := "SUMMED"; // Summed dose
|
||||
else
|
||||
return_value := "CONVERSION"; // Conversion factor
|
||||
endif;
|
||||
|
||||
conclude true;
|
||||
;;
|
||||
action:
|
||||
return return_value;
|
||||
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user