206 lines
7.9 KiB
Plaintext
206 lines
7.9 KiB
Plaintext
maintenance:
|
|
|
|
title: Create Lists of the Weights for the Dose Basis;;
|
|
mlmname: STD_FUNC_DOSAGE_BASIS;;
|
|
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: The MLM determines which Weight should be used for dosage-range checking.
|
|
;;
|
|
explanation: In the Dosage Calculation UI, the user can specify which type of weight
|
|
or BSA should be used to calculate the dose. Examples of the types are:
|
|
actual KG, KG (ADJUSTED), KG (IDEAL), actual M2, M2 (ADJUSTED), M2 (IDEAL)
|
|
|
|
The correct weight is determined by calling a system MLM that calcuates the
|
|
differnt types of weight. The information is then passed back to the calling program.
|
|
|
|
NOTE: When a facility adds codes to the CALCULATION OPTION Dictionary,
|
|
this MLM will NOT automatically adjust for any codes that use IDEAL or
|
|
ADJUSTED weights in them. You must manually added the codes to the following
|
|
variables: ADJUSTED_COMPARE_STRING and/or IDEAL_COMPARE_STRING
|
|
;;
|
|
keywords: single dose; average daily dose; total daily dose; dosage range
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
|
|
(ht_cm, //A number. Patient{{{SINGLE-QUOTE}}}s height in centimeter
|
|
wt_kg, //A number. Patient{{{SINGLE-QUOTE}}}s weight in kilograms
|
|
calc_med_per_uom_list //A list that is the DOSE BASIS such as "kg (ideal)", "m2 (adjusted)"
|
|
) := ARGUMENT;
|
|
|
|
|
|
/* Set to true if logging is needed.*/
|
|
log_execution_info := false;
|
|
|
|
/* Lists to determine which weight dose basis uses: ideal, adjusted, actual, or unspecified */
|
|
/* DO NOT CHANGE the values in the kg_compare_string and the m2_compare_string */
|
|
|
|
kg_compare_string := ("kg", "kg (ideal)", "kg (adjusted)");
|
|
m2_compare_string := ("m2", "m2 (ideal)", "m2 (adjusted)");
|
|
actual_compare_string := ("kg", "m2");
|
|
adjusted_compare_string := ("kg (adjusted)", "m2 (adjusted)",
|
|
"AUC (Cockcroft-Gault adjusted)", "AUC (Jelliffe adjusted)");
|
|
ideal_compare_string := ("kg (ideal)", "m2 (ideal)",
|
|
"AUC (Cockcroft-Gault ideal)", "AUC (Jelliffe ideal)" );
|
|
|
|
/* Declare the MLMs that can be called */
|
|
calculate_weight := MLM {{{SINGLE-QUOTE}}}sys_calc_WT{{{SINGLE-QUOTE}}};
|
|
|
|
/* Get ClientInfo Object */
|
|
client_info_obj := read last {ClientInfo: This };
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic:
|
|
|
|
/*-----------------------------------------*/
|
|
/* Modify Lists For Ideal & Adjust Weights */
|
|
/*-----------------------------------------*/
|
|
|
|
/* Initalize Variables */
|
|
calc_text_list := ();
|
|
dose_basis := "";
|
|
dose_basis_list := ();
|
|
wt_kg_list := ();
|
|
updated_calc_med_per_uom_list := ();
|
|
|
|
|
|
index_list:= 1 seqto(count calc_med_per_uom_list);
|
|
|
|
for M in index_list do
|
|
user_value_item := first (calc_med_per_uom_list where index_list = M);
|
|
|
|
if user_value_item is in kg_compare_string
|
|
then
|
|
if user_value_item is in ideal_compare_string
|
|
then
|
|
temp_user_value_item := "kg";
|
|
dose_basis := "Ideal";
|
|
calc_text_list := calc_text_list, " (using ideal weight).";
|
|
elseif user_value_item is in adjusted_compare_string
|
|
then
|
|
temp_user_value_item := "kg";
|
|
dose_basis := "Adjusted";
|
|
calc_text_list := calc_text_list, " (using adjusted weight).";
|
|
elseif user_value_item is in actual_compare_string
|
|
then
|
|
temp_user_value_item := "kg";
|
|
dose_basis := "Actual";
|
|
calc_text_list := calc_text_list, ".";
|
|
else
|
|
temp_user_value_item := NULL;
|
|
dose_basis := "Unspecified";
|
|
calc_text_list := calc_text_list, ".";
|
|
endif; // if user_value_item is in ideal_compare_string
|
|
elseif user_value_item is in m2_compare_string
|
|
then
|
|
if user_value_item is in ideal_compare_string
|
|
then
|
|
temp_user_value_item := "m2";
|
|
dose_basis:= "Ideal";
|
|
calc_text_list := calc_text_list, " (using ideal BSA).";
|
|
elseif user_value_item is in adjusted_compare_string
|
|
then
|
|
temp_user_value_item := "m2";
|
|
dose_basis := "Adjusted";
|
|
calc_text_list := calc_text_list, " (using adjusted BSA).";
|
|
elseif user_value_item is in actual_compare_string
|
|
then
|
|
temp_user_value_item := "m2";
|
|
dose_basis := "Actual";
|
|
calc_text_list := calc_text_list, ".";
|
|
else
|
|
temp_user_value_item := NULL;
|
|
dose_basis := "Unspecified";
|
|
calc_text_list := calc_text_list, ".";
|
|
endif; //user_value_item is in ideal_compare_string
|
|
else
|
|
//This is a customer supplied entry in the CV3CalculationOption table
|
|
//Or a dose basis from the AUC group
|
|
if user_value_item is in ideal_compare_string
|
|
then
|
|
temp_user_value_item := NULL;
|
|
dose_basis := "Ideal";
|
|
calc_text_list := calc_text_list, " (using ideal weight).";
|
|
elseif user_value_item is in adjusted_compare_string
|
|
then
|
|
temp_user_value_item := NULL;
|
|
dose_basis := "Adjusted";
|
|
calc_text_list := calc_text_list, " (using adjusted weight).";
|
|
else
|
|
temp_user_value_item := NULL;
|
|
dose_basis := "Unspecified";
|
|
calc_text_list := calc_text_list, ".";
|
|
endif; // if user_value_item is in ideal_compare_string
|
|
endif; //if user_value_item is in kg_compare_string
|
|
|
|
|
|
/*--------------------------------------------------------*/
|
|
/* Append the DOSE BASIS and the Updated PER UOM to Lists */
|
|
/*--------------------------------------------------------*/
|
|
dose_basis_list := dose_basis_list, dose_basis;
|
|
|
|
/* Changes calc_med_per_uom_list to KG or M2 where values include (ideal) or (adjusted) */
|
|
/* Note: temp_user_value_item should be NULL, except for the values listed */
|
|
/* in the kg_compare_string and the m2_compare_string */
|
|
/* The purpose of this statement is to replace the IDEAL and ADJUSTED values */
|
|
/* in the strings such as "KG (ideal)" so that dosage-range checking will continue to */
|
|
/* match the KG or M2 in the "PER WT OR M2" field dosage-range configuration */
|
|
updated_calc_med_per_uom_list := updated_calc_med_per_uom_list, temp_user_value_item;
|
|
|
|
|
|
/*---------------------------------------------------------*/
|
|
/* Get the WEIGHT-- null, actual, ideal or adjusted weight */
|
|
/*---------------------------------------------------------*/
|
|
if dose_basis is in ( "Ideal", "Adjusted" )
|
|
then
|
|
(wt_kg_str, Tooltip_formula, display_message) := call calculate_weight
|
|
with (dose_basis, ht_cm, wt_kg, client_info_obj);
|
|
|
|
wt_kg_list := wt_kg_list, (wt_kg_str AS NUMBER);
|
|
elseif dose_basis = "Actual"
|
|
then
|
|
wt_kg_list := wt_kg_list, (wt_kg AS NUMBER);
|
|
else
|
|
wt_kg_list := wt_kg_list, (wt_kg AS NUMBER);
|
|
endif; //if dose_basis
|
|
|
|
enddo; //for M in index_list do
|
|
|
|
/*-------------------------------------------*/
|
|
/* Always conclude true to return the values */
|
|
/*-------------------------------------------*/
|
|
conclude true;
|
|
;;
|
|
action:
|
|
return
|
|
(calc_text_list,
|
|
dose_basis_list,
|
|
wt_kg_list,
|
|
updated_calc_med_per_uom_list );
|
|
;;
|
|
end:
|