ABPVTX1 ;EXPORT FACILITY PVT-INS CLAIM DATA;[ 06/03/91 2:40 PM ]
;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
W !,"NOT AN ENTRY POINT" Q
S3START ;PRINT REPORT OF INSURANCE CO ADDRESS ERRORS
S (R,RR)=0
G S4START^ABPVTX2:'$D(^UTILITY("ABPVTXE","INS-ERR"))
S X="You have INCOMPLETE ADDRESS INFORMATION in your INSURER FILE."
S Y="An ERROR REPORT will now be PRINTED."
U IO(0) W *7,*7,!!,?10,X,!!,?20,Y H 5
U IO W !!,?35,X,!,?45,Y
U IO(0) W !!,*7,"You CAN NOT EXPORT these DATA until INSURER ADDRESS Information is Complete.",!,?10,"Export Job Terminated WITHOUT generating output data." H 5
D HEADER2
S3A S R=$O(^UTILITY("ABPVTXE","INS-ERR",R)) G S3END:R=""
S ZY=^AUTNINS(R,0)
W ?2,$E($P(ZY,"^",1),1,30)
W ?34,$E($P(ZY,"^",2),1,30)
W ?66,$E($P(ZY,"^",3),1,14) S X=+$P(ZY,"^",4) G S3C:+X<1
G S3C:'$D(^DIC(5,X,0))
W ?83,$P(^DIC(5,X,0),"^",2)
S3C W ?87,$E($P(ZY,"^",5),1,10)
I ^UTILITY("ABPVTXE","INS-ERR",R)="*" W ?105,"YES"
W ! I $Y>50 D HEADER2
S RR=RR+1 G S3A
S3END W !,?30,"NUMBER OF RECORDS WITH INCOMPLETE DATA = ",RR,!
W !,?30,"NO PRIVATE INSURANCE OUTPUT RECORDS HAVE BE GENERATED",!
G ZEND^ABPVTX2
F I=1:1:122 W "*"
S X1="Device # "_+IO,X2="FOR "_$P(^DIC(4,DUZ(2),0),"^",1)
W !,"* ",X1,?40,"PRIVATE INSURANCE BILLING CLAIM EXPORT LOG",?111,"PAGE ",PGNO,?121,"*",!
W "* ",?121-$L(X2)/2,X2,?121,"*",!
S Y=^UTILITY("ABPVTX",0) X ^DD("DD")
W "*",?121-$L(Y)/2,Y,?121,"*",!,"*"
F I=1:1:120 W "-"
W "*",!,"* ENTRY",?12,"CONTROL",?62,"DATE OF",?105,"CLAIM",?113,"T",?118,"D",?121,"*",!
W "*",?3,"DATE",?12,"NUMBER",?20,"*** PATIENT'S NAME ***",?53,"H R N",?62,"SERVICE",?71,"INSURANCE COMPANY NAME",?105,"AMOUNT",?113,"P",?118,"V",?121,"*",!
F I=1:1:122 W "*"
W !!
Q
F I=1:1:117 W "*"
W !,"*",?47,"INSURANCE COMPANY ADDRESS ERRORS",?116,"*",!,"*"
W ?32,"THESE ERRORS MUST BE CORRECTED IN ORDER TO EXPORT CLAIM DATA",?116,"*",!,"*"
F I=1:1:115 W "-"
W "*",!,"*",?2,"INSURANCE COMPANY NAME",?34,"*** STREET ADDRESS ***",?66,"CITY",?83,"ST",?87,"ZIP CODE",?100,"B-ADDRESS ERROR",?116,"*",!,"*"
F I=1:1:115 W "-"
W "*",!! Q
ERR U IO W @A("PRINT",10) X ^%ZIS("C") G ERR^ZU
JOBEND K I,X,Y,LEXDATE Q
ABPVTX1 ;EXPORT FACILITY PVT-INS CLAIM DATA;[ 06/03/91 2:40 PM ]
+1 ;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
+2 WRITE !,"NOT AN ENTRY POINT"
QUIT
S3START ;PRINT REPORT OF INSURANCE CO ADDRESS ERRORS
+1 SET (R,RR)=0
+2 IF '$DATA(^UTILITY("ABPVTXE","INS-ERR"))
GOTO S4START^ABPVTX2
+3 SET X="You have INCOMPLETE ADDRESS INFORMATION in your INSURER FILE."
+4 SET Y="An ERROR REPORT will now be PRINTED."
+5 USE IO(0)
WRITE *7,*7,!!,?10,X,!!,?20,Y
HANG 5
+6 USE IO
WRITE !!,?35,X,!,?45,Y
+7 USE IO(0)
WRITE !!,*7,"You CAN NOT EXPORT these DATA until INSURER ADDRESS Information is Complete.",!,?10,"Export Job Terminated WITHOUT generating output data."
HANG 5
+8 DO HEADER2
S3A SET R=$ORDER(^UTILITY("ABPVTXE","INS-ERR",R))
IF R=""
GOTO S3END
+1 SET ZY=^AUTNINS(R,0)
+2 WRITE ?2,$EXTRACT($PIECE(ZY,"^",1),1,30)
+3 WRITE ?34,$EXTRACT($PIECE(ZY,"^",2),1,30)
+4 WRITE ?66,$EXTRACT($PIECE(ZY,"^",3),1,14)
SET X=+$PIECE(ZY,"^",4)
IF +X<1
GOTO S3C
+5 IF '$DATA(^DIC(5,X,0))
GOTO S3C
+6 WRITE ?83,$PIECE(^DIC(5,X,0),"^",2)
S3C WRITE ?87,$EXTRACT($PIECE(ZY,"^",5),1,10)
+1 IF ^UTILITY("ABPVTXE","INS-ERR",R)="*"
WRITE ?105,"YES"
+2 WRITE !
IF $Y>50
DO HEADER2
+3 SET RR=RR+1
GOTO S3A
S3END WRITE !,?30,"NUMBER OF RECORDS WITH INCOMPLETE DATA = ",RR,!
+1 WRITE !,?30,"NO PRIVATE INSURANCE OUTPUT RECORDS HAVE BE GENERATED",!
+2 GOTO ZEND^ABPVTX2
USE IO
WRITE @IOF
+1 FOR I=1:1:122
WRITE "*"
+2 SET X1="Device # "_+IO
SET X2="FOR "_$PIECE(^DIC(4,DUZ(2),0),"^",1)
+3 WRITE !,"* ",X1,?40,"PRIVATE INSURANCE BILLING CLAIM EXPORT LOG",?111,"PAGE ",PGNO,?121,"*",!
+4 WRITE "* ",?121-$LENGTH(X2)/2,X2,?121,"*",!
+5 SET Y=^UTILITY("ABPVTX",0)
XECUTE ^DD("DD")
+6 WRITE "*",?121-$LENGTH(Y)/2,Y,?121,"*",!,"*"
+7 FOR I=1:1:120
WRITE "-"
+8 WRITE "*",!,"* ENTRY",?12,"CONTROL",?62,"DATE OF",?105,"CLAIM",?113,"T",?118,"D",?121,"*",!
+9 WRITE "*",?3,"DATE",?12,"NUMBER",?20,"*** PATIENT'S NAME ***",?53,"H R N",?62,"SERVICE",?71,"INSURANCE COMPANY NAME",?105,"AMOUNT",?113,"P",?118,"V",?121,"*",!
+10 FOR I=1:1:122
WRITE "*"
+11 WRITE !!
+12 QUIT
WRITE @IOF
+1 FOR I=1:1:117
WRITE "*"
+2 WRITE !,"*",?47,"INSURANCE COMPANY ADDRESS ERRORS",?116,"*",!,"*"
+3 WRITE ?32,"THESE ERRORS MUST BE CORRECTED IN ORDER TO EXPORT CLAIM DATA",?116,"*",!,"*"
+4 FOR I=1:1:115
WRITE "-"
+5 WRITE "*",!,"*",?2,"INSURANCE COMPANY NAME",?34,"*** STREET ADDRESS ***",?66,"CITY",?83,"ST",?87,"ZIP CODE",?100,"B-ADDRESS ERROR",?116,"*",!,"*"
+6 FOR I=1:1:115
WRITE "-"
+7 WRITE "*",!!
QUIT
ERR USE IO
WRITE @A("PRINT",10)
XECUTE ^%ZIS("C")
GOTO ERR^ZU
JOBEND KILL I,X,Y,LEXDATE
QUIT