213 lines
6.9 KiB
Plaintext
213 lines
6.9 KiB
Plaintext
maintenance:
|
|
|
|
title: SCH_Dialog_Operations;;
|
|
mlmname: SCH_Dialog_Operations;;
|
|
arden: version 2.5;;
|
|
version: 6.10;;
|
|
institution: SCH ;;
|
|
author: Shivprasad Jadhav(Allscripts);;
|
|
specialist: ;;
|
|
date: 2015-05-12;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: To Launch Different Dialogbox.
|
|
|
|
Argument Required ::
|
|
1) Client visit GUID
|
|
2) Operations ( Pass anyone from below three value based on performing operation )
|
|
A. SignatureManager
|
|
B. ExitCare
|
|
C. OrderReconciliationManager
|
|
D. HealthIssueManager
|
|
E. OrderEntry
|
|
|
|
|
|
Sample Argument ::
|
|
MLM_Name := MLM {{{SINGLE-QUOTE}}}GMS_Dialog_Operations{{{SINGLE-QUOTE}}}; // MLM name
|
|
1) SignatureManager
|
|
Status := call MLM_Name with ClientVisitGUID,"SignatureManager";
|
|
2) ExitCare
|
|
Status := call MLM_Name with ClientVisitGUID,"ExitCare";
|
|
3) OrderReconciliationManager
|
|
Status := call MLM_Name with ClientVisitGUID,"OrderReconciliationManager";
|
|
4) HealthIssueManager
|
|
Status := call MLM_Name with ClientVisitGUID,"HealthIssueManager";
|
|
5) OrderEntry
|
|
Status := call MLM_Name with ClientVisitGUID,"OrderEntry";
|
|
|
|
Return Type ::
|
|
MLM wil return Success if operation performs Successfully.
|
|
MLM wil return error_message if any error generate while performing operation Insert/Discontinue/Delete.
|
|
|
|
;;
|
|
explanation:
|
|
|
|
;;
|
|
keywords: ObjectsPlus, Orders
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
|
|
//Set to true if a decision.log is needed.
|
|
log_execution_info:= FALSE; //Set to FALSE for Production
|
|
|
|
(ClientVisitGUID,Dialog_Name // ClientVisit ObjectsPlus object
|
|
):= argument;
|
|
|
|
// 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.Common";
|
|
using namespace "ObjectsPlusXA.SunriseClinicalManager.Common";
|
|
using namespace "ObjectsPlusXA.SCM.Forms";
|
|
using namespace "ObjectsPlusXA.SunriseClinicalManager.Forms";
|
|
using "SXA.Framework" ;
|
|
using "SCMLib";
|
|
using namespace "SCMLib.Dialogs";
|
|
using namespace "SCMLib.Context";
|
|
using namespace "Eclipsys.SunriseXA.Framework.SCMSXAInterop";
|
|
|
|
If Not Called_By_Editor Then
|
|
|
|
mlm_name := "GMS_Dialog_Operations";
|
|
error_occurred := false;
|
|
|
|
error_destination := destination { Alert } with [
|
|
alert_type := "Warning",
|
|
short_message := "ObjectsPlus Error from MLM",
|
|
priority := "low",
|
|
scope := "chart",
|
|
Rule_group := "ObjectsPlus Error from MLM",
|
|
Rule_number := 1001,
|
|
Rule_subgroup := "",
|
|
Send_with_order := "",
|
|
Alert_dialog_settings := "",
|
|
Display_alert := true ];
|
|
|
|
try
|
|
|
|
client_visit_obj := call {{{SINGLE-QUOTE}}}ClientVisit{{{SINGLE-QUOTE}}}.FindByPrimaryKey
|
|
with ((ClientVisitGUID as number) as {{{SINGLE-QUOTE}}}Int64{{{SINGLE-QUOTE}}});
|
|
|
|
if Dialog_Name = "SignatureManager" then
|
|
sxaDialog := new NET_OBJECT {{{SINGLE-QUOTE}}}SXADialog{{{SINGLE-QUOTE}}};
|
|
void := call sxaDialog.ShowSXADialog with "SXADialogType_SignatureManager" as {{{SINGLE-QUOTE}}}SXADialogType{{{SINGLE-QUOTE}}};
|
|
endif;
|
|
|
|
if Dialog_Name = "ExitCare" then
|
|
try
|
|
using "SCMLib";
|
|
using namespace "SCMLib.HVCLogon";
|
|
using "SXA.ED.DischargeInstructions";
|
|
using namespace "SXA.ED.DischargeInstructions";
|
|
|
|
using "SXA.Framework" ;
|
|
using Namespace "Eclipsys.SunriseXA.Framework.WinClient" ;
|
|
shellinterface := new NET_OBJECT {{{SINGLE-QUOTE}}}XAShellInterface{{{SINGLE-QUOTE}}} ;
|
|
shellinterface := new NET_OBJECT {{{SINGLE-QUOTE}}}XAShellInterface{{{SINGLE-QUOTE}}} ;
|
|
connstring := call {{{SINGLE-QUOTE}}}HVCLogonObj{{{SINGLE-QUOTE}}}.GetConnectionString;
|
|
dis_instr := new NET_OBJECT {{{SINGLE-QUOTE}}}DischargeInstructions{{{SINGLE-QUOTE}}} ;
|
|
Exit_Care_Diaglog := call dis_instr.LaunchDischargeInstructions
|
|
with (shellinterface, true) ;
|
|
|
|
endtry;
|
|
catch Exception ex
|
|
error_occurred := true;
|
|
error_message := "{{+R}}Cannot start ExitCare Application: {{-R}}\n"
|
|
|| ex.Message || "\n\n";
|
|
msg := error_message || msg;
|
|
|
|
if ( dis_instr is NOT NULL ) then
|
|
void:= call dis_instr.Dispose;
|
|
dis_instr:= null;
|
|
endif;
|
|
endcatch;
|
|
endif;
|
|
|
|
if Dialog_Name = "OrderReconciliationManager" then
|
|
try
|
|
// Create the Order Reconciliation Manager object
|
|
order_rec_mgr_obj:= new NET_OBJECT {{{SINGLE-QUOTE}}}OrderReconciliationManager{{{SINGLE-QUOTE}}};
|
|
order_rec_mgr_obj.ClientVisitPrimaryKey := ((ClientVisitGUID as number) as {{{SINGLE-QUOTE}}}Int64{{{SINGLE-QUOTE}}});
|
|
void := call order_rec_mgr_obj.ShowDialog;
|
|
endtry;
|
|
catch exception ex
|
|
if ( order_rec_mgr_obj is NOT NULL ) then
|
|
void:= call order_rec_mgr_obj.Dispose;
|
|
order_rec_mgr_obj:= NULL;
|
|
endif;
|
|
endcatch;
|
|
endif;
|
|
|
|
if Dialog_Name = "HealthIssueManager" then
|
|
try
|
|
// Create the Order Reconciliation Manager object
|
|
order_rec_mgr_obj:= new NET_OBJECT {{{SINGLE-QUOTE}}}HealthIssueManager{{{SINGLE-QUOTE}}};
|
|
order_rec_mgr_obj.ClientVisitPrimaryKey := ((ClientVisitGUID as number) as {{{SINGLE-QUOTE}}}Int64{{{SINGLE-QUOTE}}});
|
|
void := call order_rec_mgr_obj.ShowDialog;
|
|
endtry;
|
|
catch exception ex
|
|
if ( order_rec_mgr_obj is NOT NULL ) then
|
|
void:= call order_rec_mgr_obj.Dispose;
|
|
order_rec_mgr_obj:= NULL;
|
|
endif;
|
|
endcatch;
|
|
endif;
|
|
|
|
if Dialog_Name = "OrderEntry" then
|
|
try
|
|
using "OpenDialogBoxManager";
|
|
using namespace "OpenDialogBoxManager";
|
|
DialogBox_obj:= new NET_OBJECT {{{SINGLE-QUOTE}}}OpenDialogBoxManager.OpenDialogBoxManager{{{SINGLE-QUOTE}}} With 1 as {{{SINGLE-QUOTE}}}System.Int64{{{SINGLE-QUOTE}}};
|
|
endtry;
|
|
catch exception ex
|
|
if ( DialogBox_obj is NOT NULL ) then
|
|
void:= call DialogBox_obj.Dispose;
|
|
DialogBox_obj := NULL;
|
|
endif;
|
|
endcatch;
|
|
endif;
|
|
|
|
endtry;
|
|
catch exception ex
|
|
error_occurred := true;
|
|
error_message := error_message ||
|
|
"{{+R}} Dialog Box {{-R}}\n" ||
|
|
ex.Message || "\n\n";
|
|
if ex.InnerException is not null net_object then
|
|
error_message := error_message ||
|
|
"Inner Exception: " || ex.InnerException.Message || "\n\n";
|
|
endif;
|
|
endcatch;
|
|
endif;
|
|
|
|
;;
|
|
priority: 50
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic:
|
|
conclude true;
|
|
;;
|
|
action:
|
|
if Error_occurred then
|
|
write "An error has occured in the MLM "
|
|
|| "{{+B}}" || mlm_name || "{{-B}} "
|
|
||"Please notify your System Administrators that an error message has "
|
|
||"occurred for this patient. They will review the following error "
|
|
||"message: \n" at error_destination;
|
|
write error_message at error_destination;
|
|
endif;
|
|
|
|
if Error_occurred then
|
|
return error_message;
|
|
else
|
|
return "Success";
|
|
endif;
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|