MAGIP333 ;WOIFO/PMK - Install code for MAG*3.0*333; Jan 15, 2026@08:41:46
;;3.0;IMAGING;**333**;Mar 19, 2002;Build 2
;; Per VA Directive 6402, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | Property of the US Government. |
;; | |
;; | The Food and Drug Administration classifies this software as |
;; | a medical device. As such, it may not be changed in any way. |
;; | Modifications to this software may result in an adulterated |
;; | medical device under 21CFR820, the use of which is considered |
;; | to be a violation of US Federal Statutes. |
;; +---------------------------------------------------------------+
;;
; There are no environment checks here
;
; Supported IA #10103 reference $$FMTE^XLFDT function call
; Supported IA #10103 reference $$NOW^XLFDT function call
; Supported IA #10141 reference BMES^XPDUTL subroutine call
; Supported IA #1157 reference $$DELETE^XPDMENU function call
;
Q
;
;+++++ INSTALLATION ERROR HANDLING
ERROR ;
S:$D(XPDNM) XPDABORT=1
;--- Display the messages and store them to the INSTALL file
D DUMP^MAGUERR1(),ABTMSG^MAGKIDS()
Q
;
;
;
;***** PRE-INSTALL CODE
PRE ;
D KILL20061211
D KILL2006541
D KILLTRMENU
Q
;
KILL20061211 ; kill the Q/R CHECK DIVISION field in file 2006.1
; P305 incorrrectly set the field #211 information to 8;E1,1
; This neeeds to be reset to 8;1
S DIK="^DD(2006.1,",DA(1)=211 D ^DIK
Q
;
KILL2006541 ; kill the DICOM VISTA Q/R REQUEST QUEUE (file #2006.541) DD
; Killing the old DD is necessary to add the DIVISION
N DIU
K ^MAGDSTT(2006.541)
S DIU=2006.541,DIU(0)="" D EN^DIU2
Q
;
; The TeleReader Menu will be reinstalled with DISPLAY ORDER=85
N STATUS
S STATUS=$$DELETE^XPDMENU("MAG SYS MENU","MAGT TELEREADER MENU")
W !!," Removal of Telereader Menu: ",$S(STATUS:"Success",1:"Failure")
Q
;
;
;***** POST-INSTALL CODE
POS ;
N CALLBACK
D SET20061212
D CLEAR^MAGUERR(1)
;
;--- Various Updates
D SETTRMENU ; p349 PMK 01/14/2026
;
;--- Send the notification e-mail
D BMES^XPDUTL("Post Install Mail Message: "_$$FMTE^XLFDT($$NOW^XLFDT))
D INS^MAGQBUT4(XPDNM,DUZ,$$NOW^XLFDT,XPDA)
Q
;
SET20061212 ; Set field 212
; setting these fields will set the delimiter for 212
N MAGERR,MAGFDA,SITE
S SITE=0
F SITE=$O(^MAG(2006.1,SITE)) Q:'SITE D
. S MAGFDA(2006.1,SITE_",",212)=""
. D UPDATE^DIE("","MAGFDA",,"MAGERR")
. Q
Q
;
N STATUS
S STATUS=$$ADD^XPDMENU("MAG SYS MENU","MAGT TELEREADER MENU","TR",85)
W !!," Reinstall of Telereader Menu: ",$S(STATUS:"Success",1:"Failure")
Q
;
UPDATE() ;
Q 0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGIP333 2929 printed Mar 25, 2026@15:30:35 Page 2
MAGIP333 ;WOIFO/PMK - Install code for MAG*3.0*333; Jan 15, 2026@08:41:46
+1 ;;3.0;IMAGING;**333**;Mar 19, 2002;Build 2
+2 ;; Per VA Directive 6402, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | |
+6 ;; | The Food and Drug Administration classifies this software as |
+7 ;; | a medical device. As such, it may not be changed in any way. |
+8 ;; | Modifications to this software may result in an adulterated |
+9 ;; | medical device under 21CFR820, the use of which is considered |
+10 ;; | to be a violation of US Federal Statutes. |
+11 ;; +---------------------------------------------------------------+
+12 ;;
+13 ; There are no environment checks here
+14 ;
+15 ; Supported IA #10103 reference $$FMTE^XLFDT function call
+16 ; Supported IA #10103 reference $$NOW^XLFDT function call
+17 ; Supported IA #10141 reference BMES^XPDUTL subroutine call
+18 ; Supported IA #1157 reference $$DELETE^XPDMENU function call
+19 ;
+20 QUIT
+21 ;
+22 ;+++++ INSTALLATION ERROR HANDLING
ERROR ;
+1 if $DATA(XPDNM)
SET XPDABORT=1
+2 ;--- Display the messages and store them to the INSTALL file
+3 DO DUMP^MAGUERR1()
DO ABTMSG^MAGKIDS()
+4 QUIT
+5 ;
+6 ;
+7 ;
+8 ;***** PRE-INSTALL CODE
PRE ;
+1 DO KILL20061211
+2 DO KILL2006541
+3 DO KILLTRMENU
+4 QUIT
+5 ;
KILL20061211 ; kill the Q/R CHECK DIVISION field in file 2006.1
+1 ; P305 incorrrectly set the field #211 information to 8;E1,1
+2 ; This neeeds to be reset to 8;1
+3 SET DIK="^DD(2006.1,"
SET DA(1)=211
DO ^DIK
+4 QUIT
+5 ;
KILL2006541 ; kill the DICOM VISTA Q/R REQUEST QUEUE (file #2006.541) DD
+1 ; Killing the old DD is necessary to add the DIVISION
+2 NEW DIU
+3 KILL ^MAGDSTT(2006.541)
+4 SET DIU=2006.541
SET DIU(0)=""
DO EN^DIU2
+5 QUIT
+6 ;
+1 ; The TeleReader Menu will be reinstalled with DISPLAY ORDER=85
+2 NEW STATUS
+3 SET STATUS=$$DELETE^XPDMENU("MAG SYS MENU","MAGT TELEREADER MENU")
+4 WRITE !!," Removal of Telereader Menu: ",$SELECT(STATUS:"Success",1:"Failure")
+5 QUIT
+6 ;
+7 ;
+8 ;***** POST-INSTALL CODE
POS ;
+1 NEW CALLBACK
+2 DO SET20061212
+3 DO CLEAR^MAGUERR(1)
+4 ;
+5 ;--- Various Updates
+6 ; p349 PMK 01/14/2026
DO SETTRMENU
+7 ;
+8 ;--- Send the notification e-mail
+9 DO BMES^XPDUTL("Post Install Mail Message: "_$$FMTE^XLFDT($$NOW^XLFDT))
+10 DO INS^MAGQBUT4(XPDNM,DUZ,$$NOW^XLFDT,XPDA)
+11 QUIT
+12 ;
SET20061212 ; Set field 212
+1 ; setting these fields will set the delimiter for 212
+2 NEW MAGERR,MAGFDA,SITE
+3 SET SITE=0
+4 FOR SITE=$ORDER(^MAG(2006.1,SITE))
if 'SITE
QUIT
Begin DoDot:1
+5 SET MAGFDA(2006.1,SITE_",",212)=""
+6 DO UPDATE^DIE("","MAGFDA",,"MAGERR")
+7 QUIT
End DoDot:1
+8 QUIT
+9 ;
+1 NEW STATUS
+2 SET STATUS=$$ADD^XPDMENU("MAG SYS MENU","MAGT TELEREADER MENU","TR",85)
+3 WRITE !!," Reinstall of Telereader Menu: ",$SELECT(STATUS:"Success",1:"Failure")
+4 QUIT
+5 ;
UPDATE() ;
+1 QUIT 0