VistA-FOIAVistA/r/FEE_BASIS-FB/FBCHACT1.m

19 lines
948 B
Mathematica

FBCHACT1 ;AISC/DMK-NON VA UNAUTHORIZED DAYS FOR ACTIVITY ;01JUL01
;;3.5;FEE BASIS;**28**;JAN 30, 1995
;;Per VHA Directive 10-93-142, this routine should not be modified.
K ^TMP("FB",$J) F I="00",10,86 S DAYS(I)=0,^TMP("FB",$J,FBK,I)=0
F I=FBCHDT:0 S I=$O(^FB583("AD",FBTYPE,I)) Q:I'>0 F J=0:0 S J=$O(^FB583("AD",FBTYPE,I,J)) Q:J'>0 I $D(^FB583(J,0)) S FB(0)=^(0) D VTYPE S:PTYPE="00"!(PTYPE=10)!(PTYPE=86) ^TMP("FB",$J,VTYPE,PTYPE)=DAYS(PTYPE)
Q
VTYPE S VTYPE=$P(FB(0),"^",3),VTYPE=$S(VTYPE="":"",1:$S($D(^FBAAV(VTYPE,0)):$P(^(0),"^",7),1:""))
I VTYPE="" S VTYPE=1
S PTYPE=$P(FB(0),"^",10)
S FBFRDT=$P(FB(0),"^",13),FBFRDT=$S(FBFRDT<(FBCHDT+1):FBCHDT+1,1:FBFRDT)
S FBTODT=$P(FB(0),"^",14),FBTODT=$S(FBTODT>FBENDDT:FBENDDT,1:FBTODT-1)
S FBDAYS=0
D:FBFRDT'>FBENDDT DAYS^FBCHACT0
Q:VTYPE'=FBK
I PTYPE="00" S DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS
I PTYPE=10 S DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS Q
I PTYPE=86 S DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS Q
Q