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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFBCHACT1 966 printed Dec 13, 2024@01:57:31 Page 2
FBCHACT1 ;AISC/DMK-NON VA UNAUTHORIZED DAYS FOR ACTIVITY ;01JUL01
+1 ;;3.5;FEE BASIS;**28**;JAN 30, 1995
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 KILL ^TMP("FB",$JOB)
FOR I="00",10,86
SET DAYS(I)=0
SET ^TMP("FB",$JOB,FBK,I)=0
+4 FOR I=FBCHDT:0
SET I=$ORDER(^FB583("AD",FBTYPE,I))
if I'>0
QUIT
FOR J=0:0
SET J=$ORDER(^FB583("AD",FBTYPE,I,J))
if J'>0
QUIT
IF $DATA(^FB583(J,0))
SET FB(0)=^(0)
DO VTYPE
if PTYPE="00"!(PTYPE=10)!(PTYPE=86)
SET ^TMP("FB",$JOB,VTYPE,PTYPE)=DAYS(PTYPE)
+5 QUIT
VTYPE SET VTYPE=$PIECE(FB(0),"^",3)
SET VTYPE=$SELECT(VTYPE="":"",1:$SELECT($DATA(^FBAAV(VTYPE,0)):$PIECE(^(0),"^",7),1:""))
+1 IF VTYPE=""
SET VTYPE=1
+2 SET PTYPE=$PIECE(FB(0),"^",10)
+3 SET FBFRDT=$PIECE(FB(0),"^",13)
SET FBFRDT=$SELECT(FBFRDT<(FBCHDT+1):FBCHDT+1,1:FBFRDT)
+4 SET FBTODT=$PIECE(FB(0),"^",14)
SET FBTODT=$SELECT(FBTODT>FBENDDT:FBENDDT,1:FBTODT-1)
+5 SET FBDAYS=0
+6 if FBFRDT'>FBENDDT
DO DAYS^FBCHACT0
+7 if VTYPE'=FBK
QUIT
+8 IF PTYPE="00"
SET DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS
+9 IF PTYPE=10
SET DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS
QUIT
+10 IF PTYPE=86
SET DAYS(PTYPE)=DAYS(PTYPE)+FBDAYS
QUIT
+11 QUIT