128 lines
3.0 KiB
Plaintext
128 lines
3.0 KiB
Plaintext
maintenance:
|
|
|
|
title: SCH_PRIVACY_STATUS_COLUMN_UPDATE;;
|
|
mlmname: SCH_PRIVACY_STATUS_COLUMN_UPDATE;;
|
|
arden: version 2.50;;
|
|
version: 18.4;;
|
|
institution: St. Clair Hospital;;
|
|
author: Teresa Spicuzza ;;
|
|
specialist: Steve Jones ;;
|
|
date: 2019-08-14;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: Add value to Enterprise Defined Column Privacy
|
|
|
|
;;
|
|
|
|
explanation: Create column
|
|
|
|
|
|
Change history
|
|
|
|
08.13.2019 TMS CSR # Created to populate enterprise defined column for Privacy based upon value Privacy Status of "Opt Out Of Directory"
|
|
|
|
;;
|
|
keywords: ObjectsPlus/XA, Enterprise Defined Column
|
|
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
|
|
data:
|
|
|
|
// Specify which .NET assemblies need to be loaded for ObjectsPlus
|
|
standard_libs := MLM {{{SINGLE-QUOTE}}}std_include_libs{{{SINGLE-QUOTE}}};
|
|
include standard_libs;
|
|
|
|
|
|
//Include generic function to update enterprise defined column
|
|
create_ED_column := MLM {{{SINGLE-QUOTE}}}SCH_FUNC_CREATE_ENTERPRISE_DEFINED_COLUMN{{{SINGLE-QUOTE}}};
|
|
|
|
log_execution_info := false;
|
|
update_column := false;
|
|
privacy_col_value := "";
|
|
|
|
//Create Enterprise Defined Column Obj
|
|
EDCObj := OBJECT [
|
|
column_name,
|
|
column_value,
|
|
client_guid,
|
|
chart_guid,
|
|
client_visit_guid
|
|
];
|
|
|
|
//Event Triggers
|
|
visit_enter_event := event{ClientVisitEnter Any ClientVisit};
|
|
visit_modify_event:= event{ClientVisitModify Any ClientVisit};
|
|
|
|
//--------------------------------------------------------------------
|
|
if called_by_editor
|
|
then
|
|
EvokingObject := read last { UserInfo : THIS };
|
|
endif;
|
|
|
|
|
|
|
|
(UserDisplayaName ) := read last { UserInfo: Displayname };
|
|
|
|
|
|
if EvokingEventType = "ClientVisitEnter" or EvokingEventType = "ClientVisitModify"
|
|
then
|
|
(client_guid, chart_guid, client_visit_guid, PrivacyStatusGUID) := read last {ClientVisit: clientguid, chartguid, guid, PrivacyStatusGUID REFERENCING EvokingObject};
|
|
endif;
|
|
|
|
if EvokingEventType = "ClientVisitEnter" OR ( UserDisplayaName <> "Interface" AND evokingEventType = "ClientVisitModify" )
|
|
THEN
|
|
|
|
|
|
PrivacyStatusValue := read last
|
|
{" select ps.Code from cv3PrivacyStatus ps
|
|
where ps.GUID = " || PrivacyStatusGUID
|
|
};
|
|
|
|
|
|
If PrivacyStatusValue = "Opt Out of Directory" then
|
|
Privacy_Column_Value := "DISCLOSE NO INFORMATION";
|
|
update_column := true;
|
|
else
|
|
Privacy_Column_Value := "";
|
|
update_column := true;
|
|
|
|
endif;
|
|
endif;
|
|
;;
|
|
priority: 50
|
|
;;
|
|
evoke:
|
|
|
|
visit_enter_event ;
|
|
visit_modify_event ;
|
|
|
|
;;
|
|
logic:
|
|
if ( EvokingObject is null ) then
|
|
conclude false;
|
|
endif;
|
|
|
|
if ( update_column = true AND ( EvokingEvent = visit_enter_event OR EvokingEvent = visit_modify_event ) ) then
|
|
|
|
Privacy_Col := NEW EDCObj WITH [
|
|
column_name := "Privacy",
|
|
column_value := Privacy_Column_Value,
|
|
client_guid := Client_GUID,
|
|
chart_guid := Chart_GUID,
|
|
client_visit_guid := Client_Visit_GUID
|
|
];
|
|
|
|
return_value := call create_ED_column with ( Privacy_Col );
|
|
conclude true;
|
|
|
|
|
|
endif;
|
|
;;
|
|
action:
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|