MAGIP105 ;WOIFO/JSL - Post Install routine to add AWIV entry;3/08/2010
;;3.0;IMAGING;**105**;Mar 19, 2002;Build 1865;Oct 25, 2010
;; 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. |
;; +---------------------------------------------------------------+
;;
Q
;***** POST-INSTALL CODE
POS ;
D ADD
;--- Send the install notification via e-mail
D INS^MAGQBUT4($G(XPDNM,"MAG*3.0*105 AWIV"),DUZ,$$NOW^XLFDT,$G(XPDA))
Q
;+++++ ADD 'REMOTE APPLICATION' ENTRY
ADD ;Create Imaging entries in 8994.5 REMOTE APPLICATION if it does not exist
N ACODE,DA,DD,D0,DIC,DIE,DR,ENTRY,PORT,X,Y,CALLBKSRV,URLSTRING,CONTX,MAGZZERR
W !,"I will check if the AWIV entry is in the REMOTE APPLICATION file."
;Set the new entry
S X="VISTA IMAGING AWIV",DIC="^XWB(8994.5,",ACODE=$$EN^ROUTINE(X),CONTX="MAG WINDOWS"
S DA=$$FIND1^DIC(8994.5,,,X,"B") D:DA=0
. S DIC(0)="O" K DD,D0,DR D FILE^DICN
. S ENTRY=+Y I 'ENTRY W !,"Can't add new entry "_X G ERROR
. S DR=".02///"_CONTX_";.03///^S X=ACODE;1///H"
. S PORT="19989",URLSTRING="/resolve.do",CALLBKSRV="vaww.context.vistaweb.domain.ext"
. S DR(2,8994.51)=".01///H;.02///"_PORT_";.03///"_CALLBKSRV_";.04////"_URLSTRING
. S DA=ENTRY,DIE="^XWB(8994.5," D ^DIE
. Q
Q
ERROR ;Trap Errors
S MAGZZERR=$$EC^%ZOSV D ^%ZTER S $ECODE=""
W !,MAGZZERR,!,"Please check the error log for details",!
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGIP105 2232 printed Nov 22, 2024@17:13:53 Page 2
MAGIP105 ;WOIFO/JSL - Post Install routine to add AWIV entry;3/08/2010
+1 ;;3.0;IMAGING;**105**;Mar 19, 2002;Build 1865;Oct 25, 2010
+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 QUIT
+18 ;***** POST-INSTALL CODE
POS ;
+1 DO ADD
+2 ;--- Send the install notification via e-mail
+3 DO INS^MAGQBUT4($GET(XPDNM,"MAG*3.0*105 AWIV"),DUZ,$$NOW^XLFDT,$GET(XPDA))
+4 QUIT
+5 ;+++++ ADD 'REMOTE APPLICATION' ENTRY
ADD ;Create Imaging entries in 8994.5 REMOTE APPLICATION if it does not exist
+1 NEW ACODE,DA,DD,D0,DIC,DIE,DR,ENTRY,PORT,X,Y,CALLBKSRV,URLSTRING,CONTX,MAGZZERR
+2 WRITE !,"I will check if the AWIV entry is in the REMOTE APPLICATION file."
+3 ;Set the new entry
+4 SET X="VISTA IMAGING AWIV"
SET DIC="^XWB(8994.5,"
SET ACODE=$$EN^ROUTINE(X)
SET CONTX="MAG WINDOWS"
+5 SET DA=$$FIND1^DIC(8994.5,,,X,"B")
if DA=0
Begin DoDot:1
+6 SET DIC(0)="O"
KILL DD,D0,DR
DO FILE^DICN
+7 SET ENTRY=+Y
IF 'ENTRY
WRITE !,"Can't add new entry "_X
GOTO ERROR
+8 SET DR=".02///"_CONTX_";.03///^S X=ACODE;1///H"
+9 SET PORT="19989"
SET URLSTRING="/resolve.do"
SET CALLBKSRV="vaww.context.vistaweb.domain.ext"
+10 SET DR(2,8994.51)=".01///H;.02///"_PORT_";.03///"_CALLBKSRV_";.04////"_URLSTRING
+11 SET DA=ENTRY
SET DIE="^XWB(8994.5,"
DO ^DIE
+12 QUIT
End DoDot:1
+13 QUIT
ERROR ;Trap Errors
+1 SET MAGZZERR=$$EC^%ZOSV
DO ^%ZTER
SET $ECODE=""
+2 WRITE !,MAGZZERR,!,"Please check the error log for details",!
+3 QUIT
+4 ;