Initial Checking with all 820 MLMs
This commit is contained in:
576
MLMStripper/bin/Debug/DOC/DOC_FUNC_VTE_PHYSICIAN_OVERRIDE.mlm
Normal file
576
MLMStripper/bin/Debug/DOC/DOC_FUNC_VTE_PHYSICIAN_OVERRIDE.mlm
Normal file
@@ -0,0 +1,576 @@
|
||||
maintenance:
|
||||
|
||||
title: DOC_FUNC_VTE_PHYSICIAN_OVERRIDE;;
|
||||
mlmname: DOC_FUNC_VTE_PHYSICIAN_OVERRIDE;;
|
||||
arden: version 2.50;;
|
||||
version: 6.10;;
|
||||
institution: St.Clair Hospital;;
|
||||
author: Juliet M. Johns;;
|
||||
specialist: Shawn Head;;
|
||||
date: 2014-03-24;;
|
||||
validation: testing;;
|
||||
|
||||
library:
|
||||
purpose: When Adult Assessment / Intervention flowsheet is opened, alert the user if the physician has entered an override VTE Score
|
||||
since the last nurse charted VTE score.
|
||||
|
||||
When nurse charts the VTE Risk Assessment, if they select the observation for the physician override, pull in the
|
||||
observations charted by the physician to determine the override score.
|
||||
;;
|
||||
explanation:
|
||||
Change history
|
||||
|
||||
03-24-2014 JML CSR #: 31893, MLM Created.
|
||||
;;
|
||||
keywords: VTE, physician, override
|
||||
;;
|
||||
knowledge:
|
||||
type: data-driven;;
|
||||
data:
|
||||
|
||||
//Message box
|
||||
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}}};
|
||||
string_parse := MLM {{{SINGLE-QUOTE}}}UTIL_STRING_PARSE{{{SINGLE-QUOTE}}};
|
||||
|
||||
// Receive arguments from the structured note
|
||||
(this_DocumentCommunication) := argument;
|
||||
|
||||
// Create prototypes for the object types we{{{SINGLE-QUOTE}}}ll need to instantiate
|
||||
ObservationType := OBJECT [ObservationGUID, ClientDocumentGUID, ParameterGUID, DataType, ValueObj];
|
||||
ListValueType := OBJECT [ListGuid, ListItemsList, SuggestedTextValue];
|
||||
ListValueListItemType := OBJECT [ListItemGUID, Value, IsSelected];
|
||||
|
||||
//Document Type
|
||||
FLOWSHEET := "FlowSheet";
|
||||
|
||||
//Event Types
|
||||
CHARTOBSERVATION := "ChartObservation";
|
||||
DOCUMENTCLOSING := "DocumentClosing";
|
||||
DOCUMENTOPENING := "DocumentOpening";
|
||||
|
||||
fireOnParam := "AS SC vte physician override";
|
||||
allZeroOverrides := false;
|
||||
|
||||
(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);
|
||||
|
||||
//Retrieve physician VTE Override value and when it was entered
|
||||
(overrideName,
|
||||
overrideValue,
|
||||
overrideDate) := read last {"SELECT oud.UserDataCode, oud.Value, oud.TouchedWhen"
|
||||
|| " FROM CV3Order as o with (nolock) JOIN CV3OrderCatalogMasterItem AS ocmi with (nolock)"
|
||||
|| " ON o.OrderCatalogMasterItemGUID = ocmi.GUID"
|
||||
|| " JOIN CV3OrderUserData oud with (nolock) "
|
||||
|| " ON o.GUID = oud.OrderGUID"
|
||||
|| " and o.ClientGUID = oud.ClientGUID"
|
||||
|| " WHERE o.ClientGUID = " || Sql(client_guid)
|
||||
|| " AND o.ClientVisitGUID = " || Sql(client_visit_guid)
|
||||
|| " AND o.ChartGUID = " || Sql(chart_guid)
|
||||
|| " AND o.Name = {{{SINGLE-QUOTE}}}VTE Drug Therapy Evaluation{{{SINGLE-QUOTE}}}"
|
||||
|| " AND"
|
||||
|| " ((o.OrderStatusLevelNum > 15"
|
||||
|| " AND o.OrderStatusLevelNum NOT IN ({{{SINGLE-QUOTE}}}69{{{SINGLE-QUOTE}}}, {{{SINGLE-QUOTE}}}70{{{SINGLE-QUOTE}}}))"
|
||||
|| " OR o.OrderStatusCode = {{{SINGLE-QUOTE}}}HOLD{{{SINGLE-QUOTE}}})"
|
||||
|| " AND (oud.UserDataCode = {{{SINGLE-QUOTE}}}OS_Information5{{{SINGLE-QUOTE}}}"
|
||||
|| " OR oud.UserDataCode = {{{SINGLE-QUOTE}}}OS_Information1{{{SINGLE-QUOTE}}})"
|
||||
|| " ORDER BY o.TouchedWhen ASC"};
|
||||
|
||||
|
||||
if ( overrideName = "OS_Information1" ) then
|
||||
if ( overrideValue matches pattern "Physician override score = 0.%" ) then
|
||||
allZeroOverrides := true;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
//only trigger on document open
|
||||
if ( event_type = DOCUMENTOPENING ) then
|
||||
|
||||
OccCode := read last {" select OccupationCode from CV3USER U "
|
||||
|| " where guid = " || sql(user_guid) };
|
||||
|
||||
|
||||
if ( OccCode IN ("RN","GN","SN","IT") ) then
|
||||
|
||||
//Physician override was entered
|
||||
if ( exists overrideValue ) then
|
||||
|
||||
|
||||
//Retrieve last vte charted on flowsheet IF more recent than physician override
|
||||
(lastVTEChartDate) := read last {"SELECT TOP 1 cd.AuthoredDtm"
|
||||
|| " FROM CV3ClientDocumentCUR cd with (nolock) JOIN CV3ClientDocDetailCUR cdd with (nolock) "
|
||||
|| " ON cd.GUID = cdd.ClientDocumentGUID "
|
||||
|| " AND cd.ClientGUID = cdd.ClientGUID "
|
||||
|| " JOIN CV3ObservationDocumentCUR od with (nolock) "
|
||||
|| " ON cdd.ClientDocumentGUID = od.OwnerGUID "
|
||||
|| " JOIN CV3ObsCatalogMasterItem ocmi with (nolock) "
|
||||
|| " ON od.ObsMasterItemGUID = ocmi.GUID "
|
||||
|| " JOIN CV3ObservationCUR o with (nolock) "
|
||||
|| " ON od.ObservationGUID = o.GUID "
|
||||
|| " JOIN CV3ObsCatalogItem oci with (nolock) "
|
||||
|| " ON o.ObsItemGUID = oci.GUID "
|
||||
|| " WHERE cd.ClientGUID = " || Sql(client_guid)
|
||||
|| " AND cd.ClientVisitGUID = " || Sql(client_visit_guid)
|
||||
|| " AND cd.ChartGUID = " || Sql(chart_guid)
|
||||
|| " AND od.Active = 1 "
|
||||
|| " AND cd.DocumentName = {{{SINGLE-QUOTE}}}2. Adult Assessment/Intervention{{{SINGLE-QUOTE}}}"
|
||||
|| " AND oci.Name = {{{SINGLE-QUOTE}}}AS SC vte score CAL{{{SINGLE-QUOTE}}}"
|
||||
|| " AND cd.AuthoredDtm >= {{{SINGLE-QUOTE}}}" || overrideDate || "{{{SINGLE-QUOTE}}}"
|
||||
|| " ORDER BY cd.AuthoredDtm DESC"};
|
||||
|
||||
//A VTE was charted on the flowsheet since physician entered override, don{{{SINGLE-QUOTE}}}t show alert
|
||||
//Otherwise, show alert
|
||||
if ( NOT ( exists lastVTEChartDate ) ) then
|
||||
//Show alert
|
||||
//alertMsg := "A Physician has entered a VTE override score since the last chart time."
|
||||
// || "\n\nPlease re-assess the VTE Score based on the physician override score.";
|
||||
alertMsg := "A Physician has entered a VTE override score since the last charted VTE Risk Assessment."
|
||||
|| "\n\nPlease re-assess the VTE Risk Assessment based on the Physician override score.";
|
||||
|
||||
dialogRes := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with alertMsg, "Physician VTE Override Score Alert", "OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}, "Exclamation" as {{{SINGLE-QUOTE}}}MessageBoxIcon{{{SINGLE-QUOTE}}};
|
||||
endif;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
//IF user selected PHYSICIAN OVERRIDE observation, automatically load selections
|
||||
elseif ( event_type = CHARTOBSERVATION ) then
|
||||
|
||||
//Only check for existing override values IF a physician override exists
|
||||
param := first of ( this_parameters WHERE this_parameters.Name = fireOnParam );
|
||||
|
||||
if ( exists param ) then
|
||||
paramObs := first of ( this_chartedObservationsList WHERE this_chartedObservationsList.ParameterGUID = param.ParameterGUID );
|
||||
paramVal := last of ( paramObs.ValueObj.ListItemsList.Value WHERE paramObs.ValueObj.ListItemsList.IsSelected = true);
|
||||
|
||||
if ( paramVal <> "" ) then
|
||||
if ( overrideValue <> "" ) then
|
||||
//Parse override values
|
||||
(physOverrideValues) := call string_parse WITH overrideValue, "|";
|
||||
|
||||
//Retrieve AGE observation
|
||||
vteAge := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte age");
|
||||
if ( exists vteAge ) then
|
||||
ageListValues := vteAge.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkAgeValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for i in 1 seqto ( count ageListValues ) do
|
||||
trimAgeValues := TRIM( SUBSTRING (( LENGTH(ageListValues[i]) - 2 ) - 1) CHARACTERS STARTING AT 1 FROM ageListValues[i] );
|
||||
if ( trimAgeValues IN physOverrideValues ) then
|
||||
checkAgeValues := (checkAgeValues, ageListValues[i]);
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_AGEObj := NEW ObservationType;
|
||||
this_AGEObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_AGEObj.ParameterGUID := vteAge.ParameterGUID;
|
||||
this_AGEObj.DataType := "ListValue";
|
||||
this_AGEObj.ValueObj := NEW ListValueType;
|
||||
this_AGEObj.ValueObj.ListGUID := vteAge.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN vteAge.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkAgeValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkAgeValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_AGEObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := ( this_fs_doc.CurrentColumn.ChartedObservationsList, this_AGEObj);
|
||||
endif;
|
||||
|
||||
//Retrieve BMI observation
|
||||
vteBMI := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte bmi");
|
||||
if ( exists vteBMI ) then
|
||||
bmiListValues := vteBMI.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkBMIValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for i IN 1 seqto ( count bmiListValues ) do
|
||||
trimBMIValues := Trim(SUBSTRING (( Length(bmiListValues[i]) - 2 ) - 1) CHARACTERS STARTING AT 1 FROM bmiListValues[i]);
|
||||
|
||||
if ( trimBMIValues IN physOverrideValues ) then
|
||||
checkBMIValues := ( checkBMIValues, bmiListValues[i] );
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_BMIObj := NEW ObservationType;
|
||||
this_BMIObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_BMIObj.ParameterGUID := vteBMI.ParameterGUID;
|
||||
this_BMIObj.DataType := "ListValue";
|
||||
this_BMIObj.ValueObj := NEW ListValueType;
|
||||
this_BMIObj.ValueObj.ListGUID := vteBMI.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN vteBMI.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkBMIValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkBMIValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_BMIObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := ( this_fs_doc.CurrentColumn.ChartedObservationsList, this_BMIObj);
|
||||
endif;
|
||||
|
||||
//Retrieve HISTORY observation
|
||||
vteHistory := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte history");
|
||||
if ( exists vteHistory ) then
|
||||
|
||||
historyValues := vteHistory.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkHistoryValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for j in 1 seqto ( count historyValues ) do
|
||||
trimHistoryValues := TRIM( SUBSTRING (( LENGTH(historyValues[j]) - 2 ) - 1 ) CHARACTERS STARTING AT 1 FROM historyValues[j] );
|
||||
if ( trimHistoryValues IN physOverrideValues ) then
|
||||
checkHistoryValues := (checkHistoryValues, historyValues[j]);
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_HISTObj := NEW ObservationType;
|
||||
this_HISTObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_HISTObj.ParameterGUID := vteHistory.ParameterGUID;
|
||||
this_HISTObj.DataType := "ListValue";
|
||||
this_HISTObj.ValueObj := NEW ListValueType;
|
||||
this_HISTObj.ValueObj.ListGUID := vteHistory.ConfigurationObj.ListGUID;
|
||||
listItems := ();
|
||||
|
||||
for item IN vteHistory.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkHistoryValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkHistoryValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_HISTObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := ( this_fs_doc.CurrentColumn.ChartedObservationsList, this_HISTObj);
|
||||
|
||||
endif;
|
||||
|
||||
//Retrieve CURRENT STATUS observation
|
||||
vteCurrStatus := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte current status");
|
||||
if ( exists vteCurrStatus ) then
|
||||
|
||||
currStatusValues := vteCurrStatus.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkStatusValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for k IN 1 seqto ( count currStatusValues ) do
|
||||
trimCurrStatusValues := TRIM( SUBSTRING (( LENGTH(currStatusValues[k]) - 2 ) - 1 ) CHARACTERS STARTING AT 1 FROM currStatusValues[k] );
|
||||
|
||||
if ( trimCurrStatusValues IN physOverrideValues ) then
|
||||
checkStatusValues := ( checkStatusValues, currStatusValues[k] );
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_CURRSTATObj := NEW ObservationType;
|
||||
this_CURRSTATObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_CURRSTATObj.ParameterGUID := vteCurrStatus.ParameterGUID;
|
||||
this_CURRSTATObj.DataType := "ListValue";
|
||||
this_CURRSTATObj.ValueObj := NEW ListValueType;
|
||||
this_CURRSTATObj.ValueObj.ListGUID := vteCurrStatus.ConfigurationObj.ListGUID;
|
||||
listItems := ();
|
||||
|
||||
for item IN vteCurrStatus.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkStatusValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkStatusValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_CURRSTATObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_CURRSTATObj);
|
||||
endif;
|
||||
|
||||
//Retrieve CURRENT LABS observations
|
||||
vteCurrLabs := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte current labs");
|
||||
if ( exists vteCurrLabs ) then
|
||||
currLabsValues := vteCurrLabs.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkLabValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for l IN 1 seqto ( count currLabsValues ) do
|
||||
trimCurrLabsValues := TRIM( SUBSTRING (( LENGTH(currLabsValues[l]) - 2 ) - 1 ) CHARACTERS STARTING AT 1 FROM currLabsValues[l] );
|
||||
|
||||
if ( trimCurrLabsValues IN physOverrideValues ) then
|
||||
checkLabValues := ( checkLabValues, currLabsValues[l] );
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_CURRLABObj := NEW ObservationType;
|
||||
this_CURRLABObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_CURRLABObj.ParameterGUID := vteCurrLabs.ParameterGUID;
|
||||
this_CURRLABObj.DataType := "ListValue";
|
||||
this_CURRLABObj.ValueObj := NEW ListValueType;
|
||||
this_CURRLABObj.ValueObj.ListGUID := vteCurrLabs.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN vteCurrLabs.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkLabValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkLabValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := ( listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_CURRLABObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := ( this_fs_doc.CurrentColumn.ChartedObservationsList, this_CURRLABObj);
|
||||
endif;
|
||||
|
||||
//Retrieve WOMEN ONLY observation
|
||||
vteWomenOnly := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte women only");
|
||||
if ( exists vteWomenOnly ) then
|
||||
womenOnlyValues := vteWomenOnly.ConfigurationObj.ListItemsList.Value;
|
||||
|
||||
checkWomenValues := ();
|
||||
if ( NOT allZeroOverrides ) then
|
||||
for j IN 1 seqto ( count womenOnlyValues ) do
|
||||
trimWOValues := Trim( SUBSTRING (( LENGTH(womenOnlyValues[j]) - 2 ) - 1 ) CHARACTERS STARTING AT 1 FROM womenOnlyValues[j] );
|
||||
|
||||
if ( trimWOValues IN physOverrideValues ) then
|
||||
checkWomenValues := ( checkWomenValues, womenOnlyValues[j] );
|
||||
endif;
|
||||
enddo;
|
||||
endif;
|
||||
|
||||
this_WOObj := NEW ObservationType;
|
||||
this_WOObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_WOObj.ParameterGUID := vteWomenOnly.ParameterGUID;
|
||||
this_WOObj.DataType := "ListValue";
|
||||
this_WOObj.ValueObj := NEW ListValueType;
|
||||
this_WOObj.ValueObj.ListGUID := vteWomenOnly.ConfigurationObj.ListGUID;
|
||||
listItems := ();
|
||||
|
||||
for item IN vteWomenOnly.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( count checkWomenValues = 0 ) then
|
||||
if ( selectedItem.Value matches pattern "%(0)%" ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
elseif ( selectedItem.Value IN checkWomenValues ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_WOObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_WOObj);
|
||||
endif; //If exists WomenOnlyParam
|
||||
|
||||
//******************* LOW RISK ***************************
|
||||
if ( NOT allZeroOverrides ) then
|
||||
vteScoreParam := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte score CAL" );
|
||||
if ( exists vteScoreParam ) then
|
||||
vteScoreObs := first of ( this_chartedObservationsList WHERE this_chartedObservationsList.ParameterGUID = vteScoreParam.ParameterGUID );
|
||||
vteScoreVal := vteScoreObs.ValueObj.Value as number;
|
||||
endif;
|
||||
else
|
||||
vteScoreVal := 0 as number;
|
||||
endif;
|
||||
|
||||
|
||||
lowRiskParam := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte low risk" );
|
||||
|
||||
if ( exists lowRiskParam ) then
|
||||
lowRiskScoreObs := first of ( this_chartedObservationsList WHERE this_chartedObservationsList.ParameterGUID = lowRiskParam.ParameterGUID );
|
||||
|
||||
this_lowRiskObj := NEW ObservationType;
|
||||
this_lowRiskObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_lowRiskObj.ParameterGUID := lowRiskParam.ParameterGUID;
|
||||
this_lowRiskObj.DataType := "ListValue";
|
||||
this_lowRiskObj.ValueObj := NEW ListValueType;
|
||||
this_lowRiskObj.ValueObj.ListGUID := lowRiskParam.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN lowRiskParam.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( vteScoreVal < 3 ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_lowRiskObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_lowRiskObj);
|
||||
endif;
|
||||
|
||||
else
|
||||
|
||||
//Do nothing, tell user no override exists
|
||||
alertMsg := "No physician vte override score exists.";
|
||||
dialogRes := call {{{SINGLE-QUOTE}}}MessageBox{{{SINGLE-QUOTE}}}.Show with alertMsg, "Physician VTE Override Score Alert", "OK" as {{{SINGLE-QUOTE}}}MessageBoxButtons{{{SINGLE-QUOTE}}}, "Exclamation" as {{{SINGLE-QUOTE}}}MessageBoxIcon{{{SINGLE-QUOTE}}};
|
||||
|
||||
this_PhysOverrideObj := NEW ObservationType;
|
||||
this_PhysOverrideObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_PhysOverrideObj.ParameterGUID := param.ParameterGUID;
|
||||
this_PhysOverrideObj.DataType := "ListValue";
|
||||
this_PhysOverrideObj.ValueObj := NEW ListValueType;
|
||||
this_PhysOverrideObj.ValueObj.ListGUID := param.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN param.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
selectedItem.IsSelected := false;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_PhysOverrideObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := ( this_fs_doc.CurrentColumn.ChartedObservationsList, this_PhysOverrideObj);
|
||||
endif; //Override values exist
|
||||
else
|
||||
//******************* LOW RISK ***************************
|
||||
vteScoreParam := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte score CAL" );
|
||||
if ( exists vteScoreParam ) then
|
||||
vteScoreObs := first of ( this_chartedObservationsList WHERE this_chartedObservationsList.ParameterGUID = vteScoreParam.ParameterGUID );
|
||||
vteScoreVal := vteScoreObs.ValueObj.Value as number;
|
||||
endif;
|
||||
|
||||
lowRiskParam := first of ( this_parameters WHERE this_parameters.Name = "AS SC vte low risk" );
|
||||
|
||||
if ( exists lowRiskParam ) then
|
||||
lowRiskScoreObs := first of ( this_chartedObservationsList WHERE this_chartedObservationsList.ParameterGUID = lowRiskParam.ParameterGUID );
|
||||
|
||||
this_lowRiskObj := NEW ObservationType;
|
||||
this_lowRiskObj.ClientDocumentGUID := this_fs_doc.ClientDocumentGUID;
|
||||
this_lowRiskObj.ParameterGUID := lowRiskParam.ParameterGUID;
|
||||
this_lowRiskObj.DataType := "ListValue";
|
||||
this_lowRiskObj.ValueObj := NEW ListValueType;
|
||||
this_lowRiskObj.ValueObj.ListGUID := lowRiskParam.ConfigurationObj.ListGUID;
|
||||
|
||||
listItems := ();
|
||||
|
||||
for item IN lowRiskParam.ConfigurationObj.ListItemsList do
|
||||
selectedItem := NEW ListValueListItemType;
|
||||
selectedItem.ListItemGUID := item.ListItemGUID;
|
||||
selectedItem.Value := item.Value;
|
||||
|
||||
if ( vteScoreVal < 3 ) then
|
||||
selectedItem.IsSelected := true;
|
||||
else
|
||||
selectedItem.IsSelected := false;
|
||||
endif;
|
||||
|
||||
listItems := (listItems, selectedItem);
|
||||
enddo;
|
||||
|
||||
this_lowRiskObj.ValueObj.ListItemsList := listItems;
|
||||
this_fs_doc.CurrentColumn.ChartedObservationsList := (this_fs_doc.CurrentColumn.ChartedObservationsList, this_lowRiskObj);
|
||||
endif;
|
||||
endif; //Physician Override Value
|
||||
endif; //If exists Physician Override Param
|
||||
endif; //Event Type
|
||||
|
||||
;;
|
||||
evoke:
|
||||
;;
|
||||
logic: conclude true;
|
||||
;;
|
||||
action: return this_documentCommunication;
|
||||
;;
|
||||
Urgency: 50;;
|
||||
end:
|
||||
Reference in New Issue
Block a user