155 lines
5.7 KiB
Plaintext
155 lines
5.7 KiB
Plaintext
maintenance:
|
|
|
|
title: ;;
|
|
mlmname: DOC_SZ_TESTING4;;
|
|
arden: version 2.5;;
|
|
version: 0.00;;
|
|
institution: ;;
|
|
author: ;;
|
|
specialist: ;;
|
|
date: 2017-06-04;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: UPDATE THE SEPSIS COLUMN WITH "POTENTIAL SIRS" GIVEN ABNORMAL LAB AND/OR VITALS ;;
|
|
explanation:
|
|
;;
|
|
keywords:
|
|
;;
|
|
citations:
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
|
|
(this_doc_com) := argument;
|
|
|
|
/*************Make changes to spelling and flags in this section****************/
|
|
//parameter names in config
|
|
temp_param := "sch_edtriage_fahrenheit NU";
|
|
hr_param := "sch_edtriage_heart rate";
|
|
rr_param := "sch_edtriage_resp rate";
|
|
|
|
column_name1 := "Sepsis Alert";
|
|
column_value1 := "Potential SIRS";
|
|
|
|
//associated configurations (in config tools):
|
|
//Struct Note: "sch_edtriage_triage note"
|
|
//FS Catalog: "SCH_Vital Sign_ED_Version"
|
|
//Doc. Cat. - Flowsheet: "1. Vital Sign - ED"
|
|
//Doc. Cat. - Structured Note: "ED Triage Note"
|
|
|
|
//associated MLMs:
|
|
// universal mlm for closing of Flowsheet: DOC_ED_VITAL_SIGNS_CLOSE
|
|
// universal MLM for closing of Structured Note: DOC_ED_TRIAGE_NOTE_CLOSE
|
|
|
|
//when moving live, these 2 MLMs need to be added to production:
|
|
// 1) DOC_SEPSIS_STATUS_BOARD_COLUMN_ED
|
|
// 2) DOC_ED_VITAL_SIGNS_CLOSE
|
|
// 3) then add DOC_ED_VITAL_SIGNS_CLOSE to "Closing MLM" setting in Doc. Cat. - Flowsheet: "1. Vital Sign - ED" in config tools
|
|
// 4) update Called MLM to "<available to any>" under attributes tab for Struct Note: "sch_edtriage_triage note"
|
|
/********************************************************************************/
|
|
|
|
if (this_doc_com.documenttype = "flowsheet") then
|
|
|
|
fs_doc_config_obj := this_doc_com.DocumentConfigurationObj;
|
|
this_parms := fs_doc_config_obj.ParametersList;
|
|
this_cols := fs_doc_config_obj.ColumnsList;
|
|
|
|
//get guids
|
|
ClientGUID := this_doc_com.ClientGUID;
|
|
ChartGUID := this_doc_com.ChartGUID;
|
|
ClientVisitGUID := this_doc_com.ClientVisitGUID;
|
|
|
|
//initialize our validation lists
|
|
temp_val_list := ();
|
|
hr_val_list := ();
|
|
rr_val_list := ();
|
|
|
|
//get guids for later use
|
|
temp_guid := last(this_parms.ParameterGUID where this_parms.Name = temp_param) as string;
|
|
hr_guid := last(this_parms.parameterguid where this_parms.Name = hr_param) as string;
|
|
rr_guid := last(this_parms.ParameterGUID where this_parms.Name = rr_param) as string;
|
|
|
|
//March across the columns and get observation values and add them to previously inialized lists. <-- this feature doesn{{{SINGLE-QUOTE}}}t work anymore as chartedobservationslist[i] returns () empty list for all columns
|
|
//except current column. I kept this code since I can still get current column values using it.
|
|
for j in 1 seqto (count this_cols) do //loops through each column
|
|
(this_obs) := this_cols[j].chartedobservationslist; //the chartedObservationsList of each column is suppoed to bring up: observationGUID, clientDocumentGUID, ParameterGUID, DataType, and ValueObj
|
|
|
|
//if the temperature guid is in the
|
|
if temp_guid is in (this_obs.parameterguid) then //if guid for temperature matches the parameterguid for
|
|
temp_val_obj := (this_obs.valueobj where this_obs.parameterguid = temp_guid); //now put it in the list
|
|
temp_val_list := temp_val_list,(temp_val_obj.value as number);
|
|
endif;
|
|
|
|
if hr_guid is in (this_obs.parameterguid) then //if guid for temperature matches the parameterguid for
|
|
hr_val_obj := (this_obs.valueobj where this_obs.parameterguid = hr_guid); //now put it in the list
|
|
hr_val_list := hr_val_list, (hr_val_obj.value as number);
|
|
endif;
|
|
|
|
if rr_guid is in (this_obs.parameterguid) then //if guid for temperature matches the parameterguid for
|
|
rr_val_obj := (this_obs.valueobj where this_obs.parameterguid = rr_guid); //now put it in the list
|
|
rr_val_list := rr_val_list, (rr_val_obj.value as number);
|
|
endif;
|
|
enddo;
|
|
|
|
|
|
// determine the maximum of values from each list
|
|
current_col_temp := max(temp_val_list);
|
|
current_col_hr := max(hr_val_list);
|
|
current_col_rr := max(rr_val_list);
|
|
|
|
if (current_col_temp >= 100.4 or current_col_temp < 96.8) then
|
|
TEMP_DOC_abnormal := true;
|
|
endif;
|
|
|
|
if (current_col_hr > 100) then
|
|
HR_DOC_abnormal := true;
|
|
endif;
|
|
|
|
if (current_col_rr >= 22) then
|
|
RR_DOC_abnormal := true;
|
|
endif;
|
|
endif;
|
|
|
|
|
|
//Setting up our mlm to be called and our object. Instantiate sepsis_column using our created object.
|
|
create_ED_column := MLM {{{SINGLE-QUOTE}}}SCH_FUNC_CREATE_ENTERPRISE_DEFINED_COLUMN{{{SINGLE-QUOTE}}}; // MLM that creates the Enterprise Defined Column in the "Action" section of the MLM
|
|
EDCObj := OBJECT [column_name,column_value,client_guid,chart_guid,client_visit_guid]; // Create Enterprise Defined Column Obj
|
|
Sepsis_Column:= NEW EDCObj WITH
|
|
[
|
|
column_name := column_name1,
|
|
column_value := column_value1,
|
|
client_guid := ClientGUID,
|
|
chart_guid := ChartGUID,
|
|
client_visit_guid := ClientVisitGUID
|
|
];
|
|
|
|
|
|
|
|
|
|
// enter this conditional only if WBC/Bands/granulocytes are normal
|
|
// Checks if temperature is normal. If abnormal, then proceed, if normal then stop.
|
|
if (TEMP_DOC_abnormal = true) then
|
|
// Checks if hr/rr are abnormal, if so then fire sepsis display, if normal then stop
|
|
if ((HR_DOC_abnormal = true) or (RR_DOC_abnormal = true)) then
|
|
//calls our MLM with instantiated object
|
|
return_value := call create_ED_column with ( Sepsis_Column );
|
|
endif;
|
|
endif;
|
|
|
|
|
|
BREAK;
|
|
|
|
;;
|
|
priority: 50
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic: conclude true;
|
|
;;
|
|
action: return this_doc_com;
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|