ABPAOP2 ;BUILD INSURER MAILING LABEL FILE; [ 06/04/91 1:30 PM ]
;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
;CALLED BY A12I+8^ABPAOP1 DURING RECORD POSTING FUNCTION
A0 G ABORT
;
A1 I $D(ABPAMLBL("DFN"))'=1 D
.K DIC,DIE,DA,DR S DIC="^ABPAMLBL(",DIC(0)="LZ"
.S X=DT D ^DIC S ABPAMLBL("DFN")=+Y
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",0)="^9002270.51PA^^0"
;
A2 I $D(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,0))'=1 D
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,0)=LOCCD
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L","B",LOCCD,LOCCD)=""
.S $P(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",3)=LOCCD
.S $P(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",4)=$P(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",4)+1
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0)="^9002270.511PA^^0"
;
A3 S ABPAMLBL("NAME")=$P(^AUTNINS(INSDFN,0),"^")
I $D(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",INSDFN,0))=0 D Q
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",INSDFN,0)=INSDFN_"^"_ABPAMLBL("NAME")
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I","AC",ABPAMLBL("NAME"),INSDFN)=""
.S ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I","B",INSDFN,INSDFN)=""
.S $P(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",3)=INSDFN
.S $P(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",4)=$P(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",4)+1
Q
;
ABORT W !!,"ACCESS DENIED!!!" Q
ABPAOP2 ;BUILD INSURER MAILING LABEL FILE; [ 06/04/91 1:30 PM ]
+1 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
+2 ;CALLED BY A12I+8^ABPAOP1 DURING RECORD POSTING FUNCTION
A0 GOTO ABORT
+1 ;
A1 IF $DATA(ABPAMLBL("DFN"))'=1
Begin DoDot:1
+1 KILL DIC,DIE,DA,DR
SET DIC="^ABPAMLBL("
SET DIC(0)="LZ"
+2 SET X=DT
DO ^DIC
SET ABPAMLBL("DFN")=+Y
+3 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",0)="^9002270.51PA^^0"
End DoDot:1
+4 ;
A2 IF $DATA(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,0))'=1
Begin DoDot:1
+1 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,0)=LOCCD
+2 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L","B",LOCCD,LOCCD)=""
+3 SET $PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",3)=LOCCD
+4 SET $PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",4)=$PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",0),"^",4)+1
+5 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0)="^9002270.511PA^^0"
End DoDot:1
+6 ;
A3 SET ABPAMLBL("NAME")=$PIECE(^AUTNINS(INSDFN,0),"^")
+1 IF $DATA(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",INSDFN,0))=0
Begin DoDot:1
+2 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",INSDFN,0)=INSDFN_"^"_ABPAMLBL("NAME")
+3 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I","AC",ABPAMLBL("NAME"),INSDFN)=""
+4 SET ^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I","B",INSDFN,INSDFN)=""
+5 SET $PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",3)=INSDFN
+6 SET $PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",4)=$PIECE(^ABPAMLBL(ABPAMLBL("DFN"),"L",LOCCD,"I",0),"^",4)+1
End DoDot:1
QUIT
+7 QUIT
+8 ;
ABORT WRITE !!,"ACCESS DENIED!!!"
QUIT