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

ABPVTX2.m

Go to the documentation of this file.
  1. ABPVTX2 ;PT 3 OF PVT INS CLAIM EXPORT PROGRAM [ 08/07/91 3:44 PM ]
  1. ;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
  1. A0 W !,"NOT AN ENTRY POINT" Q
  1. S4C S ZY=^AUTNINS(X,1) F I=1:1:5 S $P(EX2,"^",I+1)=$P(ZY,"^",I)
  1. Q
  1. S4START S (R,RR,RRR,RCT)=0 K ^ABPVDATA
  1. U IO(0) W !!,"Generating Private Insurance Claim Export Records: ",!
  1. S R=BRECNO
  1. S4A S R=$O(^ABPVFAC(R)) G S4END:+R=0 S ZX=^ABPVFAC(R,0)
  1. S $P(EX1,"^",1)="ABP1",$P(EX1,"^",2)=$P(^DPT(+$P(ZX,"^",2),0),"^",1)
  1. S $P(EX1,"^",3)=$P(^AUTTLOC($P(^ABPVFAC(R,0),"^",4),0),"^",10)
  1. S $P(EX1,"^",4)=$P(ZX,"^",5),$P(EX1,"^",5)=$P(ZX,"^",3)
  1. S $P(EX1,"^",6)=$P(ZX,"^",6),$P(EX1,"^",7)=$P(ZX,"^",7)
  1. S $P(EX1,"^",8)=$P(ZX,"^",9),$P(EX1,"^",9)=$P(ZX,"^",10)
  1. S $P(EX1,"^",10)=$P(ZX,"^",11),$P(EX1,"^",11)=$P(ZX,"^",16)
  1. S $P(EX1,"^",12)=$P(ZX,"^",17)
  1. S X=$P(ZX,"^",8) F I=1:1:6 S $P(EX1,"^",I+12)=$P(^AUTNINS(X,0),"^",I)
  1. S $P(EX1,"^",19)=$P(^AUTNINS(X,0),"^",9)
  1. S4B S ZY="",EX2="ABP2" I $D(^AUTNINS(X,1))=1 D S4C
  1. S $P(EX1,"^",20)=$P(ZX,"^",1),$P(EX1,"^",21)=DT,$P(EX1,"^",22)="P"
  1. S $P(EX1,"^",23)=$P(^DPT(+$P(ZX,"^",2),0),"^",9)
  1. S $P(^ABPVFAC(R,0),"^",14)="Y",$P(^ABPVFAC(R,0),"^",15)=DT
  1. K ^ABPVFAC("E","N",R)
  1. S ^ABPVFAC("E","Y",R)="",^ABPVFAC("F",DT,R)=""
  1. S RCT=RCT+1,^ABPVDATA(RCT)=EX1 S:RCT=1 (FDATE,EDATE)=$P(ZX,"^",11)
  1. S RCT=RCT+1,^ABPVDATA(RCT)=EX2
  1. S DA=$O(^ABMDBILL("B",$P(ZX,"^"),"")) I DA>0 S DIE="^ABMDBILL(",DR=".18////1" D ^DIE I $D(^ABMDBILL(DA,1)),$P(^(1),"^",7)>0 S DA=$P(^(1),"^",7),DIE="^ABMDTXST(",DR=".06////1" D ^DIE
  1. I RCT#4=0 U IO(0) W $J((RCT/2),8)
  1. I $P(ZX,"^",11)<FDATE S FDATE=$P(ZX,"^",11)
  1. I $P(ZX,"^",11)>EDATE S EDATE=$P(ZX,"^",11)
  1. S LRECNO=R G S4A
  1. S4END D ^ABPVVAR I RCT=0 D G ZEND
  1. .U IO(0) W !!,*7,?10,"NO RECORDS AVAILABLE FOR EXPORT -- "
  1. .W "JOB CANCELLED"
  1. S ^ABPVDATA(0)=$P(^AUTTLOC(ABPV("SITE"),0),"^",10)_"^"_$P(^DIC(4,ABPV("SITE"),0),"^",1)_"^"_DT_"^"_FDATE_"^"_EDATE_"^"_LRECNO_"^"_(RCT/2)
  1. U IO(0) W ! I $D(A("PRINT",10)) U IO W @A("PRINT",10)
  1. S XX=^ABPVDATA(0)
  1. S5START U IO W @IOF D HEADER W @IOF X ^%ZIS("C") D ^%AUCLS,HEADER
  1. WRITETP S AUGL="ABPVDATA",AUTLE="3P CLAIM EXPORT -"
  1. D ^AUGSAVE I AUFLG G JOBABEND
  1. K ABPVMESS S ABPVMESS="NORMAL END OF JOB"
  1. S ABPVMESS(2)="... Press any key to continue ..." D PAUSE^ABPVZMM
  1. S DIE="^ABPVTXST(",XN=$P(^ABPVTXST(0),"^",4)+1
  1. I $D(^ABPVTXST("B",DUZ(2))) G SETZERA
  1. S $P(^ABPVTXST(0),"^",3)=DUZ(2),^ABPVTXST(DUZ(2),0)=DUZ(2)
  1. S $P(^ABPVTXST(0),"^",4)=XN,^ABPVTXST("B",DUZ(2),DUZ(2))=""
  1. SETZERA S DA=DUZ(2),DR="1///"_DT,DR(2,9002271.01)=".01///"_DT D ^DIE
  1. S NI=$P(^ABPVTXST(DUZ(2),1,0),"^",3)
  1. S ^ABPVTXST(DUZ(2),1,NI,0)=DT_"^"_FDATE_"^"_EDATE_"^"_LRECNO_"^"_(RCT/2)_"^^^^^Y"
  1. G ZEND
  1. JOBABEND W *7,!!,?25,"ABNORMAL END OF PVT INS EXPORT"
  1. I $D(AUFLG(1)) W !!?(40-($L(AUFLG(1))/2)),AUFLG(1),!! K AUFLG
  1. W !,"ENTER <RETURN> TO CONTINUE" R X:DTIME
  1. ZEND I $D(IO(0))=1 I $D(IO)=1 I IO'=IO(0) U IO W @IOF X ^%ZIS("C")
  1. ZENDA K BRECNO,EDATE,EX1,FDATE,I,PGNO,R,RCT,RR,RRR,RSAVE,X,Y,ZCLAMT,ZCLCT
  1. K ZINSCO,ZINSERR,ZX,ZY,ABPV,LEXDATE,ZNODE,ABPV("HD")
  1. L
  1. Q
  1. W !,"*",?12,"PRIVATE INSURANCE BILLING CLAIM EXPORT REPORT",?69,"*",!
  1. S X="FOR "_$P(^DIC(4,DUZ(2),0),"^",1) W "*",?70-$L(X)/2,X,?69,"*",!
  1. S Y=DT X ^DD("DD") W "*",?70-$L(Y)/2,Y,?69,"*",! F I=1:1:70 W "*"
  1. W !!?10,"FACILITY CODE = ",?40,$P(XX,"^",1)
  1. W !,?10,"DATE EXPORT CREATED = " S Y=$P(XX,"^",3) X ^DD("DD") W ?40,Y
  1. W !,?10,"BEGINNING CLAIM DATE = " S Y=$P(XX,"^",4) X ^DD("DD") W ?40,Y
  1. W !,?10,"ENDING CLAIM DATE = " S Y=$P(XX,"^",5) X ^DD("DD") W ?40,Y
  1. W !,?10,"NUMBER OF CLAIM RECORDS = ",?40,$P(XX,"^",7),!!
  1. F I=1:1:70 W "*"
  1. Q