173 lines
7.3 KiB
Plaintext
173 lines
7.3 KiB
Plaintext
maintenance:
|
|
|
|
title: SCH_CoSignature Warning Alert ;;
|
|
FileName: SCH_CoSignature_Warning_Alert ;;
|
|
arden: version 2.5;;
|
|
version: 5.50;;
|
|
institution: SCH ;;
|
|
author: Shivprasad Jadhav;;
|
|
specialist: ;;
|
|
date: 2015-03-25;;
|
|
validation: testing;;
|
|
|
|
library:
|
|
purpose: 25-03-2015 CSR :33292 - PA CNRP MLM Created.
|
|
MLM fires a warning alert if note author is PA,PA-C or CRNP .
|
|
;;
|
|
explanation:
|
|
This MLM is evoked on entering a new document in an Outpatient Visit .
|
|
This MLM checks to see if a Cosignature has been requested for the document.
|
|
The Phsician progress, eConsult, History and Physical and Discharge Summary e Note note when done by a PA, PA-C or and ust be signed by a physician.
|
|
If they select save and there is not a doctor selected under authored by other or co-signer then fire and alert.
|
|
The Alert will state: “A physician must be selected to save this document: Please click the Document Info tab and select your physician.”
|
|
|
|
|
|
Change history
|
|
|
|
DEV 02.19.2018 DW CSR# 35320 SSC - Added "IntraOp Nursing Note" to the documents list and "RN" to the occupation type list
|
|
|
|
;;
|
|
keywords: ClientDocument; CoSignature; Outpatient;
|
|
;;
|
|
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;
|
|
|
|
error_occurred := false;
|
|
error_message := "";
|
|
|
|
log_execution_info := false;
|
|
|
|
/* Place the triggering event which is the entry of a new Document"Clinic Note"*/
|
|
|
|
Document_Enter := event { ClientDocumentEnter User ClientDocument :
|
|
WHERE DocumentName = "Physician Progress Note"
|
|
or DocumentName = "Consult eNote"
|
|
or DocumentName = "History and Physical"
|
|
or DocumentName = "Discharge Summary eNote"
|
|
Or DocumentName = "Physician Progress Note - CCM"
|
|
Or DocumentName = "Physician Progress Note by System-Enhanced"
|
|
Or DocumentName = "Physician Progress Note- Cardiology"
|
|
Or DocumentName = "Physician Progress Note- Rehab"
|
|
Or DocumentName = "Post Procedure Note- Brief"
|
|
Or DocumentName = "Hospitalist Intervention Note"
|
|
or DocumentName = "IntraOp Nursing Note"
|
|
|
|
};
|
|
|
|
//Document_Enter := event {ClientDocumentEnter User ClientDocument: where documentname in ("Readmission Risk Assessment","Adult Patient Profile")};
|
|
//Document_Modify := event {ClientDocumentModify User ClientDocument: where documentname in ("Readmission Risk Assessment","Adult Patient Profile")};
|
|
|
|
|
|
|
|
Document_Modify := event { ClientDocumentModify User ClientDocument:
|
|
WHERE DocumentName = "Physician Progress Note"
|
|
or DocumentName = "Consult eNote"
|
|
or DocumentName = "History and Physical"
|
|
or DocumentName = "Discharge Summary eNote"
|
|
Or DocumentName = "Physician Progress Note - CCM"
|
|
Or DocumentName = "Physician Progress Note by System-Enhanced"
|
|
Or DocumentName = "Physician Progress Note- Cardiology"
|
|
Or DocumentName = "Physician Progress Note- Rehab"
|
|
Or DocumentName = "Post Procedure Note- Brief"
|
|
Or DocumentName = "Hospitalist Intervention Note"
|
|
or DocumentName = "IntraOp Nursing Note"
|
|
};
|
|
|
|
alert_destination := destination { Alert: Warning, "Reminder: select co-signature box & enter attending MD name",
|
|
low, chart,"CoSignature",1050,"","No Override Allowed" };
|
|
|
|
/* This block executes only when this MLM is called by the editor */
|
|
if called_by_editor
|
|
then
|
|
client_guid:= read last{ClientInfo: GUID};
|
|
EvokingObject := read last {ClientDocument : THIS
|
|
WHERE ( DocumentName = "Physician Progress Note"
|
|
or DocumentName = "Consult eNote"
|
|
or DocumentName = "History and Physical"
|
|
or DocumentName = "Discharge Summary eNote"
|
|
Or DocumentName = "Physician Progress Note - CCM"
|
|
Or DocumentName = "Physician Progress Note by System-Enhanced"
|
|
Or DocumentName = "Physician Progress Note- Cardiology"
|
|
Or DocumentName = "Physician Progress Note- Rehab"
|
|
Or DocumentName = "Post Procedure Note- Brief"
|
|
Or DocumentName ="Hospitalist Intervention Note"
|
|
or DocumentName = "IntraOp Nursing Note"
|
|
) AND ClientGUID = client_guid AND entrytype = 4};
|
|
|
|
endif;
|
|
|
|
ToBeSigned_Flag:= read last{ClientDocument: ToBeSigned referencing EvokingObject};
|
|
|
|
/* Get the received document{{{SINGLE-QUOTE}}}s name, clientGUID and clientVisitGUID from the evoking or calling object */
|
|
|
|
(client_visit_guid,
|
|
client_guid,
|
|
Cur_Doc_ToBeSigned,
|
|
Cur_Doc_AuthoredDateTime) := read Last
|
|
{ClientDocument : ClientVisitGUID, ClientGUID,ToBeSigned, AuthoredDtm REFERENCING EvokingObject };
|
|
|
|
//Get the user name from the object layer
|
|
(User_GUID, user_name, occupation_code, orderrole_type) := read last { UserInfo: GUID, DisplayName, OccupationCode, OrderRoleType };
|
|
|
|
/*
|
|
isAttending := READ last {"select count(*) from CV3CareProviderVisitRole " ||
|
|
" where ProviderGUID = " || SQL(User_GUID) ||
|
|
" and RoleTypeGUID in (select GUID from CV3CareProviderRoleType where TypeCode = {{{SINGLE-QUOTE}}}Physician{{{SINGLE-QUOTE}}} and RoleCode = {{{SINGLE-QUOTE}}}Attending{{{SINGLE-QUOTE}}})"
|
|
} ;
|
|
*/
|
|
|
|
OrderRole_List := ("CRNP", "PA", "PA-C" , "RN" );
|
|
//, "Nurse Aid", "Nurse Manager", "Nursing technician", "Physician Therapy", "Physician Assistant", "Medical Assistant", "Medical Student") ;
|
|
|
|
|
|
IF (occupation_code IN OrderRole_List) AND ToBeSigned_Flag = False THEN
|
|
ReqCoSignature := TRUE;
|
|
ELSE
|
|
ReqCoSignature := FALSE;
|
|
ENDIF;
|
|
|
|
;;
|
|
evoke: Document_Enter ; //or Document_Modify;
|
|
|
|
;;
|
|
LOGIC:
|
|
|
|
// IF ReqCoSignature OR ToBeSigned_Flag = False THEN
|
|
IF ReqCoSignature = True THEN
|
|
msg := "\n\n\n {{+B}}{{+R}} A physician must be selected to save this document: {{-B}}{{-R}}"
|
|
|| " \n\n INSTRUCTIONS: Please click the Document Info tab and select your physician. " ;
|
|
// || " \n\n Please click the Document Info tab and select your physician. " ;
|
|
//|| "\n" ||
|
|
//"isAttending: " || isAttending || "\n" ||
|
|
//"User_GUID: " || User_GUID ;
|
|
//|| "ToBeSigned_Flag: "|| (ToBeSigned_Flag as string) || "orderrole_type: " || orderrole_type ;
|
|
|
|
|
|
conclude TRUE;
|
|
ELSE
|
|
conclude FALSE;
|
|
ENDIF;
|
|
|
|
|
|
;;
|
|
|
|
action:
|
|
/*---------------------------------------------------*/
|
|
/* Send messsage to user - cannot enter note as is */
|
|
/*---------------------------------------------------*/
|
|
|
|
//IF ReqCoSignature OR ToBeSigned_Flag = False THEN
|
|
IF ReqCoSignature = True THEN
|
|
write "\n"
|
|
|| msg
|
|
|| "\n\n" at alert_destination;
|
|
ENDIF;
|
|
|
|
;;
|
|
end:
|