Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABPAOP1

ABPAOP1.m

Go to the documentation of this file.
ABPAOP1 ;POST FACILITY DATA TO AREA DATABASE;[ 07/25/91  11:29 AM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
A0 Q  ;;NOT AN ENTRY POINT
 ;--------------------------------------------------------------------
A11 ;PROCEDURE TO PROCESS INSURER INFORMATION
 S R=$O(^ABPVGLOB(LOC,R))
 I +R=0 G GLOBERR
 S XXX=^ABPVGLOB(LOC,R)
 I $P(XXX,"^",1)'="ABP2" G GLOBERR
 S INSNAME=$P(XX,"^",13),INSZIP=$P(XX,"^",17)
 S FOUND=0 I $D(^AUTNINS("B",INSNAME))=10 D
 .S RR=0 F I=0:0 D  Q:(+RR=0)!(FOUND)
 ..S RR=$O(^AUTNINS("B",INSNAME,RR)) Q:+RR=0
 ..Q:$D(^AUTNINS(+RR,0))'=1
 ..I INSZIP=$P(^AUTNINS(+RR,0),"^",5) S INSDFN=RR,FOUND=1
 I 'FOUND D
 .S P3=$P(^AUTNINS(0),"^",3)
 .F I=P3:1 S INSDFN=I Q:$D(^AUTNINS(I,0))'=1
 .S $P(^AUTNINS(0),"^",3)=INSDFN
 .S $P(^AUTNINS(0),"^",4)=$P(^AUTNINS(0),"^",4)+1
 .S $P(^AUTNINS(INSDFN,0),"^",1)=INSNAME
 .S $P(^AUTNINS(INSDFN,0),"^",5)=$P(XX,"^",17)
 .S NVCNT=NVCNT+1,ZVCNT=ZVCNT+1 I ZVCNT#20=0 D UPDATE^ABPAOP4
 .I $D(^ABPAPOST(1,"F",LOCCD,"I",0))'=1 D
 ..S ^ABPAPOST(1,"F",LOCCD,"I",0)="^9002270.611PA^^0"
 .I $D(^ABPAPOST(1,"F",LOCCD,"I",INSDFN,0))'=1 D
 ..S ^ABPAPOST(1,"F",LOCCD,"I",INSDFN,0)=INSDFN
 ..S ^ABPAPOST(1,"F",LOCCD,"I","B",INSDFN,INSDFN)=""
 ..S $P(^ABPAPOST(1,"F",LOCCD,"I",0),"^",3)=INSDFN
 ..S NEWVAL=+$P(^ABPAPOST(1,"F",LOCCD,"I",0),"^",4)+1
 ..S $P(^ABPAPOST(1,"F",LOCCD,"I",0),"^",4)=NEWVAL
 F I=1,2,3,5 S $P(^AUTNINS(INSDFN,0),"^",I+1)=$P(XX,"^",I+13)
 S $P(^AUTNINS(INSDFN,0),"^",9)=$P(XX,"^",19)
 I $P(XXX,"^",6)'="" D
 .F I=2:1:6 S $P(^AUTNINS(INSDFN,1),"^",I-1)=$P(XXX,"^",I)
 K DIK,DA S DIK="^AUTNINS(",DA=INSDFN D IX1^DIK
 ;--------------------------------------------------------------------
 D A1^ABPAOP2 ;;SET INSURER MAILING LABEL FILE ENTRY
A15 ;CHECK LAST NAME AND FIRST INITIAL
 S NAME=$P(XX,"^",2),LNAME=$P(NAME,",",1),FINIT=$E($P(NAME,",",2),1,1)
 S FAC=$P(XX,"^",3),FACDFN=0,FACDFN=$O(^AUTTLOC("C",FAC,FACDFN))
 I +FACDFN<1 W !,?10,"INVALID LOCATION CODE IN RECORD # ",R
 S HRN=$P(XX,"^",4)
 S ABPVDFN=0,ABPVDFN=$O(^ABPVAO("G",FACDFN,HRN,ABPVDFN))
 I ABPVDFN<1 G A16^ABPAOP3
 S ZNAME=$P(^ABPVAO(ABPVDFN,0),"^",1),ZLNAME=$P(ZNAME,",",1),ZFINIT=$E($P(ZNAME,",",2),1,1)
 I (ZLNAME'=LNAME)!(ZFINIT'=FINIT) G A15B
 G A17^ABPAOP3
A15B G A17^ABPAOP3 ;; !,?5,"LAST NAME & FIRST INITIAL OF THIS FAC & CHART # DON'T MATCH",!,?7,"FACILITY NAME =",?25,NAME,!,?7,"AREA NAME = ",?25,ZNAME,!,?20,"NAME INFORMATION NOT UPDATED AT AREA" G A17^ABPAOP3
GLOBERR U IO(0) W *7,!!,"--- ERROR DETECTED IN GLOBAL ""^ABPVGLOB"" ---"
 G XIT^ABPAOP4