AGPREI2 ; IHS/ASDS/EFG - PRE INIT ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
D T^AG W *7," - Fix Mail List data dd reference nodes",!!
D ^AGADFIX ;FIX mail list data dd reference nodes
D T^AG W *7," - Perform SSN Matching installation",!!
D ^AGSSINST ;perform SSN / Matching install
D T^AG W *7," - BEGINNING MENU AND KEY NAME CHANGES",!!
KEYS ;RENAME KEYS AND MAIN MENU
N AGMKDD
I $P(^DD(19,.01,0),"^",2)["I" S $P(^DD(19,.01,0),"^",2)="RFX",AGMKDD(19)=$P(^DD(19,.01,0),"^",2)
I $P(^DD(19.1,.01,0),"^",2)["I" S $P(^DD(19.1,.01,0),"^",2)="RFX",AGMKDD(19.1)=$P(^DD(19.1,.01,0),"^",2)
S DA=$O(^DIC(19,"B","AGMASTER",0)) I DA D
.S DIE="^DIC(19,",DR=".01///AGMENU" D ^DIE
S $P(^DD(19.1,.01,0),"^",2)="RFX"
N I F I="AGZUSR","AGSS MANAGER" D
.S AG("NEWNAME")=$S(I="AGZUSR":"AGZMENU",1:"AGZSS MANAGER")
.S DA=0 F S DA=$O(^XUSEC(I,DA)) Q:'DA D
..S ^XUSEC(AG("NEWNAME"),DA)=""
.S DA=$O(^DIC(19.1,"B",I,0)) I DA D
..S DIE="^DIC(19.1,",DR=".01///"_AG("NEWNAME") D ^DIE
I $D(AGMKDD(19)) S $P(^DD(19,.01,0),"^",2)=AGMKDD(19)
I $D(AGMKDD(19.1)) S $P(^DD(19.1,.01,0),"^",2)=AGMKDD(19.1)
D T^AG W *7," - MENU AND KEY NAME CHANGES COMPLETE.",!!
K DIC S X="AGFILESCAN",DIC=19,DIC(0)="QM" D ^DIC
I '+Y W !,"Could not find the menu AGFILESCAN to Change its lock",! G OUT
K DIE S DA=+Y,DIE=19,DR="3///AGZMENU" D ^DIE
W !,"LOCK on menu AGFILESCAN changed to AGZUSR",!
OUT Q
AGPREI2 ; IHS/ASDS/EFG - PRE INIT ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 DO T^AG
WRITE *7," - Fix Mail List data dd reference nodes",!!
+4 ;FIX mail list data dd reference nodes
DO ^AGADFIX
+5 DO T^AG
WRITE *7," - Perform SSN Matching installation",!!
+6 ;perform SSN / Matching install
DO ^AGSSINST
+7 DO T^AG
WRITE *7," - BEGINNING MENU AND KEY NAME CHANGES",!!
KEYS ;RENAME KEYS AND MAIN MENU
+1 NEW AGMKDD
+2 IF $PIECE(^DD(19,.01,0),"^",2)["I"
SET $PIECE(^DD(19,.01,0),"^",2)="RFX"
SET AGMKDD(19)=$PIECE(^DD(19,.01,0),"^",2)
+3 IF $PIECE(^DD(19.1,.01,0),"^",2)["I"
SET $PIECE(^DD(19.1,.01,0),"^",2)="RFX"
SET AGMKDD(19.1)=$PIECE(^DD(19.1,.01,0),"^",2)
+4 SET DA=$ORDER(^DIC(19,"B","AGMASTER",0))
IF DA
Begin DoDot:1
+5 SET DIE="^DIC(19,"
SET DR=".01///AGMENU"
DO ^DIE
End DoDot:1
+6 SET $PIECE(^DD(19.1,.01,0),"^",2)="RFX"
+7 NEW I
FOR I="AGZUSR","AGSS MANAGER"
Begin DoDot:1
+8 SET AG("NEWNAME")=$SELECT(I="AGZUSR":"AGZMENU",1:"AGZSS MANAGER")
+9 SET DA=0
FOR
SET DA=$ORDER(^XUSEC(I,DA))
IF 'DA
QUIT
Begin DoDot:2
+10 SET ^XUSEC(AG("NEWNAME"),DA)=""
End DoDot:2
+11 SET DA=$ORDER(^DIC(19.1,"B",I,0))
IF DA
Begin DoDot:2
+12 SET DIE="^DIC(19.1,"
SET DR=".01///"_AG("NEWNAME")
DO ^DIE
End DoDot:2
End DoDot:1
+13 IF $DATA(AGMKDD(19))
SET $PIECE(^DD(19,.01,0),"^",2)=AGMKDD(19)
+14 IF $DATA(AGMKDD(19.1))
SET $PIECE(^DD(19.1,.01,0),"^",2)=AGMKDD(19.1)
+15 DO T^AG
WRITE *7," - MENU AND KEY NAME CHANGES COMPLETE.",!!
+16 KILL DIC
SET X="AGFILESCAN"
SET DIC=19
SET DIC(0)="QM"
DO ^DIC
+17 IF '+Y
WRITE !,"Could not find the menu AGFILESCAN to Change its lock",!
GOTO OUT
+18 KILL DIE
SET DA=+Y
SET DIE=19
SET DR="3///AGZMENU"
DO ^DIE
+19 WRITE !,"LOCK on menu AGFILESCAN changed to AGZUSR",!
OUT QUIT