ORY539 ;SLC/TDP - INSTALLATION ACTIONS FOR CPRS VERSION 32A ;Mar 29, 2021@15:39:57
;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17, 1997;Build 41
Q
;
PRE ;PRE-INSTALL ACTIONS
Q
;
EN ;POST-INSTALL ACTIONS
D UFPARAM,APPARAM
D S^ORY539ES
D NOTIFI
Q
;
UFPARAM ;
;Set Unflagging parameters at the package (PKG) level
N ORERR D BMES^XPDUTL("Updating OR UNFLAGGING RESTRICTIONS parameter . . .")
D EN^XPAR("PKG.ORDER ENTRY/RESULTS REPORTING","OR UNFLAGGING RESTRICTIONS",1,"YES",.ORERR)
I $G(ORERR)'=0 D BMES^XPDUTL(" Parameter update failed: "_$P(ORERR,"^",2)) Q
D BMES^XPDUTL(" Update of OR UNFLAGGING RESTRICTIONS parameter successful.")
Q
;
APPARAM ; set ANATOMIC PATHOLOGY as sequence 74 in ORWOR CATEGORY SEQUENCE
; parameter at the PKG ENTITY level. Site must manually edit all
; other ENTITY levels on their system
D BMES^XPDUTL("Updating ORWOR CATEGORY SEQUENCE parameter . . .")
N DA,ERR
S DA=$O(^ORD(100.98,"B","ANATOMIC PATHOLOGY",0))
I +$G(DA)'>0 D BMES^XPDUTL(" No ANATOMIC PATHOLOGY display group found, Contact IRM") Q
D PUT^XPAR("PKG","ORWOR CATEGORY SEQUENCE",74,DA,.ERR)
I $G(ERR)'=0 D BMES^XPDUTL(" Parameter update failed. Manually add the ANATOMIC PATHOLOGY display group as sequence 74 at the package level.") Q
D BMES^XPDUTL(" Addition of ANATOMIC PATHOLOGY Display Group successful.")
Q
;
SENDDLG(ANAME) ;Return true if the current order dialog should be sent
i ANAME="OR GTX SPECIMEN DESCRIPTION" Q 1
I ANAME="OR GTX SPECIMEN SUBMITTED BY" Q 1
I ANAME="OR GTX SURGEON/PROVIDER" Q 1
I ANAME="OR GTX CLINICAL HISTORY" Q 1
I ANAME="OR GTX PRE OPERATIVE DIAGNOSIS" Q 1
I ANAME="OR GTX POST OPERATIVE FINDINGS" Q 1
I ANAME="OR GTX OPERATIVE FINDINGS" Q 1
I ANAME="LR OTHER LAB AP TESTS" Q 1
I ANAME="PSH OERR" Q 1
Q 0
;
NOTIFI ;UPDATING NOTIFICATION PARAMETERS
N ORFDA,ORIEN,ORERROR,ENT,PAR,INST,ORERROR,EXIT,ORVALUE,ORMSG
D BMES^XPDUTL(" Loading parameter values for new notifications...")
F INST="PROSTHETICS CONSULT UPDATED","NEW ALLERGY ENTERED/ACTIVE MED","FLAG ORDER COMMENTS" D
. S EXIT=0
. D BMES^XPDUTL(" "_INST_" is updating..")
. S ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
. S ORVALUE("ORB ARCHIVE PERIOD")=30
. S ORVALUE("ORB DELETE MECHANISM")="Individual Recipient"
. S ORVALUE("ORB FORWARD BACKUP REVIEWER")=0
. S ORVALUE("ORB FORWARD SUPERVISOR")=0
. S ORVALUE("ORB FORWARD SURROGATES")=0
. S ORVALUE("ORB PROCESSING FLAG")=$$PROC(INST)
. S ORVALUE("ORB PROVIDER RECIPIENTS")=$$PROV(INST)
. S ORVALUE("ORB URGENCY")=$$URG(INST)
. S PAR="" F S PAR=$O(ORVALUE(PAR)) Q:$G(PAR)=""!($G(EXIT)) D
.. D EN^XPAR(ENT,PAR,INST,ORVALUE(PAR),.ORERROR) ;ICR #2336
.. I +ORERROR D
... S EXIT=1
... S ORMSG(1)=" ERROR: Unable to configure the new "_INST
... S ORMSG(2)=" notification. Kernel Parameter Tools Error #"_+ORERROR_":"
... S ORMSG(3)=" "_$P(ORERROR,U,2)
... D MES^XPDUTL(.ORMSG)
. I 'EXIT D MES^XPDUTL(" "_INST_" done!")
D BMES^XPDUTL(" Finished loading new notification values")
Q
;
PROC(INST) ;ORB PROCESSING FLAG settings
N FLAG
S FLAG="Disabled"
I INST="NEW ALLERGY ENTERED/ACTIVE MED"!(INST="FLAG ORDER COMMENTS") S FLAG="Enabled"
Q FLAG
;
PROV(INST) ;ORB PROVIDER RECIPIENTS settings
N RECIPS
S RECIPS="PATO"
I INST="NEW ALLERGY ENTERED/ACTIVE MED" S RECIPS="OP"
I INST="FLAG ORDER COMMENTS" S RECIPS=""
Q RECIPS
;
URG(INST) ;ORB URGENCY settings
N URGENCY
S URGENCY="Moderate"
I INST="NEW ALLERGY ENTERED/ACTIVE MED" S URGENCY="High"
Q URGENCY
;
INCNOTIF(IEN) ;Include OE/RR NOTIFICATIONS file entry?
I IEN=88 Q 1
I IEN=89 Q 1
I IEN=8 Q 1
Q 0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY539 3725 printed Nov 22, 2024@17:52:40 Page 2
ORY539 ;SLC/TDP - INSTALLATION ACTIONS FOR CPRS VERSION 32A ;Mar 29, 2021@15:39:57
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**539**;Dec 17, 1997;Build 41
+2 QUIT
+3 ;
PRE ;PRE-INSTALL ACTIONS
+1 QUIT
+2 ;
EN ;POST-INSTALL ACTIONS
+1 DO UFPARAM
DO APPARAM
+2 DO S^ORY539ES
+3 DO NOTIFI
+4 QUIT
+5 ;
UFPARAM ;
+1 ;Set Unflagging parameters at the package (PKG) level
+2 NEW ORERR
DO BMES^XPDUTL("Updating OR UNFLAGGING RESTRICTIONS parameter . . .")
+3 DO EN^XPAR("PKG.ORDER ENTRY/RESULTS REPORTING","OR UNFLAGGING RESTRICTIONS",1,"YES",.ORERR)
+4 IF $GET(ORERR)'=0
DO BMES^XPDUTL(" Parameter update failed: "_$PIECE(ORERR,"^",2))
QUIT
+5 DO BMES^XPDUTL(" Update of OR UNFLAGGING RESTRICTIONS parameter successful.")
+6 QUIT
+7 ;
APPARAM ; set ANATOMIC PATHOLOGY as sequence 74 in ORWOR CATEGORY SEQUENCE
+1 ; parameter at the PKG ENTITY level. Site must manually edit all
+2 ; other ENTITY levels on their system
+3 DO BMES^XPDUTL("Updating ORWOR CATEGORY SEQUENCE parameter . . .")
+4 NEW DA,ERR
+5 SET DA=$ORDER(^ORD(100.98,"B","ANATOMIC PATHOLOGY",0))
+6 IF +$GET(DA)'>0
DO BMES^XPDUTL(" No ANATOMIC PATHOLOGY display group found, Contact IRM")
QUIT
+7 DO PUT^XPAR("PKG","ORWOR CATEGORY SEQUENCE",74,DA,.ERR)
+8 IF $GET(ERR)'=0
DO BMES^XPDUTL(" Parameter update failed. Manually add the ANATOMIC PATHOLOGY display group as sequence 74 at the package level.")
QUIT
+9 DO BMES^XPDUTL(" Addition of ANATOMIC PATHOLOGY Display Group successful.")
+10 QUIT
+11 ;
SENDDLG(ANAME) ;Return true if the current order dialog should be sent
+1 IF ANAME="OR GTX SPECIMEN DESCRIPTION"
QUIT 1
+2 IF ANAME="OR GTX SPECIMEN SUBMITTED BY"
QUIT 1
+3 IF ANAME="OR GTX SURGEON/PROVIDER"
QUIT 1
+4 IF ANAME="OR GTX CLINICAL HISTORY"
QUIT 1
+5 IF ANAME="OR GTX PRE OPERATIVE DIAGNOSIS"
QUIT 1
+6 IF ANAME="OR GTX POST OPERATIVE FINDINGS"
QUIT 1
+7 IF ANAME="OR GTX OPERATIVE FINDINGS"
QUIT 1
+8 IF ANAME="LR OTHER LAB AP TESTS"
QUIT 1
+9 IF ANAME="PSH OERR"
QUIT 1
+10 QUIT 0
+11 ;
NOTIFI ;UPDATING NOTIFICATION PARAMETERS
+1 NEW ORFDA,ORIEN,ORERROR,ENT,PAR,INST,ORERROR,EXIT,ORVALUE,ORMSG
+2 DO BMES^XPDUTL(" Loading parameter values for new notifications...")
+3 FOR INST="PROSTHETICS CONSULT UPDATED","NEW ALLERGY ENTERED/ACTIVE MED","FLAG ORDER COMMENTS"
Begin DoDot:1
+4 SET EXIT=0
+5 DO BMES^XPDUTL(" "_INST_" is updating..")
+6 SET ENT="PKG."_"ORDER ENTRY/RESULTS REPORTING"
+7 SET ORVALUE("ORB ARCHIVE PERIOD")=30
+8 SET ORVALUE("ORB DELETE MECHANISM")="Individual Recipient"
+9 SET ORVALUE("ORB FORWARD BACKUP REVIEWER")=0
+10 SET ORVALUE("ORB FORWARD SUPERVISOR")=0
+11 SET ORVALUE("ORB FORWARD SURROGATES")=0
+12 SET ORVALUE("ORB PROCESSING FLAG")=$$PROC(INST)
+13 SET ORVALUE("ORB PROVIDER RECIPIENTS")=$$PROV(INST)
+14 SET ORVALUE("ORB URGENCY")=$$URG(INST)
+15 SET PAR=""
FOR
SET PAR=$ORDER(ORVALUE(PAR))
if $GET(PAR)=""!($GET(EXIT))
QUIT
Begin DoDot:2
+16 ;ICR #2336
DO EN^XPAR(ENT,PAR,INST,ORVALUE(PAR),.ORERROR)
+17 IF +ORERROR
Begin DoDot:3
+18 SET EXIT=1
+19 SET ORMSG(1)=" ERROR: Unable to configure the new "_INST
+20 SET ORMSG(2)=" notification. Kernel Parameter Tools Error #"_+ORERROR_":"
+21 SET ORMSG(3)=" "_$PIECE(ORERROR,U,2)
+22 DO MES^XPDUTL(.ORMSG)
End DoDot:3
End DoDot:2
+23 IF 'EXIT
DO MES^XPDUTL(" "_INST_" done!")
End DoDot:1
+24 DO BMES^XPDUTL(" Finished loading new notification values")
+25 QUIT
+26 ;
PROC(INST) ;ORB PROCESSING FLAG settings
+1 NEW FLAG
+2 SET FLAG="Disabled"
+3 IF INST="NEW ALLERGY ENTERED/ACTIVE MED"!(INST="FLAG ORDER COMMENTS")
SET FLAG="Enabled"
+4 QUIT FLAG
+5 ;
PROV(INST) ;ORB PROVIDER RECIPIENTS settings
+1 NEW RECIPS
+2 SET RECIPS="PATO"
+3 IF INST="NEW ALLERGY ENTERED/ACTIVE MED"
SET RECIPS="OP"
+4 IF INST="FLAG ORDER COMMENTS"
SET RECIPS=""
+5 QUIT RECIPS
+6 ;
URG(INST) ;ORB URGENCY settings
+1 NEW URGENCY
+2 SET URGENCY="Moderate"
+3 IF INST="NEW ALLERGY ENTERED/ACTIVE MED"
SET URGENCY="High"
+4 QUIT URGENCY
+5 ;
INCNOTIF(IEN) ;Include OE/RR NOTIFICATIONS file entry?
+1 IF IEN=88
QUIT 1
+2 IF IEN=89
QUIT 1
+3 IF IEN=8
QUIT 1
+4 QUIT 0