- MAGIP111 ;WOIFO/JSL - Post Install routine to add RA entry
- ;;3.0;IMAGING;**111**;28-September-2009;;Build 1461
- ;; 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*111 BSE"),DUZ,$$NOW^XLFDT,$G(XPDA))
- Q
- ;+++++ ADD 'REMOTE APPLICATION' ENTRY
- ADD ;Create Imaging entries in 8994.5 REMOTE APPLICATION if they do not exist
- N A,ACODE,DA,DD,DO,DIC,DIE,DR,ENTRY,OPTN,PORT,RPC,X,Y
- W !,"I will check if Imaging entries are in the REMOTE APPLICATION file. . ."
- ;Set the new entry
- S DIC="^XWB(8994.5,",X="ERROR^MAGIP111",@^%ZOSF("TRAP")
- F A=1:1 S X=$P($T(API+A),";",3) Q:'$L(X) D
- . S DA=$$FIND1^DIC(8994.5,,,X,"B") Q:DA ;chk if already exist
- . S DIC(0)="O",ACODE=$$EN^ROUTINE(X)
- . K DD,D0 D FILE^DICN
- . S ENTRY=+Y I 'ENTRY W !,"Can't add new entry "_X G ERROR
- . S DR=".02///"_$P($T(API+A),";",4)_";.03///"_ACODE_";1///S"
- . S PORT=-1
- . S DR(2,8994.51)=".02////"_PORT ;sub file
- . S DA=ENTRY,DIE="^XWB(8994.5," D ^DIE W "*"
- . Q
- ; Add new RPC - MAG BROKER SECURITY into MAG WINDOWS & VISARAD WINDOWS
- S DA=$$FIND1^DIC(8994,,,"MAG BROKER SECURITY","B") ;RPC - BSE TOKEN
- I DA F OPTN="MAG WINDOWS","MAGJ VISTARAD WINDOWS" D
- . D ADDRPC^MAGQBUT4("MAG BROKER SECURITY",OPTN) W "*"
- . Q
- Q
- ERROR ;Trap Errors
- W !,$ZE,!,"Please check the error log for details",!
- Q
- API ;
- ;;VISTA IMAGING DISPLAY;MAG WINDOWS;
- ;;VISTA IMAGING TELEREADER;MAG WINDOWS;
- ;;VISTA IMAGING VIX;MAG WINDOWS;
- ;;VISTA IMAGING VISTARAD;MAGJ VISTARAD WINDOWS;
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGIP111 2545 printed Feb 18, 2025@23:30:16 Page 2
- MAGIP111 ;WOIFO/JSL - Post Install routine to add RA entry
- +1 ;;3.0;IMAGING;**111**;28-September-2009;;Build 1461
- +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*111 BSE"),DUZ,$$NOW^XLFDT,$GET(XPDA))
- +4 QUIT
- +5 ;+++++ ADD 'REMOTE APPLICATION' ENTRY
- ADD ;Create Imaging entries in 8994.5 REMOTE APPLICATION if they do not exist
- +1 NEW A,ACODE,DA,DD,DO,DIC,DIE,DR,ENTRY,OPTN,PORT,RPC,X,Y
- +2 WRITE !,"I will check if Imaging entries are in the REMOTE APPLICATION file. . ."
- +3 ;Set the new entry
- +4 SET DIC="^XWB(8994.5,"
- SET X="ERROR^MAGIP111"
- SET @^%ZOSF("TRAP")
- +5 FOR A=1:1
- SET X=$PIECE($TEXT(API+A),";",3)
- if '$LENGTH(X)
- QUIT
- Begin DoDot:1
- +6 ;chk if already exist
- SET DA=$$FIND1^DIC(8994.5,,,X,"B")
- if DA
- QUIT
- +7 SET DIC(0)="O"
- SET ACODE=$$EN^ROUTINE(X)
- +8 KILL DD,D0
- DO FILE^DICN
- +9 SET ENTRY=+Y
- IF 'ENTRY
- WRITE !,"Can't add new entry "_X
- GOTO ERROR
- +10 SET DR=".02///"_$PIECE($TEXT(API+A),";",4)_";.03///"_ACODE_";1///S"
- +11 SET PORT=-1
- +12 ;sub file
- SET DR(2,8994.51)=".02////"_PORT
- +13 SET DA=ENTRY
- SET DIE="^XWB(8994.5,"
- DO ^DIE
- WRITE "*"
- +14 QUIT
- End DoDot:1
- +15 ; Add new RPC - MAG BROKER SECURITY into MAG WINDOWS & VISARAD WINDOWS
- +16 ;RPC - BSE TOKEN
- SET DA=$$FIND1^DIC(8994,,,"MAG BROKER SECURITY","B")
- +17 IF DA
- FOR OPTN="MAG WINDOWS","MAGJ VISTARAD WINDOWS"
- Begin DoDot:1
- +18 DO ADDRPC^MAGQBUT4("MAG BROKER SECURITY",OPTN)
- WRITE "*"
- +19 QUIT
- End DoDot:1
- +20 QUIT
- ERROR ;Trap Errors
- +1 WRITE !,$ZE,!,"Please check the error log for details",!
- +2 QUIT
- API ;
- +1 ;;VISTA IMAGING DISPLAY;MAG WINDOWS;
- +2 ;;VISTA IMAGING TELEREADER;MAG WINDOWS;
- +3 ;;VISTA IMAGING VIX;MAG WINDOWS;
- +4 ;;VISTA IMAGING VISTARAD;MAGJ VISTARAD WINDOWS;
- +5 QUIT