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

ABPVPCC2.m

Go to the documentation of this file.
ABPVPCC2 ;TALLY PRIVATE INSURANCE ELIG O/P VISIT REPORT; [ 06/02/91  12:51 PM ]
 ;;2.0;FACILITY PVT-INS TRACKING;*0*;IHS-OKC/KJR;AUGUST 7, 1991
START D INIT,XTRACT,ZTLOAD
 Q
 ;---------------------------------------------------------------------
INIT ;PROCEDURE TO INITIALIZE ROUTINE SPECIFIC VARIABLES
 S ABPV("TOTAL")=0,ABPV("HITS")=0,ABPV("TASK")=ZTSK
 S DIC="^DIC(7,",DIC(0)="",D="D",X="09" D IX^DIC
 S RXPROV="" S:+Y>0 RXPROV=+Y
 K DIC,D,X,Y
 Q
 ;---------------------------------------------------------------------
XTRACT ;PROCEDURE TO LOOP THROUGH THE ^AUPNVSIT FILE TO EXTRACT REQUIRED DATA
 S R=(ABPV("BEG")-1)+.9999,ABPV("STOP")=ABPV("END")+.9999
 F I=0:0 D  Q:+R=0!(R>ABPV("STOP"))
 .S R=$O(^AUPNVSIT("B",R)) Q:+R=0!(R>ABPV("STOP"))
 .S A("DOS")=$P(R,"."),RR=0 F J=0:0 D  Q:+RR=0
 ..S RR=$O(^AUPNVSIT("B",R,RR)) Q:+RR=0
 ..Q:$D(^AUPNVSIT(RR,0))'=1
 ..S DATA=^(0),A("DFN")=$P(DATA,"^",5)
 ..K ABPVPRV,ABPVPTR,ABPVI,X D  Q:$D(X)'=1  Q:X=RXPROV
 ...S ABPVPTR="" F ABPVI=0:0 D  Q:+ABPVPTR=0
 ....S ABPVPTR=$O(^AUPNVPRV("AD",RR,ABPVPTR)) Q:+ABPVPTR=0
 ....Q:$D(^AUPNVPRV(ABPVPTR,0))'=1
 ....I $P(^AUPNVPRV(ABPVPTR,0),"^",4)="P" D
 .....S ABPVPRV=+^AUPNVPRV(ABPVPTR,0),ABPVPTR=""
 ...Q:$D(ABPVPRV)'=1  Q:+ABPVPRV<1  Q:'$D(^DIC(6,+ABPVPRV,0))
 ...S X=$P(^DIC(6,+ABPVPRV,0),"^",4) I +X<1 K X Q
 ...I '$D(^DIC(7,+X,0)) K X Q
 ..S ABPV("TOTAL")=ABPV("TOTAL")+1
 ..Q:$D(^AUPNPRVT(A("DFN"),0))=0
 ..S A("SVCS")=0
 ..I $D(^%ZTSK(ABPV("TASK"),ABPV("SITE"),A("DOS"),A("DFN")))=1 D
 ...S A("SVCS")=^(A("DFN"))
 ..S A("SVCS")=A("SVCS")+1,ABPV("HITS")=ABPV("HITS")+1
 ..S ^%ZTSK(ABPV("TASK"),ABPV("SITE"),A("DOS"),A("DFN"))=A("SVCS")
 Q
 ;---------------------------------------------------------------------
 ;PROCEDURE TO LOAD BACKGROUND TASKMANAGER
ZTLOAD S ZTRTN="^ABPVPCC3",ZTDTH=$H,ZTIO=ABPV("IO"),ZTSAVE("ABPV(")=""
 S ZTDESC="PRINT PVT INS ELIGIBLE PCC VISITS"
 D ^%ZTLOAD
ZTLEND K ABPV,ABPV,%ZIS,%IS,ZRTN,ZTDTH,ZTDESC,ZTSAVE,ZTSK,A,X,Y,DIC,DIE,DA
 K DR,ZTIO,R,I
 Q