AVAP11 ;IHS/ASDST/GTH - DISABLE AD XREF ON FILE 4 ; [ 05/08/1999 9:20 AM ]
;;93.2;VA SUPPORT FILES;**11**;JUL 01, 1993;Build 12
;
I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY Q
;
I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY Q
;
D HOME^%ZIS,DT^DICRW
;
S X=$T(+2)
W !,$$C^XBFUNC("-- "_$P(X,";",4)_" v "_$P(X,";",3)_" Patch "_$P(X,"*",3)_" --")
;
S X=$P(^VA(200,DUZ,0),U)
W !!,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,",")),!!,$$C^XBFUNC("Checking Environment for Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
;
S X="AVA",DIC="^DIC(9.4,",DIC(0)="",D="C"
D IX^DIC
I Y<0 D Q
. W !!,$$C^XBFUNC("You Have More Than One Entry In The")
. W !,$$C^XBFUNC("PACKAGE File with an ""AVA"" prefix.")
. W !,$$C^XBFUNC("One entry needs to be deleted.")
. W !,$$C^XBFUNC("Please FIX IT! Before Proceeding."),!
. D SORRY
.Q
;
S DA=+Y
W !!,$$C^XBFUNC("AVA version '"_$G(^DIC(9.4,DA,"VERSION"))_"' currently installed")
;
S X=$G(^DD("VERSION"))
W !!,$$C^XBFUNC("Need at least FileMan 21.....FileMan "_X_" Present")
I X<21 D SORRY Q
;
S X=$G(^DIC(9.4,$O(^DIC(9.4,"C","XU",0)),"VERSION"))
W !!,$$C^XBFUNC("Need at least Kernel 8.....Kernel "_X_" Present")
I X<8 D SORRY Q
;
W !!,$$C^XBFUNC("ENVIRONMENT OK.")
;
I '$$DIR^XBDIR("E","","","","","",1) Q
;
D HELP("INTRO")
;
G EOJ:'$$DIR^XBDIR("YO","Run patch 11","N")
;
D WAIT^DICD
W !,"Disabling dd..."
;
UPDATEDD ;EP - From A9AVA11, for RPI, non-interactive update.
NEW AVAWRITE,DA
S AVAWRITE='$D(ZTQUEUED)
F %=1:1 Q:'$D(^DD(4,.01,1,%)) I $P(^(%,0),"^",2)="AD" S DA=% Q
I '$D(DA) W:AVAWRITE !,"X-REF 'AD' not found in File 4, Field .01.",!,"That's OK!!" G EOJ
;
W:AVAWRITE !,"Disabling SET of x-ref 'AD'..."
I $E(^DD(4,.01,1,DA,1),1,4)'="Q ;" S ^(1)="Q ;"_^(1)
W:AVAWRITE "Done disabling SET."
;
W:AVAWRITE !,"Disabling KILL of x-ref 'AD'..."
I $E(^DD(4,.01,1,DA,2),1,4)'="Q ;" S ^(2)="Q ;"_^(2)
W:AVAWRITE "Done disabling KILL."
;
S ^DD(4,.01,"DT")=$$DT^XLFDT
KILL DA ;
W:AVAWRITE !,"dd update complete."
W:AVAWRITE !!,"Patch 11 to AVA 93.2 is complete.",!
;
D MAIL^XBMAIL("XUMGR-XUPROGMODE","INTRO^AVAP11")
;
EOJ ;
KILL DIC,DIR,DIE,DA,DR,X,Y
Q
;
INTRO ;
;;This is Patch 11 to AVA 93.2.
;;
;;The 'AD' x-ref on file 4, field .01, will be disabled. The 'AD'
;;x-ref was added by the VA to keep the LOCATION file in sync with
;;file 4 (INSTITUTION) when additions were made to file 4 by the VA's
;;PCE software. This is unneeded by IHS since all additions of
;;locations are made into the LOCATION file, which is DINUM'd to
;;file 4. Unfortunately, the 'AD' x-ref on file 4 causes an
;;<UNDEF> to occur when IHS attempts to add locations into the
;;LOCATION file.
;;
;;This patch disables the 'AD' x-ref on file 4, field .01.
;;
;;###
;
HELP(L) ;EP - Display text at label L.
W !
F %=1:1 W !?4,$P($T(@L+%),";",3) Q:$P($T(@L+%+1),";",3)="###"
Q
;
SORRY ;
W *7,!,$$C^XBFUNC("Sorry....")
D EOJ
Q
;
AVAP11 ;IHS/ASDST/GTH - DISABLE AD XREF ON FILE 4 ; [ 05/08/1999 9:20 AM ]
+1 ;;93.2;VA SUPPORT FILES;**11**;JUL 01, 1993;Build 12
+2 ;
+3 IF '$GET(DUZ)
WRITE !,"DUZ UNDEFINED OR 0."
DO SORRY
QUIT
+4 ;
+5 IF '$LENGTH($GET(DUZ(0)))
WRITE !,"DUZ(0) UNDEFINED OR NULL."
DO SORRY
QUIT
+6 ;
+7 DO HOME^%ZIS
DO DT^DICRW
+8 ;
+9 SET X=$TEXT(+2)
+10 WRITE !,$$C^XBFUNC("-- "_$PIECE(X,";",4)_" v "_$PIECE(X,";",3)_" Patch "_$PIECE(X,"*",3)_" --")
+11 ;
+12 SET X=$PIECE(^VA(200,DUZ,0),U)
+13 WRITE !!,$$C^XBFUNC("Hello, "_$PIECE(X,",",2)_" "_$PIECE(X,",")),!!,$$C^XBFUNC("Checking Environment for Version "_$PIECE($TEXT(+2),";",3)_" of "_$PIECE($TEXT(+2),";",4)_".")
+14 ;
+15 SET X="AVA"
SET DIC="^DIC(9.4,"
SET DIC(0)=""
SET D="C"
+16 DO IX^DIC
+17 IF Y<0
Begin DoDot:1
+18 WRITE !!,$$C^XBFUNC("You Have More Than One Entry In The")
+19 WRITE !,$$C^XBFUNC("PACKAGE File with an ""AVA"" prefix.")
+20 WRITE !,$$C^XBFUNC("One entry needs to be deleted.")
+21 WRITE !,$$C^XBFUNC("Please FIX IT! Before Proceeding."),!
+22 DO SORRY
+23 QUIT
End DoDot:1
QUIT
+24 ;
+25 SET DA=+Y
+26 WRITE !!,$$C^XBFUNC("AVA version '"_$GET(^DIC(9.4,DA,"VERSION"))_"' currently installed")
+27 ;
+28 SET X=$GET(^DD("VERSION"))
+29 WRITE !!,$$C^XBFUNC("Need at least FileMan 21.....FileMan "_X_" Present")
+30 IF X<21
DO SORRY
QUIT
+31 ;
+32 SET X=$GET(^DIC(9.4,$ORDER(^DIC(9.4,"C","XU",0)),"VERSION"))
+33 WRITE !!,$$C^XBFUNC("Need at least Kernel 8.....Kernel "_X_" Present")
+34 IF X<8
DO SORRY
QUIT
+35 ;
+36 WRITE !!,$$C^XBFUNC("ENVIRONMENT OK.")
+37 ;
+38 IF '$$DIR^XBDIR("E","","","","","",1)
QUIT
+39 ;
+40 DO HELP("INTRO")
+41 ;
+42 IF '$$DIR^XBDIR("YO","Run patch 11","N")
GOTO EOJ
+43 ;
+44 DO WAIT^DICD
+45 WRITE !,"Disabling dd..."
+46 ;
UPDATEDD ;EP - From A9AVA11, for RPI, non-interactive update.
+1 NEW AVAWRITE,DA
+2 SET AVAWRITE='$DATA(ZTQUEUED)
+3 FOR %=1:1
IF '$DATA(^DD(4,.01,1,%))
QUIT
IF $PIECE(^(%,0),"^",2)="AD"
SET DA=%
QUIT
+4 IF '$DATA(DA)
IF AVAWRITE
WRITE !,"X-REF 'AD' not found in File 4, Field .01.",!,"That's OK!!"
GOTO EOJ
+5 ;
+6 IF AVAWRITE
WRITE !,"Disabling SET of x-ref 'AD'..."
+7 IF $EXTRACT(^DD(4,.01,1,DA,1),1,4)'="Q ;"
SET ^(1)="Q ;"_^(1)
+8 IF AVAWRITE
WRITE "Done disabling SET."
+9 ;
+10 IF AVAWRITE
WRITE !,"Disabling KILL of x-ref 'AD'..."
+11 IF $EXTRACT(^DD(4,.01,1,DA,2),1,4)'="Q ;"
SET ^(2)="Q ;"_^(2)
+12 IF AVAWRITE
WRITE "Done disabling KILL."
+13 ;
+14 SET ^DD(4,.01,"DT")=$$DT^XLFDT
+15 ;
KILL DA
+16 IF AVAWRITE
WRITE !,"dd update complete."
+17 IF AVAWRITE
WRITE !!,"Patch 11 to AVA 93.2 is complete.",!
+18 ;
+19 DO MAIL^XBMAIL("XUMGR-XUPROGMODE","INTRO^AVAP11")
+20 ;
EOJ ;
+1 KILL DIC,DIR,DIE,DA,DR,X,Y
+2 QUIT
+3 ;
INTRO ;
+1 ;;This is Patch 11 to AVA 93.2.
+2 ;;
+3 ;;The 'AD' x-ref on file 4, field .01, will be disabled. The 'AD'
+4 ;;x-ref was added by the VA to keep the LOCATION file in sync with
+5 ;;file 4 (INSTITUTION) when additions were made to file 4 by the VA's
+6 ;;PCE software. This is unneeded by IHS since all additions of
+7 ;;locations are made into the LOCATION file, which is DINUM'd to
+8 ;;file 4. Unfortunately, the 'AD' x-ref on file 4 causes an
+9 ;;<UNDEF> to occur when IHS attempts to add locations into the
+10 ;;LOCATION file.
+11 ;;
+12 ;;This patch disables the 'AD' x-ref on file 4, field .01.
+13 ;;
+14 ;;###
+15 ;
HELP(L) ;EP - Display text at label L.
+1 WRITE !
+2 FOR %=1:1
WRITE !?4,$PIECE($TEXT(@L+%),";",3)
IF $PIECE($TEXT(@L+%+1),";",3)="###"
QUIT
+3 QUIT
+4 ;
SORRY ;
+1 WRITE *7,!,$$C^XBFUNC("Sorry....")
+2 DO EOJ
+3 QUIT
+4 ;