PRCBTPT ; GENERATED FROM 'PRCB TEMP REVIEW' PRINT TEMPLATE (#332) ; 10/27/00 ; (FILE 421.1, MARGIN=80)
G BEGIN
CP G CP^DIO2
C S DQ(C)=Y
S S Q(C)=Y*Y+Q(C) S:L(C)>Y L(C)=Y S:H(C)<Y H(C)=Y
P S N(C)=N(C)+1
A S S(C)=S(C)+Y
Q
D I Y=DITTO(C) S Y="" Q
S DITTO(C)=Y
Q
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
S I(0)="^PRCF(421.1,",J(0)=421.1
S X=$G(^PRCF(421.1,D0,0)) W ?0,$E($P(X,U,1),1,7)
S I(1)=2,J(1)=421.15 F D1=0:0 Q:$O(^PRCF(421.1,D0,2,D1))'>0 S D1=$O(^(D1)) D:$X>13 T Q:'DN D A1
G A1R
A1 ;
S X=$G(^PRCF(421.1,D0,2,D1,0)) S DIWL=14,DIWR=53 D ^DIWP
Q
A1R ;
D 0^DIWW K DIP K:DN Y
D ^DIWW
S I(1)=1,J(1)=421.14 F D1=0:0 Q:$O(^PRCF(421.1,D0,1,D1))'>0 X:$D(DSC(421.14)) DSC(421.14) S D1=$O(^(D1)) Q:D1'>0 D:$X>55 NX^DIWW D B1
G B1R
B1 ;
D N:$X>0 Q:'DN W ?0 S DIP(1)=$S($D(^PRCF(421.1,D0,1,D1,0)):^(0),1:"") S X=$P(DIP(1),U,1),DIP(2)=X S X=" ",X=$P(DIP(2),X) K DIP K:DN Y W $E(X,1,7)
W ?9 S DIP(1)=$S($D(^PRCF(421.1,D0,1,D1,4)):^(4),1:"") S X=$P(DIP(1),U,6),X=X K DIP K:DN Y W X
S X=$G(^PRCF(421.1,D0,1,D1,0)) D N:$X>11 Q:'DN W ?11 S Y=$P(X,U,2),C=1 D A:Y]"" W:Y]"" $J(Y,12,2)
W ?25 S Y=$P(X,U,3),C=2 D A:Y]"" W:Y]"" $J(Y,12,2)
W ?39 S Y=$P(X,U,4),C=3 D A:Y]"" W:Y]"" $J(Y,12,2)
W ?53 S Y=$P(X,U,5),C=4 D A:Y]"" W:Y]"" $J(Y,12,2)
S X=$G(^PRCF(421.1,D0,1,D1,4)) W ?67 S Y=$P(X,U,5) W:Y]"" $J(Y,12,2)
Q
B1R ;
K Y K DIWF
Q
HEAD ;
W !,?0,"TRANSACTION"
W !,?0,"NUMBER",?13,"DESCRIPTION"
W !,?0,"CONTROL"
W !,?0,"POINT",?9,"R/NR"
W !,?67,"ANNUALIZATION"
W !,?16,"1ST QTR",?30,"2ND QTR",?44,"3RD QTR",?58,"4TH QTR",?74,"AMOUNT"
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCBTPT 2149 printed Oct 16, 2024@18:01:42 Page 2
PRCBTPT ; GENERATED FROM 'PRCB TEMP REVIEW' PRINT TEMPLATE (#332) ; 10/27/00 ; (FILE 421.1, MARGIN=80)
+1 GOTO BEGIN
CP GOTO CP^DIO2
C SET DQ(C)=Y
S SET Q(C)=Y*Y+Q(C)
if L(C)>Y
SET L(C)=Y
if H(C)<Y
SET H(C)=Y
P SET N(C)=N(C)+1
A SET S(C)=S(C)+Y
+1 QUIT
D IF Y=DITTO(C)
SET Y=""
QUIT
+1 SET DITTO(C)=Y
+2 QUIT
N WRITE !
T if $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
if '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
if Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
if Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 if '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 SET I(0)="^PRCF(421.1,"
SET J(0)=421.1
+3 SET X=$GET(^PRCF(421.1,D0,0))
WRITE ?0,$EXTRACT($PIECE(X,U,1),1,7)
+4 SET I(1)=2
SET J(1)=421.15
FOR D1=0:0
if $ORDER(^PRCF(421.1,D0,2,D1))'>0
QUIT
SET D1=$ORDER(^(D1))
if $X>13
DO T
if 'DN
QUIT
DO A1
+5 GOTO A1R
A1 ;
+1 SET X=$GET(^PRCF(421.1,D0,2,D1,0))
SET DIWL=14
SET DIWR=53
DO ^DIWP
+2 QUIT
A1R ;
+1 DO 0^DIWW
KILL DIP
if DN
KILL Y
+2 DO ^DIWW
+3 SET I(1)=1
SET J(1)=421.14
FOR D1=0:0
if $ORDER(^PRCF(421.1,D0,1,D1))'>0
QUIT
if $DATA(DSC(421.14))
XECUTE DSC(421.14)
SET D1=$ORDER(^(D1))
if D1'>0
QUIT
if $X>55
DO NX^DIWW
DO B1
+4 GOTO B1R
B1 ;
+1 if $X>0
DO N
if 'DN
QUIT
WRITE ?0
SET DIP(1)=$SELECT($DATA(^PRCF(421.1,D0,1,D1,0)):^(0),1:"")
SET X=$PIECE(DIP(1),U,1)
SET DIP(2)=X
SET X=" "
SET X=$PIECE(DIP(2),X)
KILL DIP
if DN
KILL Y
WRITE $EXTRACT(X,1,7)
+2 WRITE ?9
SET DIP(1)=$SELECT($DATA(^PRCF(421.1,D0,1,D1,4)):^(4),1:"")
SET X=$PIECE(DIP(1),U,6)
SET X=X
KILL DIP
if DN
KILL Y
WRITE X
+3 SET X=$GET(^PRCF(421.1,D0,1,D1,0))
if $X>11
DO N
if 'DN
QUIT
WRITE ?11
SET Y=$PIECE(X,U,2)
SET C=1
if Y]""
DO A
if Y]""
WRITE $JUSTIFY(Y,12,2)
+4 WRITE ?25
SET Y=$PIECE(X,U,3)
SET C=2
if Y]""
DO A
if Y]""
WRITE $JUSTIFY(Y,12,2)
+5 WRITE ?39
SET Y=$PIECE(X,U,4)
SET C=3
if Y]""
DO A
if Y]""
WRITE $JUSTIFY(Y,12,2)
+6 WRITE ?53
SET Y=$PIECE(X,U,5)
SET C=4
if Y]""
DO A
if Y]""
WRITE $JUSTIFY(Y,12,2)
+7 SET X=$GET(^PRCF(421.1,D0,1,D1,4))
WRITE ?67
SET Y=$PIECE(X,U,5)
if Y]""
WRITE $JUSTIFY(Y,12,2)
+8 QUIT
B1R ;
+1 KILL Y
KILL DIWF
+2 QUIT
HEAD ;
+1 WRITE !,?0,"TRANSACTION"
+2 WRITE !,?0,"NUMBER",?13,"DESCRIPTION"
+3 WRITE !,?0,"CONTROL"
+4 WRITE !,?0,"POINT",?9,"R/NR"
+5 WRITE !,?67,"ANNUALIZATION"
+6 WRITE !,?16,"1ST QTR",?30,"2ND QTR",?44,"3RD QTR",?58,"4TH QTR",?74,"AMOUNT"
+7 WRITE !,"--------------------------------------------------------------------------------",!!