AMHRC2P ; IHS/CMI/LAB - print active client list (using case open/close) ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
;
;
PRINT ;
START ;
S AMH80D="-------------------------------------------------------------------------------"
S AMHPG=0 D HEAD
K AMHQ
W !!?10,"Number of Cases Opened: ",?40,AMHOPEN
W !!?10,"Number of Cases Admitted:",?40,AMHADMIT
W !!?10,"Number of Cases Closed:",?40,AMHCLOSE
W !!?10,"Tally of Dispositions:"
S AMHX="" F S AMHX=$O(AMHDISP(AMHX)) Q:AMHX=""!($D(AMHQ)) D
.I $Y>(IOSL-3) D HEAD Q:$D(AMHQ)
.W !,?15,AMHX,?50,AMHDISP(AMHX)
.Q
DONE D DONE^AMHLEIN,^AMHEKL
Q
HEAD I 'AMHPG G HEAD1
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S AMHQ="" Q
HEAD1 ;
W:$D(IOF) @IOF S AMHPG=AMHPG+1
W !,$P(^VA(200,DUZ,0),U,2),?72,"Page ",AMHPG,!
W ?(80-$L($P(^DIC(4,DUZ(2),0),U))/2),$P(^DIC(4,DUZ(2),0),U),!
W ?20,"TALLY OF CASES OPENED/ADMITTED/CLOSED"
I AMHPROG]"" S X="Program: "_$$EXTSET^XBFUNC(9002011.58,.03,AMHPROG) W !,$$CTR^AMHLEIN(X,80)
I AMHPROV S X=$P(^VA(200,AMHPROV,0),U),Y="Provider: "_X W !?(80-$L(Y)/2),Y
W !!,AMH80D
Q
AMHRC2P ; IHS/CMI/LAB - print active client list (using case open/close) ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 ;
+3 ;
PRINT ;
START ;
+1 SET AMH80D="-------------------------------------------------------------------------------"
+2 SET AMHPG=0
DO HEAD
+3 KILL AMHQ
+4 WRITE !!?10,"Number of Cases Opened: ",?40,AMHOPEN
+5 WRITE !!?10,"Number of Cases Admitted:",?40,AMHADMIT
+6 WRITE !!?10,"Number of Cases Closed:",?40,AMHCLOSE
+7 WRITE !!?10,"Tally of Dispositions:"
+8 SET AMHX=""
FOR
SET AMHX=$ORDER(AMHDISP(AMHX))
IF AMHX=""!($DATA(AMHQ))
QUIT
Begin DoDot:1
+9 IF $Y>(IOSL-3)
DO HEAD
IF $DATA(AMHQ)
QUIT
+10 WRITE !,?15,AMHX,?50,AMHDISP(AMHX)
+11 QUIT
End DoDot:1
DONE DO DONE^AMHLEIN
DO ^AMHEKL
+1 QUIT
HEAD IF 'AMHPG
GOTO HEAD1
+1 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET AMHQ=""
QUIT
HEAD1 ;
+1 IF $DATA(IOF)
WRITE @IOF
SET AMHPG=AMHPG+1
+2 WRITE !,$PIECE(^VA(200,DUZ,0),U,2),?72,"Page ",AMHPG,!
+3 WRITE ?(80-$LENGTH($PIECE(^DIC(4,DUZ(2),0),U))/2),$PIECE(^DIC(4,DUZ(2),0),U),!
+4 WRITE ?20,"TALLY OF CASES OPENED/ADMITTED/CLOSED"
+5 IF AMHPROG]""
SET X="Program: "_$$EXTSET^XBFUNC(9002011.58,.03,AMHPROG)
WRITE !,$$CTR^AMHLEIN(X,80)
+6 IF AMHPROV
SET X=$PIECE(^VA(200,AMHPROV,0),U)
SET Y="Provider: "_X
WRITE !?(80-$LENGTH(Y)/2),Y
+7 WRITE !!,AMH80D
+8 QUIT