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

ABPAAR1B.m

Go to the documentation of this file.
ABPAAR1B ;COMPILE CLAIMS FOR UTILIZATION RPT; [ 03/16/91  10:06 AM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
 ;KEY VARIABLES: R   = DATE CLAIM EXTRACTED FROM FACILITY
 ;               RR  = PATIENT DFN
 ;               RRR = CLAIM DFN WITHIN PATIENT RECORD
 ;
 G ABORT
R0 K ^TMP($J) S R=BDT-1
NXTR S R=$O(^ABPVAO("AC",R)) G CONT:+R=0,CONT:+R>+EDT S RR=0
NXTRR S RR=$O(^ABPVAO("AC",R,RR)) G:+RR=0 NXTR
 I $D(^ABPVAO(RR,0))=0 G NXTRR
 I $D(^ABPVAO(RR,0))=10 G NXTRR
 I +FAC>0 I +$P(^ABPVAO(RR,0),"^",2)'=+FAC G NXTRR
 S RRR=0 F I=1:1:15 S @("P"_I)=0
NXTRRR S RRR=$O(^ABPVAO("AC",R,RR,RRR)) G:+RRR=0 STEMP
 I $D(^ABPVAO(RR,1,RRR,0))=0 G NXTRRR
 I $D(^ABPVAO(RR,1,RRR,0))=10 G NXTRRR
 S VT=$P(^ABPVAO(RR,1,RRR,0),"^",4),LBL="VT"_VT
 S FC=$P(^ABPVAO(RR,0),"^",2),VD=$P(^ABPVAO(RR,1,RRR,0),"^",7)
 S WKL=$P(^ABPVAO(RR,1,RRR,0),"^",5)
 I $D(^TMP($J,FC,RR))=0 S P11=P11+1,^TMP($J,FC,RR)=""
 G @LBL
 ;
VTO I $D(^TMP($J,FC,"O",RR))=0 S P4=P4+1,^TMP($J,FC,"O",RR)=""
 S P5=P5+WKL,P6=P6+VD,P14=P14+1 G NXTRRR
VTI I $D(^TMP($J,FC,"I",RR))=0 S P1=P1+1,^TMP($J,FC,"I",RR)=""
 S P2=P2+WKL,P3=P3+VD,P12=P12+1 G NXTRRR
VTP I $D(^TMP($J,FC,"I",RR))=0 S P1=P1+1,^TMP($J,FC,"O",RR)=""
 S P3=P3+VD G NXTRRR
VTD I $D(^TMP($J,FC,"O",RR))=0 S P4=P4+1,^TMP($J,FC,"O",RR)=""
 S P5=P5+WKL,P6=P6+VD,P14=P14+1 G NXTRRR
VTA G NXTRRR
 ;
STEMP I $D(TEMP(ZTSK,FC))=0 F I=1:1:15 S $P(TEMP(ZTSK,FC),"^",I)=0
 F P=1:1:6,11,12,14 D
 .S $P(TEMP(ZTSK,FC),"^",P)=$P(TEMP(ZTSK,FC),"^",P)+@("P"_P)
 S $P(TEMP(ZTSK,FC),"^",7)=$P(TEMP(ZTSK,FC),"^",7)+P3+P6
 G NXTRR
 ;
CONT G R0^ABPAAR1C
 ;
ABORT W *7,!!,"<<< SORRY, ACCESS DENIED!!! >>>" Q