PRCSSTAT ;WISC/KMB-COLLECT FMS QUARTERLY DATA FOR RECONCILLIATION ;1/14/93 12:00
;;5.1;IFCAP;;Oct 20, 2000
;Per VHA Directive 10-93-142, this routine should not be modified.
START ;we have PRC("CP"),PRC("QTR"),PRC("FY")
N COUNTER,CHECK,FIELD,FIELDS,QTR,OUT,TOTAL,ZAP
S (CHECK,OUT,TOTAL)=0,COUNTER=PRC("FY")_PRC("QTR")_PRC("CP")
S (FIELD,FIELDS)="FMS REFERENCE-DATE-AMOUNT",QTR=PRC("QTR")
I '$D(^PRCS(417,"C",COUNTER)) S OUT=1 D EVAL Q
D HEADER
F S CHECK=$O(^PRCS(417,"C",COUNTER,CHECK)) Q:CHECK="" D
.I $D(^PRCS(417,CHECK,0)) F I=1:1:5 S $P(FIELDS,"-",I)=$P(^PRCS(417,CHECK,0),"^",I)
.W !,$P(FIELDS,"-"),?15,$P(FIELDS,"-",2),?30,$P(FIELDS,"-",3),?45,$P(FIELDS,"-",4),?60,$P(FIELDS,"-",5)
.S HOLD=$P(FIELDS,"-"),TOTAL=TOTAL+HOLD
.I $Y>25 D HEADER
W !,"Total amount of FMS transactions: $",$J(TOTAL,20,2),!,?35,"-------------------"
Q
;
EVAL I OUT'=0 W $P($T(MESSAGE+OUT),";;",2) Q
W $S(QTR=1:"1ST",QTR=2:"2ND",QTR=3:"3RD",QTR=4:"4TH",1:"")," QUARTER"
;
W !,$P(FIELD,"-"),?15,$P(FIELD,"-",2),?30,$P(FIELD,"-",3),?45,$P(FIELD,"-",4),?60,$P(FIELD,"-",5),!
S ZAP="-*-*-*-*-*-*-*" F I=1:1:4 W ZAP
Q
MESSAGE ;;
;;There are no FMS transactions for the selected year and quarter
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCSSTAT 1300 printed Dec 13, 2024@02:18:31 Page 2
PRCSSTAT ;WISC/KMB-COLLECT FMS QUARTERLY DATA FOR RECONCILLIATION ;1/14/93 12:00
+1 ;;5.1;IFCAP;;Oct 20, 2000
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
START ;we have PRC("CP"),PRC("QTR"),PRC("FY")
+1 NEW COUNTER,CHECK,FIELD,FIELDS,QTR,OUT,TOTAL,ZAP
+2 SET (CHECK,OUT,TOTAL)=0
SET COUNTER=PRC("FY")_PRC("QTR")_PRC("CP")
+3 SET (FIELD,FIELDS)="FMS REFERENCE-DATE-AMOUNT"
SET QTR=PRC("QTR")
+4 IF '$DATA(^PRCS(417,"C",COUNTER))
SET OUT=1
DO EVAL
QUIT
+5 DO HEADER
+6 FOR
SET CHECK=$ORDER(^PRCS(417,"C",COUNTER,CHECK))
if CHECK=""
QUIT
Begin DoDot:1
+7 IF $DATA(^PRCS(417,CHECK,0))
FOR I=1:1:5
SET $PIECE(FIELDS,"-",I)=$PIECE(^PRCS(417,CHECK,0),"^",I)
+8 WRITE !,$PIECE(FIELDS,"-"),?15,$PIECE(FIELDS,"-",2),?30,$PIECE(FIELDS,"-",3),?45,$PIECE(FIELDS,"-",4),?60,$PIECE(FIELDS,"-",5)
+9 SET HOLD=$PIECE(FIELDS,"-")
SET TOTAL=TOTAL+HOLD
+10 IF $Y>25
DO HEADER
End DoDot:1
+11 WRITE !,"Total amount of FMS transactions: $",$JUSTIFY(TOTAL,20,2),!,?35,"-------------------"
+12 QUIT
+13 ;
EVAL IF OUT'=0
WRITE $PIECE($TEXT(MESSAGE+OUT),";;",2)
QUIT
WRITE @IOF
WRITE ?10,"FMS TRANSACTIONS FOR CONTROL POINT ",PRC("CP")," FOR "
+1 WRITE $SELECT(QTR=1:"1ST",QTR=2:"2ND",QTR=3:"3RD",QTR=4:"4TH",1:"")," QUARTER"
+2 ;
+3 WRITE !,$PIECE(FIELD,"-"),?15,$PIECE(FIELD,"-",2),?30,$PIECE(FIELD,"-",3),?45,$PIECE(FIELD,"-",4),?60,$PIECE(FIELD,"-",5),!
+4 SET ZAP="-*-*-*-*-*-*-*"
FOR I=1:1:4
WRITE ZAP
+5 QUIT
MESSAGE ;;
+1 ;;There are no FMS transactions for the selected year and quarter