Initial Checking with all 820 MLMs
This commit is contained in:
181
MLMStripper/bin/Debug/DOC/DOC_CLINICAL_SCALES_FLOWSHEET.mlm
Normal file
181
MLMStripper/bin/Debug/DOC/DOC_CLINICAL_SCALES_FLOWSHEET.mlm
Normal file
@@ -0,0 +1,181 @@
|
||||
maintenance:
|
||||
|
||||
title: DOC_Clinical_Scales_Flowsheet;;
|
||||
mlmname: DOC_Clinical_Scales_Flowsheet;;
|
||||
arden: version 2.5;;
|
||||
version: 1.02;; //Release 5.5 SP1/FP1 and 6.0/6.1 SU2 and higher
|
||||
institution: St. Clair, Allscrtips;;
|
||||
author: Shawn Head;;
|
||||
specialist: Janit Nordin;;
|
||||
date: 2016-04-12;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose:
|
||||
|
||||
This MLM will automatically populate values based on the clinical scales values for PHQ-9 and PHQ-7
|
||||
;;
|
||||
explanation:
|
||||
|
||||
Modification history:
|
||||
|
||||
04.12.2016 - STH CSR#: 33982 - created
|
||||
07.23.2019 - TMS CSR#: 37676 - Change log_execution_info to false per upgrade analysis.
|
||||
;;
|
||||
keywords: Objects Plus, Education Log, Worklist, ARRA
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
mlm_name := "DOC_EDUCATION_FS_PRECHECK";
|
||||
|
||||
CR := 13 formatted with "%c";
|
||||
LF := 10 formatted with "%c";
|
||||
CRLF:= CR||LF;
|
||||
|
||||
//Set to true if a decision.log is needed for diagnostic purposes. Please refer to the CDS Authoring Guides for more information
|
||||
log_execution_info:= false;
|
||||
|
||||
// Specify which .NET assemblies need to be loaded for ObjectsPlus
|
||||
standard_libs := mlm {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
||||
include standard_libs;
|
||||
|
||||
using "ObjectsPlusXA.SCM.Forms";
|
||||
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
||||
|
||||
set_cds_vars := MLM {{{SINGLE-QUOTE}}}CALLED_DOC_FS_DEFINITION_MLM{{{SINGLE-QUOTE}}};
|
||||
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// Error destination
|
||||
//---------------------------------------------------------------
|
||||
//"SYSTEM ALERT",
|
||||
send_alert := "DoNotSend";
|
||||
error_destination := destination { Alert: warning, "ObjectsPlus Error from MLM", low, chart, "ObjectsPlus Error from MLM", 1003, send_alert, "No Override Allowed" };
|
||||
|
||||
// Receive arguments from the structured note
|
||||
(this_DocumentCommunication) := argument;
|
||||
|
||||
// Get the user, chart, client and visit GUIDs
|
||||
if called_by_editor then
|
||||
userguid := "";
|
||||
clientGuid := "9000001860200200"; //Admission, Holly
|
||||
clientvisitguid := "9000003613200270";//Admission, Holly
|
||||
chartguid := "9000003613100170";//Admission, Holly
|
||||
else
|
||||
userGuid := this_DocumentCommunication.UserGUID;
|
||||
clientGuid := this_DocumentCommunication.ClientGUID;
|
||||
clientvisitGuid := this_DocumentCommunication.ClientVisitGUID;
|
||||
chartGuid := this_DocumentCommunication.ChartGUID;
|
||||
endif;
|
||||
|
||||
// Create prototypes for the object types we{{{SINGLE-QUOTE}}}ll need to instantiate
|
||||
ObservationType := OBJECT [ObservationGUID, ClientDocumentGUID, ParameterGUID, DataType, ValueObj];
|
||||
FreeTextValueType := OBJECT [Value];
|
||||
NumericValueType := OBJECT [Value];
|
||||
ListValueType := OBJECT [ListGuid, ListItemsList, SuggestedTextValue];
|
||||
ListValueListItemType := OBJECT [ListItemGUID, Value, IsSelected];
|
||||
//Document Type
|
||||
FLOWSHEET := "FlowSheet";
|
||||
|
||||
//Event Types
|
||||
CHARTOBSERVATION := "ChartObservation";
|
||||
DOCUMENTCLOSING := "DocumentClosing";
|
||||
DOCUMENTOPENING := "DocumentOpening";
|
||||
|
||||
(this_documentCommunication, client_guid, client_visit_guid, chart_guid,
|
||||
user_guid, document_type, document_name, event_type,
|
||||
configuration_guid, this_currentObs, CancelEventFlag, this_fs_doc,
|
||||
authored_by_guid, isIOFlowsheetFlag, client_document_guid, this_parameters,
|
||||
this_columnList, this_currentColumn, this_chartedObservationsList,
|
||||
this_parameters_displayName, current_parameter, current_parameter_name, current_parameter_guid,
|
||||
current_parameter_datatype, selectedItems, selectedItems_Value, current_value,
|
||||
diagnostic_message, displayMessageFlag) := CALL set_cds_vars WITH (this_documentCommunication);
|
||||
|
||||
Error_occurred := false;
|
||||
//create a list of charted parameters that exist in the list of observartion names created above.
|
||||
charted_parameters := (this_parameters where this_parameters.Name is in ("SCH_PHP_GAD Score","SCH_PHP_ PHQ"));
|
||||
|
||||
for x in (1 seqto(count(charted_parameters))) do
|
||||
Education_obs := charted_parameters[x];
|
||||
theCurrentColumn := first of ( this_columnList WHERE this_columnList.ClientDocumentGUID = this_currentObs.ClientDocumentGUID);
|
||||
current_obs := first of ( theCurrentColumn.ChartedObservationsList WHERE theCurrentColumn.ChartedObservationsList.ParameterGUID = Education_obs.ParameterGUID);
|
||||
|
||||
if(charted_parameters[x].Name = "SCH_PHP_ PHQ") then
|
||||
PHQScore := (current_obs.ValueObj.Value as number);
|
||||
if((PHQScore >= 0) and (PHQScore <= 4)) then
|
||||
Depression_Severity := "Minimal";
|
||||
Recommend_action := "none";
|
||||
elseif((PHQScore >= 5) and (PHQScore <= 9)) then
|
||||
Depression_Severity := "Mild";
|
||||
Recommend_action := "Watchful waiting, repeat at follow up";
|
||||
elseif((PHQScore >= 10) and (PHQScore <= 14)) then
|
||||
Depression_Severity := "Moderate";
|
||||
Recommend_action := "Treatment plan, considering counseling, follow-up and/or pharmacotherapy";
|
||||
elseif((PHQScore >= 15) and (PHQScore <= 19)) then
|
||||
Depression_Severity := "Moderately Severe";
|
||||
Recommend_action := "Active treatment with pharmacotherapy and/or psychotherapy";
|
||||
elseif((PHQScore >= 20)) then
|
||||
Depression_Severity := "Severe";
|
||||
Recommend_action := "Immediate initiation of pharmacotherapy and, if severe impairment or poor response to therapy, expedited referral to a mental health specialist for psychotherapy and/or collaborative management ";
|
||||
endif;
|
||||
Depression_Param := first of (this_parameters WHERE this_parameters.Name = "SCH_PHP_PHQ Depression Severity");
|
||||
this_currentObj1 := NEW ObservationType;
|
||||
this_currentObj1.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_currentObj1.ParameterGUID := Depression_Param.ParameterGUID;
|
||||
this_currentObj1.DataType := "FreeTextValue";
|
||||
this_currentObj1.ValueObj := NEW FreeTextValueType;
|
||||
this_currentObj1.ValueObj.Value := Depression_Severity AS STRING;
|
||||
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_currentObj1);
|
||||
|
||||
Recomend_Param := first of (this_parameters WHERE this_parameters.Name = "SCH_PHP_PHQ Recommendations");
|
||||
this_currentObj2 := NEW ObservationType;
|
||||
this_currentObj2.ClientDocumentGUID := this_currentObs.ClientDocumentGUID;
|
||||
this_currentObj2.ParameterGUID := Recomend_Param.ParameterGUID;
|
||||
this_currentObj2.DataType := "FreeTextValue";
|
||||
this_currentObj2.ValueObj := NEW FreeTextValueType;
|
||||
this_currentObj2.ValueObj.Value := Recommend_action AS STRING;
|
||||
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_currentObj2);
|
||||
|
||||
elseif((charted_parameters[x].Name = "SCH_PHP_GAD Score") and ((current_obs.ValueObj.Value as number)>=0)) then
|
||||
GADScore := (current_obs.ValueObj.Value as number);
|
||||
|
||||
if((GADScore >= 0) and (GADScore <= 4)) then
|
||||
Anxiety := "Minimal";
|
||||
elseif((GADScore >= 5) and (GADScore <= 9)) then
|
||||
Anxiety := "Mild";
|
||||
elseif((GADScore >= 10) and (GADScore <= 14)) then
|
||||
Anxiety := "Moderate";
|
||||
elseif((GADScore >= 15) /*and (PHQScore <= 27)*/) then
|
||||
Anxiety := "Severe";
|
||||
endif;
|
||||
Anxiety_Param := first of (this_parameters WHERE this_parameters.Name = "SCH_PHP_GAD Anxiety Severity");
|
||||
this_currentObj3 := NEW ObservationType;
|
||||
this_currentObj3.ClientDocumentGUID := this_currentObs.ClientDocumentGUID;
|
||||
this_currentObj3.ParameterGUID := Anxiety_Param.ParameterGUID;
|
||||
this_currentObj3.DataType := Anxiety_Param.DataType;
|
||||
this_currentObj3.ValueObj := NEW FreeTextValueType;
|
||||
this_currentObj3.ValueObj.Value := Anxiety AS STRING;
|
||||
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_currentObj3);
|
||||
|
||||
endif;
|
||||
enddo;
|
||||
|
||||
;;
|
||||
priority: 50
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic:
|
||||
|
||||
conclude true;
|
||||
|
||||
;;
|
||||
action:
|
||||
return this_DocumentCommunication; ;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user