Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBDFST1

IBDFST1.m

Go to the documentation of this file.
IBDFST1 ;ALB/MAF - FORMS TRACKING STATISTICS - JUL 6 1995
 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
 ;
 ;
EN ; -- set up variables
 N IBPAGE
 S IBPAGE=0
 S IBDFX=$P($$FMTE^XLFDT(IBDFBG),"@")
 S IBDFY=$P($$FMTE^XLFDT(IBDFEND),"@")
 ;
INIT ; -- init variables and list array
 N IBDFDV,IBDFCL,IBDFNODE,IBDCNT,IBDCNT1
 S (IBDFDV,IBDFCL,IBDCNT,IBDCNT1,VALMCNT)=0
 F IBDFDIV=0:0 S IBDFDV=$O(^TMP("CNT",$J,IBDFDV)) Q:IBDFDV']""  F IBDFCLI=0:0 S IBDFCL=$O(^TMP("CNT",$J,IBDFDV,IBDFCL)) Q:IBDFCL']""  S IBDFNODE=^TMP("CNT",$J,IBDFDV,IBDFCL) D:'$D(IBDF(IBDFDV))!($Y+6>IOSL) HDR,HEADER D SETARR
 Q
 ;
 ;
SETARR ;  -- Set up Listman array
 S IBDCNT1=IBDCNT1+1
 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
 S IBDFVAL=$$LOWER^VALM1(IBDFCL)
 W !,$E(IBDFVAL,1,20)
 S IBDFVAL=$J($P(IBDFNODE,"^",1),6)
 W ?22,$E(IBDFVAL,1,6)
 S IBDFVAL=$J($P(IBDFNODE,"^",2),5)
 W ?30,$E(IBDFVAL,1,5)
 S IBDFVAL=$J($S(+$P(IBDFNODE,"^",1)>0:($P(IBDFNODE,"^",2)/$P(IBDFNODE,"^",1))*100,1:0),6) I IBDFVAL>0 S IBDFVAL=$J($P(IBDFVAL,".",1)_"."_$E($P(IBDFVAL,".",2),1,2),6)
 W ?37,$E(IBDFVAL,1,6)
 S IBDFVAL=$J($S($P(IBDFNODE,"^",5)]"":$P(IBDFNODE,"^",5),1:0),5)
 W ?45,$E(IBDFVAL,1,5)
 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
 S IBDFVAL=$J($S(+$P(IBDFNODE,"^",7)>0&(IBDFVAL>0):(+$P(IBDFNODE,"^",5)/IBDFVAL)*100,+$P(IBDFNODE,"^",7)'>0:(+$P(IBDFNODE,"^",5)/$P(IBDFNODE,"^",1))*100,1:0),6) I IBDFVAL>0 S IBDFVAL=$J($P(IBDFVAL,".",1)_"."_$E($P(IBDFVAL,".",2),1,2),6)
 W ?52,$E(IBDFVAL,1,6)
 S IBDFVAL=$J($P(IBDFNODE,"^",3),5)
 W ?60,$E(IBDFVAL,1,5)
 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
 S IBDFVAL=$J($S(+$P(IBDFNODE,"^",7)>0&(IBDFVAL>0):($P(IBDFNODE,"^",3)/IBDFVAL)*100,+$P(IBDFNODE,"^",7)'>0:(+$P(IBDFNODE,"^",3)/$P(IBDFNODE,"^",1))*100,1:0),6) I IBDFVAL>0 S IBDFVAL=$J($P(IBDFVAL,".",1)_"."_$E($P(IBDFVAL,".",2),1,2),6)
 W ?67,$E(IBDFVAL,1,6)
 S IBDFVAL=$J($S($P(IBDFNODE,"^",6)]"":$P(IBDFNODE,"^",6),1:0),5)
 W ?75,$E(IBDFVAL,1,5)
 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
 S IBDFVAL=$J($S(+$P(IBDFNODE,"^",7)>0&(IBDFVAL>0):($P(IBDFNODE,"^",6)/IBDFVAL)*100,+$P(IBDFNODE,"^",7)'>0:($P(IBDFNODE,"^",6)/$P(IBDFNODE,"^",1))*100,1:0),6) I IBDFVAL>0 S IBDFVAL=$J($P(IBDFVAL,".",1)_"."_$E($P(IBDFVAL,".",2),1,2),6)
 W ?82,$E(IBDFVAL,1,6)
 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
 S IBDFVAL=$J($S(+$P(IBDFNODE,"^",7)>0&(IBDFVAL>0):($P(IBDFNODE,"^",4)/IBDFVAL),+$P(IBDFNODE,"^",7)'>0:($P(IBDFNODE,"^",4)/$P(IBDFNODE,"^",1)),1:0),13) I IBDFVAL>0 S IBDFVAL=$J($P(IBDFVAL,".",1)_"."_$E($P(IBDFVAL,".",2),1,2),13)
 W ?90,$E(IBDFVAL,1,13)
 Q
 ;
 ;
 S IBDCNT1=IBDCNT1+1
 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
 S IBDF(IBDFDV)=IBDCNT
 W !,"   "
 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
 S IBDVAL=IBDFDV
 W !,$E(IBDVAL,1,25)
 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
 W !,"   "
 S IBDCNT1=IBDCNT1-1
 Q
 ;
 ;
HDR S IBPAGE=IBPAGE+1 W @IOF,"Statistics Report",?55,IBDFY,?110,"PAGE: ",IBPAGE
 S X="",$P(X,"=",133)="" W !,X
 W !,"Statistical data for the date range of "_IBDFX_" to "_IBDFY,!
 W !,?5,"CLINIC/PATIENT",?22,"TOTAL",?30,"#PRNT",?37,"%PRNTD",?47,"#DE",?55,"%DE",?60,"#SCND",?67,"%SCND",?75,"#PCE",?83,"%PCE",?90,"AVG DAYS SCND"
 S X="",$P(X,"-",133)="" W !,X
 Q
HELP ; -- help code
 S X="?" D DISP^XQORM1 W !!
 Q
 ;
 ;
EXIT ; -- exit code
 K IBDF,IBDFX,IBDFY,^TMP("STATS",$J),^TMP("STAIDX",$J)
 Q
 ;
 ;
EXPND ; -- expand code
 Q
 ;