AZSDHIS ; DELETE HIS IIDs [ 10/03/85 2:16 PM ]
S DFN=0 F L=0:0 S DFN=$O(^AUPNPAT(DFN)) Q:$E(DFN)]9 W "." D:$D(^(DFN,41,4584,0))
. W "*"
. S HRNO=$P(^(0),"^",2)
. K ^(0),^AUPNPAT("D",HRNO,DFN,4584)
. S $P(^AUPNPAT(DFN,41,0),"^",4)=$P(^AUPNPAT(DFN,41,0),"^",4)-1
W !!,"ALL DONE"
Q
AZSDHIS ; DELETE HIS IIDs [ 10/03/85 2:16 PM ]
+1 SET DFN=0
FOR L=0:0
SET DFN=$ORDER(^AUPNPAT(DFN))
IF $EXTRACT(DFN)]9
QUIT
WRITE "."
IF $DATA(^(DFN,41,4584,0))
Begin DoDot:1
+2 WRITE "*"
+3 SET HRNO=$PIECE(^(0),"^",2)
+4 KILL ^(0),^AUPNPAT("D",HRNO,DFN,4584)
+5 SET $PIECE(^AUPNPAT(DFN,41,0),"^",4)=$PIECE(^AUPNPAT(DFN,41,0),"^",4)-1
End DoDot:1
+6 WRITE !!,"ALL DONE"
+7 QUIT