Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORY539

ORY539.m

Go to the documentation of this file.
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