ANRVDEL ;BHAM/LDT - DELETE ENTRY FROM VIST ROSTER FILE ; 04 May 98 / 8:21 AM
;;4.0; Visual Impairment Service Team ;;12 Jun 98
EN ;Look up entry
K DIC S DIC=2040,DIC(0)="QEAM" D ^DIC I Y<0 G QUIT
DELETE ;Deletes entry in 2040,2041.7,2042.5, and 2043.5
S ENTRY=+Y
N DIR,DIRUT,DUOUT
S DIR(0)="Y",DIR("A")="Do you want to delete the veteran from the VIST ROSTER file",DIR("B")="No"
S DIR("?")="Enter ""Yes"" to delete the veteran from the VIST ROSTER file, ""No"" to exit."
D ^DIR
I $D(DUOUT)!$D(DIRUT) G QUIT
I Y'=1 W ! G QUIT
W !!,"Deleting veteran from the VIST ROSTER file!" S DIK="^ANRV(2040,",DA=ENTRY D ^DIK
I $D(^ANRV(2041.7,"B",ENTRY)) S DIK="^ANRV(2041.7,",DA=$O(^ANRV(2041.7,"B",ENTRY,0)) D ^DIK
I $D(^ANRV(2042.5,"B",ENTRY)) S DIK="^ANRV(2042.5,",DA=$O(^ANRV(2042.5,"B",ENTRY,0)) D ^DIK
I $D(^ANRV(2043.5,"B",ENTRY)) S DIK="^ANRV(2043.5,",DA=$O(^ANRV(2043.5,"B",ENTRY,0)) D ^DIK
G QUIT
;
EN2 ;Delete entry in 2042.5 only
K DIC S DIC=2042.5,DIC(0)="QEAM" D ^DIC I Y<0 G QUIT
S ENTRY=+Y
N DIR,DIRUT,DUOUT
S DIR(0)="Y",DIR("A")="Do you want to delete the veteran from the VIST REFERRAL ROSTER file",DIR("B")="No"
S DIR("?")="Enter ""Yes"" to delete the veteran from the VIST REFERRAL ROSTER file, ""No"" to exit."
D ^DIR
I $D(DUOUT)!$D(DIRUT) G QUIT
I Y'=1 W ! G QUIT
W !!,"Deleting veteran from the VIST REFFERAL ROSTER file!" S DIK="^ANRV(2042.5,",DA=ENTRY D ^DIK
;
QUIT K DIK,DIC,DA,ENTRY,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HANRVDEL 1461 printed Nov 22, 2024@17:55:30 Page 2
ANRVDEL ;BHAM/LDT - DELETE ENTRY FROM VIST ROSTER FILE ; 04 May 98 / 8:21 AM
+1 ;;4.0; Visual Impairment Service Team ;;12 Jun 98
EN ;Look up entry
+1 KILL DIC
SET DIC=2040
SET DIC(0)="QEAM"
DO ^DIC
IF Y<0
GOTO QUIT
DELETE ;Deletes entry in 2040,2041.7,2042.5, and 2043.5
+1 SET ENTRY=+Y
+2 NEW DIR,DIRUT,DUOUT
+3 SET DIR(0)="Y"
SET DIR("A")="Do you want to delete the veteran from the VIST ROSTER file"
SET DIR("B")="No"
+4 SET DIR("?")="Enter ""Yes"" to delete the veteran from the VIST ROSTER file, ""No"" to exit."
+5 DO ^DIR
+6 IF $DATA(DUOUT)!$DATA(DIRUT)
GOTO QUIT
+7 IF Y'=1
WRITE !
GOTO QUIT
+8 WRITE !!,"Deleting veteran from the VIST ROSTER file!"
SET DIK="^ANRV(2040,"
SET DA=ENTRY
DO ^DIK
+9 IF $DATA(^ANRV(2041.7,"B",ENTRY))
SET DIK="^ANRV(2041.7,"
SET DA=$ORDER(^ANRV(2041.7,"B",ENTRY,0))
DO ^DIK
+10 IF $DATA(^ANRV(2042.5,"B",ENTRY))
SET DIK="^ANRV(2042.5,"
SET DA=$ORDER(^ANRV(2042.5,"B",ENTRY,0))
DO ^DIK
+11 IF $DATA(^ANRV(2043.5,"B",ENTRY))
SET DIK="^ANRV(2043.5,"
SET DA=$ORDER(^ANRV(2043.5,"B",ENTRY,0))
DO ^DIK
+12 GOTO QUIT
+13 ;
EN2 ;Delete entry in 2042.5 only
+1 KILL DIC
SET DIC=2042.5
SET DIC(0)="QEAM"
DO ^DIC
IF Y<0
GOTO QUIT
+2 SET ENTRY=+Y
+3 NEW DIR,DIRUT,DUOUT
+4 SET DIR(0)="Y"
SET DIR("A")="Do you want to delete the veteran from the VIST REFERRAL ROSTER file"
SET DIR("B")="No"
+5 SET DIR("?")="Enter ""Yes"" to delete the veteran from the VIST REFERRAL ROSTER file, ""No"" to exit."
+6 DO ^DIR
+7 IF $DATA(DUOUT)!$DATA(DIRUT)
GOTO QUIT
+8 IF Y'=1
WRITE !
GOTO QUIT
+9 WRITE !!,"Deleting veteran from the VIST REFFERAL ROSTER file!"
SET DIK="^ANRV(2042.5,"
SET DA=ENTRY
DO ^DIK
+10 ;
QUIT KILL DIK,DIC,DA,ENTRY,X,Y
+1 QUIT