AZHWTEST ; IHS/SD/EFG - TEST ROUTINE at 7/17/2003 11:13:08 AM
;
;Q
PRVT ; FIND ANY PRIVATE ELIG MISSING INSURER POINTER
W !,"If you answer ""NO"" or ""YES"" to ""Deleting"" the records, you will "
W !," see the records displayed on the screen.",!!
K DIR,ANSWER
S DIR(0)="Y"
S DIR("A")="DO YOU WANT TO DELETE THE BAD RECORDS IN AUPNPRVT "
S DIR("B")="NO"
D ^DIR S ANSWER=Y
Q:$D(DIRUT)
S RECNO=0
F S RECNO=$O(^AUPNPRVT(RECNO)) Q:'RECNO D
. S D1=0
. F S D1=$O(^AUPNPRVT(RECNO,11,D1)) Q:'D1 D
.. I $P($G(^AUPNPRVT(RECNO,11,D1,0)),U,1)="" D
... W !,"NO INSURER POINTER AT ","^AUPNPRVT(",RECNO,",11,",D1,",0)=",$G(^AUPNPRVT(RECNO,11,D1,0))
... I ANSWER=1 K ^AUPNPRVT(RECNO,11,D1,0)
Q
INS ; FIND INSURER RECORDS MISSING ZERO NODE
W !,"If you answer ""NO"" or ""YES"" to ""Deleting"" the records, you will "
W !," see the records displayed on the screen.",!!
K DIR,ANSWER
S DIR(0)="Y"
S DIR("A")="DO YOU WANT TO DELETE THE BAD RECORDS IN AUTNINS "
S DIR("B")="NO"
D ^DIR S ANSWER=Y
Q:$D(DIRUT)
S RECNO=0
F S RECNO=$O(^AUTNINS(RECNO)) Q:'RECNO D
. I '$D(^AUTNINS(RECNO,0)) D
.. W !,"AUTNINS ENTRY MISSING ZERO NODE = ",RECNO
.. I ANSWER=1 S DIK="^AUTNINS(",DA=RECNO D ^DIK
.. S BNAME=""
.. F S BNAME=$O(^AUTNINS("B",BNAME)) Q:BNAME="" D
... I $D(^AUTNINS("B",BNAME,RECNO)) D
.... I ANSWER=1 K ^AUTNINS("B",BNAME,RECNO)
Q
AZHWTEST ; IHS/SD/EFG - TEST ROUTINE at 7/17/2003 11:13:08 AM
+1 ;
+2 ;Q
PRVT ; FIND ANY PRIVATE ELIG MISSING INSURER POINTER
+1 WRITE !,"If you answer ""NO"" or ""YES"" to ""Deleting"" the records, you will "
+2 WRITE !," see the records displayed on the screen.",!!
+3 KILL DIR,ANSWER
+4 SET DIR(0)="Y"
+5 SET DIR("A")="DO YOU WANT TO DELETE THE BAD RECORDS IN AUPNPRVT "
+6 SET DIR("B")="NO"
+7 DO ^DIR
SET ANSWER=Y
+8 IF $DATA(DIRUT)
QUIT
+9 SET RECNO=0
+10 FOR
SET RECNO=$ORDER(^AUPNPRVT(RECNO))
IF 'RECNO
QUIT
Begin DoDot:1
+11 SET D1=0
+12 FOR
SET D1=$ORDER(^AUPNPRVT(RECNO,11,D1))
IF 'D1
QUIT
Begin DoDot:2
+13 IF $PIECE($GET(^AUPNPRVT(RECNO,11,D1,0)),U,1)=""
Begin DoDot:3
+14 WRITE !,"NO INSURER POINTER AT ","^AUPNPRVT(",RECNO,",11,",D1,",0)=",$GET(^AUPNPRVT(RECNO,11,D1,0))
+15 IF ANSWER=1
KILL ^AUPNPRVT(RECNO,11,D1,0)
End DoDot:3
End DoDot:2
End DoDot:1
+16 QUIT
INS ; FIND INSURER RECORDS MISSING ZERO NODE
+1 WRITE !,"If you answer ""NO"" or ""YES"" to ""Deleting"" the records, you will "
+2 WRITE !," see the records displayed on the screen.",!!
+3 KILL DIR,ANSWER
+4 SET DIR(0)="Y"
+5 SET DIR("A")="DO YOU WANT TO DELETE THE BAD RECORDS IN AUTNINS "
+6 SET DIR("B")="NO"
+7 DO ^DIR
SET ANSWER=Y
+8 IF $DATA(DIRUT)
QUIT
+9 SET RECNO=0
+10 FOR
SET RECNO=$ORDER(^AUTNINS(RECNO))
IF 'RECNO
QUIT
Begin DoDot:1
+11 IF '$DATA(^AUTNINS(RECNO,0))
Begin DoDot:2
+12 WRITE !,"AUTNINS ENTRY MISSING ZERO NODE = ",RECNO
+13 IF ANSWER=1
SET DIK="^AUTNINS("
SET DA=RECNO
DO ^DIK
+14 SET BNAME=""
+15 FOR
SET BNAME=$ORDER(^AUTNINS("B",BNAME))
IF BNAME=""
QUIT
Begin DoDot:3
+16 IF $DATA(^AUTNINS("B",BNAME,RECNO))
Begin DoDot:4
+17 IF ANSWER=1
KILL ^AUTNINS("B",BNAME,RECNO)
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+18 QUIT