650 lines
28 KiB
Plaintext
650 lines
28 KiB
Plaintext
maintenance:
|
|
|
|
title: DOC_SCH_Readmission_Risk_Select;;
|
|
mlmname: DOC_SCH_Readmission_Risk_Select;;
|
|
arden: version 2.5;;
|
|
version: 5.50;;
|
|
institution: SCH ;;
|
|
author: Chintan Tilwa ;;
|
|
specialist: ;;
|
|
date: 2012-09-14;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose:
|
|
;;
|
|
explanation:
|
|
Change History
|
|
-----------------------------------------------------------------------
|
|
03/07/2017 SSJ CSR #35407- Commented By Shivprasad to hide message {{{SINGLE-QUOTE}}}By selecting a Nutritional Risk, the Prealbumin and Daily Order for Prealbumin have automatically been created{{{SINGLE-QUOTE}}}
|
|
;;
|
|
keywords:
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
|
|
(this_documentCommunication) := argument;
|
|
//Get The Structure Note
|
|
(this_FS_doc) := this_documentCommunication.DocumentConfigurationObj;
|
|
//Get the Parameter List
|
|
(this_parms) := this_FS_doc.ParametersList;
|
|
//Paramters defination
|
|
(this_cols) := this_FS_doc.ColumnsList;
|
|
(this_curr_col) := this_FS_doc.Currentcolumn;
|
|
(this_currentObs) := this_documentCommunication.CurrentObservationObj;
|
|
(this_observations) := this_FS_doc.ChartedObservationsList;
|
|
|
|
local_session := CDS_SESSION.local;
|
|
|
|
MLM_DIPA := MLM {{{SINGLE-QUOTE}}}UTIL_OBJECT_Customize_DIPA_MLM{{{SINGLE-QUOTE}}};
|
|
|
|
MLM_HI2 := MLM {{{SINGLE-QUOTE}}}DOC_SCH_Readmission_Health_Issue_Diabetes{{{SINGLE-QUOTE}}};
|
|
obs_HI2 := Call MLM_HI2 With this_documentCommunication;
|
|
|
|
this_curr_obs := last (this_FS_doc.chartedobservationslist);
|
|
this_current_prm := first of (this_parms where this_parms.parameterGUID = this_currentObs.ParameterGUID);
|
|
cur_name := this_current_prm.Name;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
If (cur_name = "SCH_CK_Pharmacy Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Pharmacy Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Pharmacy Risk Criteria" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Pharmacy Risk Criteria" ;
|
|
sessionPharmacy := local_session.SessionReadmissionPharmacy ;
|
|
|
|
if sessionPharmacy = "" and (sel1 <> "" ) then
|
|
sessionPharmacy := sel1;
|
|
local_session.SessionReadmissionPharmacy := sel1;
|
|
endif;
|
|
|
|
if sessionPharmacy = "No Pharmacy Risk Criteria" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionPharmacy := "";
|
|
endif;
|
|
|
|
if sessionPharmacy <> "" and sessionPharmacy <> "No Pharmacy Risk Criteria" and "No Pharmacy Risk Criteria" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionPharmacy := "";
|
|
endif;
|
|
|
|
if sessionPharmacy <> "No Pharmacy Risk Criteria" and sel2 <> "" then
|
|
local_session.SessionReadmissionPharmacy := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionPharmacy = "No Pharmacy Risk Criteria" and sel1 <> "No Pharmacy Risk Criteria" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Pharmacy Risk Criteria" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionPharmacy = "No Pharmacy Risk Criteria" and sel1 IS NULL then
|
|
local_session.SessionReadmissionPharmacy := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
If (cur_name = "SCH_CK_Diagnosis Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Diagnosis Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Diagnosis Risk Criteria" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Diagnosis Risk Criteria" ;
|
|
sessionDiagnosis := local_session.SessionReadmissionDiagnosis ;
|
|
sessionDiagnosisForMessage := local_session.SessionReadmissionDiagnosisForMessage ;
|
|
|
|
if "New Onset Diabetes" matches pattern sessionDiagnosisForMessage then
|
|
if "New Onset Diabetes" in sel1Col then
|
|
local_session.SessionReadmissionDiagnosisForMessage := "New Onset Diabetes";
|
|
Else
|
|
local_session.SessionReadmissionDiagnosisForMessage := "";
|
|
EndIF;
|
|
x := 1;
|
|
Else
|
|
if "New Onset Diabetes" in sel1Col and sessionDiagnosis <> "No Diagnosis Risk Criteria" then
|
|
this_documentCommunication.DisplayMessage := TRUE;
|
|
this_documentCommunication.Message := "By selecting New Onset Diabetes- an order for a Dietitian Consult (New Onset Diabetes) has automatically been created";
|
|
local_session.SessionReadmissionDiagnosisForMessage := "New Onset Diabetes";
|
|
Else
|
|
local_session.SessionReadmissionDiagnosisForMessage := "";
|
|
EndIF;
|
|
Endif;
|
|
|
|
if sessionDiagnosis = "" and (sel1 <> "" ) then
|
|
sessionDiagnosis := sel1;
|
|
local_session.SessionReadmissionDiagnosis := sel1;
|
|
endif;
|
|
|
|
if sessionDiagnosis = "No Diagnosis Risk Criteria" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionDiagnosis := "";
|
|
endif;
|
|
|
|
if sessionDiagnosis <> "" and sessionDiagnosis <> "No Diagnosis Risk Criteria" and "No Diagnosis Risk Criteria" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionDiagnosis := "";
|
|
endif;
|
|
|
|
if sessionDiagnosis <> "No Diagnosis Risk Criteria" and sel2 <> "" then
|
|
local_session.SessionReadmissionDiagnosis := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDiagnosis = "No Diagnosis Risk Criteria" and sel1 <> "No Diagnosis Risk Criteria" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Diagnosis Risk Criteria" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDiagnosis = "No Diagnosis Risk Criteria" and sel1 IS NULL then
|
|
local_session.SessionReadmissionDiagnosis := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
If (cur_name = "SCH_CK_Discharge Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Discharge Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Discharge Risk Criteria" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Discharge Risk Criteria" ;
|
|
sessionDischarge := local_session.SessionReadmissionDischarge ;
|
|
|
|
if sessionDischarge = "" and (sel1 <> "" ) then
|
|
sessionDischarge := sel1;
|
|
local_session.SessionReadmissionDischarge := sel1;
|
|
endif;
|
|
|
|
if sessionDischarge = "No Discharge Risk Criteria" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionDischarge := "";
|
|
endif;
|
|
|
|
if sessionDischarge <> "" and sessionDischarge <> "No Discharge Risk Criteria" and "No Discharge Risk Criteria" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionDischarge := "";
|
|
endif;
|
|
|
|
if sessionDischarge <> "No Discharge Risk Criteria" and sel2 <> "" then
|
|
local_session.SessionReadmissionDischarge := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDischarge = "No Discharge Risk Criteria" and sel1 <> "No Discharge Risk Criteria" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Discharge Risk Criteria" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDischarge = "No Discharge Risk Criteria" and sel1 IS NULL then
|
|
local_session.SessionReadmissionDischarge := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
If (cur_name = "SCH_CK_Functional Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Functional Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Functional Risk Criteria" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Functional Risk Criteria" ;
|
|
sessionFunctional := local_session.SessionReadmissionFunctional ;
|
|
|
|
if sessionFunctional = "" and (sel1 <> "" ) then
|
|
sessionFunctional := sel1;
|
|
local_session.SessionReadmissionFunctional := sel1;
|
|
endif;
|
|
|
|
if sessionFunctional = "No Functional Risk Criteria" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionFunctional := "";
|
|
endif;
|
|
|
|
if sessionFunctional <> "" and sessionFunctional <> "No Functional Risk Criteria" and "No Functional Risk Criteria" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionFunctional := "";
|
|
endif;
|
|
|
|
if sessionFunctional <> "No Functional Risk Criteria" and sel2 <> "" then
|
|
local_session.SessionReadmissionFunctional := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionFunctional = "No Functional Risk Criteria" and sel1 <> "No Functional Risk Criteria" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Functional Risk Criteria" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionFunctional = "No Functional Risk Criteria" and sel1 IS NULL then
|
|
local_session.SessionReadmissionFunctional := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
|
|
If (cur_name = "SCH_CK_Device(s) on admission, ED, and OR") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Device(s) on admission, ED, and OR");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Devices Present" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Devices Present" ;
|
|
sessionDevice := local_session.SessionReadmissionDevice ;
|
|
sel3 := Last of( lst1.Value Where lst1.IsSelected = true );
|
|
|
|
|
|
|
|
for i in lst1 do
|
|
if i.Isselected = true and i.value not in ("Catheter: Foley","Catheter: IV","No Devices Present") then
|
|
List1 := List1 , i.Value ;
|
|
endif;
|
|
enddo;
|
|
|
|
CurrList_counter := 1 seqto count List1;
|
|
for CC in CurrList_counter do
|
|
CountNo := CC ;
|
|
Enddo;
|
|
|
|
//start
|
|
|
|
SessionDeviceMessage := local_session.sessionDeviceMessage ;
|
|
|
|
for i in lst1 do
|
|
if i.Isselected = true Then
|
|
If i.value <> "No Devices Present" then
|
|
List1 := List1 , i.Value ;
|
|
EndIF;
|
|
strSelectedDev := strSelectedDev || ", " || i.Value;
|
|
endif;
|
|
|
|
enddo;
|
|
|
|
|
|
if SessionDeviceMessage = "" then
|
|
if sel3 = "Catheter: Port" or sel3 = "Catheter: Central Line" or sel3 = "Catheter: PICC Line" then
|
|
//show alert
|
|
this_DocumentCommunication.DisplayMessage := True;
|
|
this_DocumentCommunication.Message := "By selecting a Port, Central Line or PICC Line, an Infusion Center Consult has been automatically been created";
|
|
|
|
EndIF;
|
|
local_session.sessionDeviceMessage := sel3;
|
|
|
|
ElseIF SessionDeviceMessage Matches Pattern "%Port%" or
|
|
SessionDeviceMessage Matches Pattern "%Central%" or
|
|
SessionDeviceMessage Matches Pattern "%PICC%" Then
|
|
|
|
local_session.sessionDeviceMessage := strSelectedDev;
|
|
|
|
Else
|
|
if sel3 is null then
|
|
local_session.sessionDeviceMessage := "";
|
|
ElseIf sel3 = "Catheter: Port" or sel3 = "Catheter: Central Line" or sel3 = "Catheter: PICC Line" then
|
|
//show alert
|
|
this_DocumentCommunication.DisplayMessage := True;
|
|
this_DocumentCommunication.Message := "By selecting a Port, Central Line or PICC Line, an Infusion Center Consult has been automatically been created";
|
|
local_session.sessionDeviceMessage := strSelectedDev;
|
|
EndIF;
|
|
EndIF;
|
|
|
|
//end
|
|
|
|
if sessionDevice = "" and (sel1 <> "" ) then
|
|
sessionDevice := sel1;
|
|
local_session.SessionReadmissionDevice := sel1;
|
|
endif;
|
|
|
|
if sessionDevice = "No Devices Present" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionDevice := "";
|
|
endif;
|
|
|
|
if sessionDevice <> "" and sessionDevice <> "No Devices Present" and "No Devices Present" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionDevice := "";
|
|
endif;
|
|
|
|
if sessionDevice <> "No Devices Present" and sel2 <> "" then
|
|
local_session.SessionReadmissionDevice := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDevice = "No Devices Present" and sel1 <> "No Devices Present" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Devices Present" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionDevice = "No Devices Present" and sel1 IS NULL then
|
|
local_session.SessionReadmissionDevice := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
If (cur_name = "SCH_CK_Nutritional Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Nutritional Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Nutritional Risk Criteria" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Nutritional Risk Criteria" ;
|
|
sessionNutritional := local_session.SessionReadmissionNutritional ;
|
|
|
|
sessionNutritionalForMessage := local_session.SessionNutritionalForMessage ;
|
|
|
|
strSelectedNut := "";
|
|
|
|
for i in lst1 do
|
|
if i.Isselected = true Then
|
|
If i.value <> "No Nutritional Risk Criteria" then
|
|
List1 := List1 , i.Value ;
|
|
EndIF;
|
|
strSelectedNut := strSelectedNut || "`" || i.Value;
|
|
endif;
|
|
|
|
enddo;
|
|
|
|
if sessionNutritionalForMessage = "" and sel1 <> "No Nutritional Risk Criteria" then
|
|
this_DocumentCommunication.DisplayMessage := False; // True --- CSR #35407- Commented By Shivprasad to hide message
|
|
this_DocumentCommunication.Message := "By selecting a Nutritional Risk, the Prealbumin and Daily Order for Prealbumin have automatically been created";
|
|
local_session.SessionNutritionalForMessage := strSelectedNut;
|
|
|
|
ElseIf sel1 is null then
|
|
local_session.SessionNutritionalForMessage := "";
|
|
|
|
ElseIf sessionNutritionalForMessage matches pattern "`" and sel1 <> "" then
|
|
local_session.SessionNutritionalForMessage := strSelectedNut;
|
|
|
|
ElseIf sel1 = "No Nutritional Risk Criteria" then
|
|
local_session.SessionNutritionalForMessage := strSelectedNut;
|
|
EndIF;
|
|
|
|
|
|
if sessionNutritional = "" and (sel1 <> "" ) then
|
|
sessionNutritional := sel1;
|
|
local_session.SessionReadmissionNutritional := sel1;
|
|
endif;
|
|
|
|
if sessionNutritional = "No Nutritional Risk Criteria" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionNutritional := "";
|
|
endif;
|
|
|
|
if sessionNutritional <> "" and sessionNutritional <> "No Nutritional Risk Criteria" and "No Nutritional Risk Criteria" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionNutritional := "";
|
|
endif;
|
|
|
|
if sessionNutritional <> "No Nutritional Risk Criteria" and sel2 <> "" then
|
|
local_session.SessionReadmissionNutritional := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionNutritional = "No Nutritional Risk Criteria" and sel1 <> "No Nutritional Risk Criteria" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Nutritional Risk Criteria" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionNutritional = "No Nutritional Risk Criteria" and sel1 IS NULL then
|
|
local_session.SessionReadmissionNutritional := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/*************************************************************************************************************/
|
|
|
|
|
|
If (cur_name = "SCH_CK_Smoking Risk") then
|
|
|
|
sel1 := "" ;
|
|
sel2 := "" ;
|
|
prm := first of (this_parms where this_parms.Name = "SCH_CK_Smoking Risk");
|
|
Obs := first of (this_observations where this_observations.ParameterGUID = prm.ParameterGUID);
|
|
lst1 := Obs.valueObj.ListItemsList ;
|
|
sel1 := First of( lst1.Value Where lst1.IsSelected = true );
|
|
sel1Col := lst1.Value where lst1.IsSelected = true ;
|
|
sel2 := First Of( lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Smoking Risk" ) ;
|
|
sel2Col := lst1.Value where lst1.IsSelected = true and lst1.Value <> "No Smoking Risk" ;
|
|
sessionSmoking := local_session.SessionReadmissionSmoking ;
|
|
SessionSmokingForMessage := local_session.SessionSmokingForMessage ;
|
|
|
|
strSelectedNut := "";
|
|
|
|
for i in lst1 do
|
|
if i.Isselected = true Then
|
|
If i.value <> "No Smoking Risk" then
|
|
List1 := List1 , i.Value ;
|
|
EndIF;
|
|
strSelectedNut := strSelectedNut || "`" || i.Value;
|
|
endif;
|
|
|
|
enddo;
|
|
|
|
if SessionSmokingForMessage = "" and sel1 <> "No Smoking Risk" then
|
|
this_DocumentCommunication.DisplayMessage := True;
|
|
this_DocumentCommunication.Message := "By selecting Smoking Risk Order- an order for a Pulmonary Health Education Consult has automatically been created";
|
|
local_session.SessionSmokingForMessage := strSelectedNut;
|
|
ElseIf sel1 is null then
|
|
local_session.SessionSmokingForMessage := "";
|
|
ElseIf SessionSmokingForMessage matches pattern "`" and sel1 <> "" then
|
|
local_session.SessionSmokingForMessage := strSelectedNut;
|
|
ElseIf sel1 = "No Smoking Risk" then
|
|
local_session.SessionSmokingForMessage := strSelectedNut;
|
|
EndIF;
|
|
|
|
if sessionSmoking = "" and (sel1 <> "" ) then
|
|
sessionSmoking := sel1;
|
|
local_session.SessionReadmissionSmoking := sel1;
|
|
endif;
|
|
|
|
if sessionSmoking = "No Smoking Risk" and sel1 IS NULL and sel2 IS NULL then
|
|
local_session.SessionReadmissionSmoking := "";
|
|
endif;
|
|
|
|
if sessionSmoking <> "" and sessionSmoking <> "No Smoking Risk" and "No Smoking Risk" not in sel1Col then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
local_session.SessionReadmissionSmoking := "";
|
|
endif;
|
|
|
|
if sessionSmoking <> "No Smoking Risk" and sel2 <> "" then
|
|
local_session.SessionReadmissionSmoking := "";
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, sel2Col ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionSmoking = "No Smoking Risk" and sel1 <> "No Smoking Risk" then
|
|
obs2 := CALL MLM_DIPA WITH this_DocumentCommunication, prm, "No Smoking Risk" ;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs2);
|
|
endif;
|
|
|
|
if sessionSmoking = "No Smoking Risk" and sel1 IS NULL then
|
|
local_session.SessionReadmissionSmoking := "";
|
|
endif;
|
|
|
|
Endif;
|
|
|
|
/***********************************************************************************************************************************/
|
|
|
|
listChronic := ();
|
|
prm11 := first of (this_parms where this_parms.Name = "SCH_CK_Chronic Conditions");
|
|
ObsChronic := first of (this_observations where this_observations.ParameterGUID = prm11.ParameterGUID );
|
|
lstChronic := ObsChronic.valueObj.ListItemsList ;
|
|
|
|
for i in lstChronic do
|
|
if i.Isselected = true then
|
|
listChronic := listChronic , i.Value ;
|
|
endif;
|
|
enddo;
|
|
|
|
final_List1 := ();
|
|
final_List1 := listChronic ;
|
|
|
|
prmDiag := first of (this_parms where this_parms.Name = "SCH_CK_Diagnosis Risk");
|
|
ObsDiag := first of (this_observations where this_observations.ParameterGUID = prmDiag.ParameterGUID);
|
|
lstDiag := ObsDiag.valueObj.ListItemsList ;
|
|
selDiag1 := first of ( lstDiag.Value where lstDiag.IsSelected = true and lstDiag.Value = "New Onset Diabetes" ) ;
|
|
|
|
if selDiag1 = "New Onset Diabetes" and local_session.SessionReadmissionDiagnosis = "" then
|
|
final_List1:= final_List1 , "Diabetes" ;
|
|
Endif;
|
|
|
|
obs11 := CALL MLM_DIPA WITH this_DocumentCommunication, prm11, final_List1;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs11);
|
|
|
|
listRisk := ();
|
|
prm22 := first of (this_parms where this_parms.Name = "SCH_CK_Risk Factors");
|
|
ObsRisk := first of (this_observations where this_observations.ParameterGUID = prm22.ParameterGUID );
|
|
lstRisk := ObsRisk.valueObj.ListItemsList ;
|
|
|
|
for i in lstRisk do
|
|
if i.Isselected = true then
|
|
//if i.Value not in ("Lives alone", "Limited support network", "ADL assistance needed", "Short life expectancy", "Help with managing medications needed", "Pressure or Stasis Ulcer") then
|
|
listRisk := listRisk , i.Value ;
|
|
//Endif;
|
|
endif;
|
|
enddo;
|
|
|
|
final_List := ();
|
|
final_List := listRisk ;
|
|
|
|
selDiag := first of ( lstDiag.Value where lstDiag.IsSelected = true and lstDiag.Value = "End of Life issues/Hospice" ) ;
|
|
|
|
if selDiag = "End of Life issues/Hospice" and local_session.SessionReadmissionDiagnosis = "" then
|
|
final_List:= final_List , "Short life expectancy" ;
|
|
Endif;
|
|
|
|
|
|
prmDisc := first of (this_parms where this_parms.Name = "SCH_CK_Discharge Risk");
|
|
ObsDisc := first of (this_observations where this_observations.ParameterGUID = prmDisc.ParameterGUID);
|
|
lstDisc := ObsDisc.valueObj.ListItemsList ;
|
|
selDiscCompro := First of( lstDisc.Value where lstDisc.IsSelected = true and lstDisc.Value = "Compromised patient who lacks caregiver support" );
|
|
selDiscMed := First of( lstDisc.Value where lstDisc.IsSelected = true and lstDisc.Value = "Medication Assistance" );
|
|
|
|
if selDiscCompro = "Compromised patient who lacks caregiver support" and local_session.SessionReadmissionDischarge = "" then
|
|
final_List:= final_List , "Limited support network";
|
|
Endif;
|
|
|
|
|
|
if selDiscMed = "Medication Assistance" and local_session.SessionReadmissionDischarge = "" then
|
|
final_List:= final_List , "Help with managing medications needed";
|
|
Endif;
|
|
|
|
|
|
prmFunc := first of (this_parms where this_parms.Name = "SCH_CK_Functional Risk");
|
|
ObsFunc := first of (this_observations where this_observations.ParameterGUID = prmFunc.ParameterGUID);
|
|
lstFunc := ObsFunc.valueObj.ListItemsList ;
|
|
selFuncDec := First of( lstFunc.Value where lstFunc.IsSelected = true and lstFunc.Value = "Decreased Ability to do ADL{{{SINGLE-QUOTE}}}s last week" );
|
|
selFuncPat := First of( lstFunc.Value where lstFunc.IsSelected = true and lstFunc.Value = "Patient Lives Alone-Can{{{SINGLE-QUOTE}}}t Transfer" );
|
|
|
|
if selFuncDec = "Decreased Ability to do ADL{{{SINGLE-QUOTE}}}s last week" and local_session.SessionReadmissionFunctional = "" then
|
|
final_List:= final_List , "ADL assistance needed";
|
|
Endif;
|
|
|
|
if selFuncPat = "Patient Lives Alone-Can{{{SINGLE-QUOTE}}}t Transfer" and local_session.SessionReadmissionFunctional = "" then
|
|
final_List:= final_List , "Lives alone";
|
|
Endif;
|
|
|
|
prmNutr := first of (this_parms where this_parms.Name = "SCH_CK_Nutritional Risk");
|
|
ObsNutr := first of (this_observations where this_observations.ParameterGUID = prmNutr.ParameterGUID);
|
|
lstNutr := ObsNutr.valueObj.ListItemsList ;
|
|
selNutrDecu := First of( lstNutr.Value where lstNutr.IsSelected = true and lstNutr.Value = "Decubitis Pressure Ulcer Present" );
|
|
|
|
if selNutrDecu = "Decubitis Pressure Ulcer Present" and local_session.SessionReadmissionNutritional = "" then
|
|
final_List:= final_List , "Pressure or Stasis Ulcer";
|
|
Endif;
|
|
|
|
|
|
obs22 := CALL MLM_DIPA WITH this_DocumentCommunication, prm22, final_List;
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList := (
|
|
this_documentCommunication.DocumentConfigurationObj.ChartedObservationsList, obs22);
|
|
|
|
MLM_Score := MLM {{{SINGLE-QUOTE}}}DOC_SCH_Readmission_Risk_Score{{{SINGLE-QUOTE}}};
|
|
obs_Score := Call MLM_Score With this_documentCommunication;
|
|
|
|
;;
|
|
priority: 50
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic:
|
|
conclude true;
|
|
;;
|
|
action:
|
|
return this_documentCommunication;
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|