MAGIP117 ;WOIFO/NST,MLH - INSTALL CODE FOR MAG*3.0*117 ; 08 Feb 2011 10:57 AM
;;3.0;IMAGING;**117**;Mar 19, 2002;Build 2238;Jul 15, 2011
;; Per VHA Directive 2004-038, this routine should not be modified.
;; +---------------------------------------------------------------+
;; | Property of the US Government. |
;; | No permission to copy or redistribute this software is given. |
;; | Use of unreleased versions of this software requires the user |
;; | to execute a written test agreement with the VistA Imaging |
;; | Development Office of the Department of Veterans Affairs, |
;; | telephone (301) 734-0100. |
;; | 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 but the MAGIP117 has to be
; referenced by the "Environment Check Routine" field of the KIDS
; build so that entry points of the routine are available to the
; KIDS during all installation phases.
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
;
;***** POST-INSTALL CODE
POS ;
N CALLBACK
D CLEAR^MAGUERR(1)
;
;--- Link new remote procedures to the Broker context option
S CALLBACK="$$ADDRPCS^"_$NA(MAGKIDS1("RPCLST^"_$T(+0),"MAG WINDOWS"))
I $$CP^MAGKIDS("MAG ATTACH RPCS",CALLBACK)<0 D ERROR Q
;
;--- Restart the Imaging Utilization Report task
I $$CP^MAGKIDS("MAG REPORT TASK","$$RPTSKCP^"_$T(+0))<0 D ERROR Q
;
;--- Misc Updates
I $$CP^MAGKIDS("MAG 117 MISC UPDATES ","$$UPDATE^"_$T(+0))<0 D ERROR Q
;
;--- Send the notification e-mail
I $$CP^MAGKIDS("MAG NOTIFICATION","$$NOTIFY^MAGKIDS1")<0 D ERROR Q
;
;--- Set default for existing users to Show Deleted Image Placeholder
D BMES^MAGKIDS("Setting Delete Image Placeholder to True")
D DFTON
;--- Clean invalid (orphaned QA Statistics Nodes) from XTMP Reports.
D BMES^MAGKIDS("Clearing orphaned QA Statistics from XTMP")
D CLNXTMP^MAGGA03Q
Q
;***** DFTON
; This will loop through existing users, and set the showdeletedImagePlaceholder
; to 1 ON.
DFTON ;Set default for existing users to Show Deleted Image Placeholder
N I
S I=0
F S I=$O(^MAG(2006.18,I)) Q:'I D
. ; If the preference hasn't been set yet, set it to 1.
. I $P($G(^MAG(2006.18,I,"APPPREFS")),"^",9)="" S $P(^MAG(2006.18,I,"APPPREFS"),"^",9)=1
. Q
Q
;
;***** PRE-INSTALL CODE
PRE ;
;
Q
;+++++ LIST OF NEW REMOTE PROCEDURES
; have a list in format ;;MAG4 IMAGE LIST
RPCLST ;
;;MAGG IMAGE STATISTICS BY USER
;;MAGG IMAGE STATISTICS QUE
;;MAGG MULTI IMAGE PRINT
;;MAGG JUKE BOX PATH
Q 0
;
;+++++ RESTARTS THE IMAGING UTILIZATION REPORT TASK
RPTSKCP() ;
D REMTASK^MAGQE4,STTASK^MAGQE4
Q 0
;
UPDATE() ; Misc Updates
N MAGRC
;--- Check if the file has been processed already
I '$$PRD^MAGKIDS(2005.1,117) D Q:MAGRC<0 MAGRC
. S MAGRC=$$UPD20051^MAGGTUX4()
. Q
;--- Check if the file has been processed already
I '$$PRD^MAGKIDS(2005,117) D Q:MAGRC<0 MAGRC
. S MAGRC=$$UPD2005^MAGGTUX4()
. Q
;
; Add a new entry to OBJECT TYPE file (#2005.02)
I $$ADDOBJ(501,"NCAT") Q -1
I $$ADDOBJ(502,"Unsupported Type From Non-VA Origin") Q -1
I $$ADDOBJ(503,"DoD JPG") Q -1
I $$ADDOBJ(504,"DoD Word") Q -1
I $$ADDOBJ(505,"DoD ASCII Text") Q -1
I $$ADDOBJ(506,"DoD PDF (non-NCAT)") Q -1
I $$ADDOBJ(507,"DoD RTF") Q -1
;
;--- Allow installer to build ADTDUZ cross references if desired
D SETUP^MAGUXDPS
Q 0
;
ADDOBJ(IEN,NAME) ; Adds a record to OBJECT TYPE file (#2005.02)
; IEN - IEN in OBJECT TYPE file (#2005.02)
; NAME - value for field (#.01) in OBJECT TYPE file (#2005.02)
N MAGNFDA,MAGNIEN,MAGNERR,IENS
;
S IENS=$S('$D(^MAG(2005.02,IEN)):"+1,",1:IEN_",")
S MAGNFDA(2005.02,IENS,.01)=NAME
S MAGNIEN(1)=IEN
D UPDATE^DIE("","MAGNFDA","MAGNIEN","MAGNERR")
I $D(MAGNERR) Q -1
Q 0
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGIP117 4385 printed Dec 13, 2024@02:03:52 Page 2
MAGIP117 ;WOIFO/NST,MLH - INSTALL CODE FOR MAG*3.0*117 ; 08 Feb 2011 10:57 AM
+1 ;;3.0;IMAGING;**117**;Mar 19, 2002;Build 2238;Jul 15, 2011
+2 ;; Per VHA Directive 2004-038, this routine should not be modified.
+3 ;; +---------------------------------------------------------------+
+4 ;; | Property of the US Government. |
+5 ;; | No permission to copy or redistribute this software is given. |
+6 ;; | Use of unreleased versions of this software requires the user |
+7 ;; | to execute a written test agreement with the VistA Imaging |
+8 ;; | Development Office of the Department of Veterans Affairs, |
+9 ;; | telephone (301) 734-0100. |
+10 ;; | The Food and Drug Administration classifies this software as |
+11 ;; | a medical device. As such, it may not be changed in any way. |
+12 ;; | Modifications to this software may result in an adulterated |
+13 ;; | medical device under 21CFR820, the use of which is considered |
+14 ;; | to be a violation of US Federal Statutes. |
+15 ;; +---------------------------------------------------------------+
+16 ;;
+17 ; There are no environment checks here but the MAGIP117 has to be
+18 ; referenced by the "Environment Check Routine" field of the KIDS
+19 ; build so that entry points of the routine are available to the
+20 ; KIDS during all installation phases.
+21 QUIT
+22 ;
+23 ;+++++ 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 ;***** POST-INSTALL CODE
POS ;
+1 NEW CALLBACK
+2 DO CLEAR^MAGUERR(1)
+3 ;
+4 ;--- Link new remote procedures to the Broker context option
+5 SET CALLBACK="$$ADDRPCS^"_$NAME(MAGKIDS1("RPCLST^"_$TEXT(+0),"MAG WINDOWS"))
+6 IF $$CP^MAGKIDS("MAG ATTACH RPCS",CALLBACK)<0
DO ERROR
QUIT
+7 ;
+8 ;--- Restart the Imaging Utilization Report task
+9 IF $$CP^MAGKIDS("MAG REPORT TASK","$$RPTSKCP^"_$TEXT(+0))<0
DO ERROR
QUIT
+10 ;
+11 ;--- Misc Updates
+12 IF $$CP^MAGKIDS("MAG 117 MISC UPDATES ","$$UPDATE^"_$TEXT(+0))<0
DO ERROR
QUIT
+13 ;
+14 ;--- Send the notification e-mail
+15 IF $$CP^MAGKIDS("MAG NOTIFICATION","$$NOTIFY^MAGKIDS1")<0
DO ERROR
QUIT
+16 ;
+17 ;--- Set default for existing users to Show Deleted Image Placeholder
+18 DO BMES^MAGKIDS("Setting Delete Image Placeholder to True")
+19 DO DFTON
+20 ;--- Clean invalid (orphaned QA Statistics Nodes) from XTMP Reports.
+21 DO BMES^MAGKIDS("Clearing orphaned QA Statistics from XTMP")
+22 DO CLNXTMP^MAGGA03Q
+23 QUIT
+24 ;***** DFTON
+25 ; This will loop through existing users, and set the showdeletedImagePlaceholder
+26 ; to 1 ON.
DFTON ;Set default for existing users to Show Deleted Image Placeholder
+1 NEW I
+2 SET I=0
+3 FOR
SET I=$ORDER(^MAG(2006.18,I))
if 'I
QUIT
Begin DoDot:1
+4 ; If the preference hasn't been set yet, set it to 1.
+5 IF $PIECE($GET(^MAG(2006.18,I,"APPPREFS")),"^",9)=""
SET $PIECE(^MAG(2006.18,I,"APPPREFS"),"^",9)=1
+6 QUIT
End DoDot:1
+7 QUIT
+8 ;
+9 ;***** PRE-INSTALL CODE
PRE ;
+1 ;
+2 QUIT
+3 ;+++++ LIST OF NEW REMOTE PROCEDURES
+4 ; have a list in format ;;MAG4 IMAGE LIST
RPCLST ;
+1 ;;MAGG IMAGE STATISTICS BY USER
+2 ;;MAGG IMAGE STATISTICS QUE
+3 ;;MAGG MULTI IMAGE PRINT
+4 ;;MAGG JUKE BOX PATH
+5 QUIT 0
+6 ;
+7 ;+++++ RESTARTS THE IMAGING UTILIZATION REPORT TASK
RPTSKCP() ;
+1 DO REMTASK^MAGQE4
DO STTASK^MAGQE4
+2 QUIT 0
+3 ;
UPDATE() ; Misc Updates
+1 NEW MAGRC
+2 ;--- Check if the file has been processed already
+3 IF '$$PRD^MAGKIDS(2005.1,117)
Begin DoDot:1
+4 SET MAGRC=$$UPD20051^MAGGTUX4()
+5 QUIT
End DoDot:1
if MAGRC<0
QUIT MAGRC
+6 ;--- Check if the file has been processed already
+7 IF '$$PRD^MAGKIDS(2005,117)
Begin DoDot:1
+8 SET MAGRC=$$UPD2005^MAGGTUX4()
+9 QUIT
End DoDot:1
if MAGRC<0
QUIT MAGRC
+10 ;
+11 ; Add a new entry to OBJECT TYPE file (#2005.02)
+12 IF $$ADDOBJ(501,"NCAT")
QUIT -1
+13 IF $$ADDOBJ(502,"Unsupported Type From Non-VA Origin")
QUIT -1
+14 IF $$ADDOBJ(503,"DoD JPG")
QUIT -1
+15 IF $$ADDOBJ(504,"DoD Word")
QUIT -1
+16 IF $$ADDOBJ(505,"DoD ASCII Text")
QUIT -1
+17 IF $$ADDOBJ(506,"DoD PDF (non-NCAT)")
QUIT -1
+18 IF $$ADDOBJ(507,"DoD RTF")
QUIT -1
+19 ;
+20 ;--- Allow installer to build ADTDUZ cross references if desired
+21 DO SETUP^MAGUXDPS
+22 QUIT 0
+23 ;
ADDOBJ(IEN,NAME) ; Adds a record to OBJECT TYPE file (#2005.02)
+1 ; IEN - IEN in OBJECT TYPE file (#2005.02)
+2 ; NAME - value for field (#.01) in OBJECT TYPE file (#2005.02)
+3 NEW MAGNFDA,MAGNIEN,MAGNERR,IENS
+4 ;
+5 SET IENS=$SELECT('$DATA(^MAG(2005.02,IEN)):"+1,",1:IEN_",")
+6 SET MAGNFDA(2005.02,IENS,.01)=NAME
+7 SET MAGNIEN(1)=IEN
+8 DO UPDATE^DIE("","MAGNFDA","MAGNIEN","MAGNERR")
+9 IF $DATA(MAGNERR)
QUIT -1
+10 QUIT 0