source: FOIAVistA/trunk/r/AUTOMATED_INFO_COLLECTION_SYS-IBD/IBDFST.m@ 1068

Last change on this file since 1068 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1IBDFST ;ALB/MAF - FORMS TRACKING STATISTICS - JUL 6 1995
2 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
3 ;
4 ;
5EN ; -- main entry point for IBDF FT STATS
6 D EN^VALM("IBDF FT STATS")
7 Q
8 ;
9HDR ; -- header code
10 S IBDFX=$P($$FMTE^XLFDT(IBDFBG),"@")
11 S IBDFY=$P($$FMTE^XLFDT(IBDFEND),"@")
12 S VALMHDR(1)="Statistical data for the date range of "_IBDFX_" to "_IBDFY
13 Q
14 ;
15 ;
16INIT ; -- init variables and list array
17 N IBDFDV,IBDFCL,IBDFNODE,IBDCNT,IBDCNT1
18 S (IBDFDV,IBDFCL,IBDCNT,IBDCNT1,VALMCNT)=0
19 K IBDF,^TMP("STATS",$J),^TMP("STAIDX",$J)
20 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)) HEADER D SETARR
21 Q
22 ;
23 ;
24SETARR ; -- Set up Listman array
25 S IBDCNT1=IBDCNT1+1
26 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
27 S X=""
28 S IBDFVAL=$$LOWER^VALM1(IBDFCL)
29 S X=$$SETSTR^VALM1(IBDFVAL,X,1,20)
30 S IBDFVAL=$J($P(IBDFNODE,"^",1),6)
31 S X=$$SETSTR^VALM1(IBDFVAL,X,22,6)
32 S IBDFVAL=$J($P(IBDFNODE,"^",2),5)
33 S X=$$SETSTR^VALM1(IBDFVAL,X,30,5)
34 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)
35 S X=$$SETSTR^VALM1(IBDFVAL,X,37,6)
36 S IBDFVAL=$J($S($P(IBDFNODE,"^",5)]"":$P(IBDFNODE,"^",5),1:0),5)
37 S X=$$SETSTR^VALM1(IBDFVAL,X,45,5)
38 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
39 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)
40 S X=$$SETSTR^VALM1(IBDFVAL,X,52,6)
41 S IBDFVAL=$J($P(IBDFNODE,"^",3),5)
42 S X=$$SETSTR^VALM1(IBDFVAL,X,60,5)
43 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
44 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)
45 S X=$$SETSTR^VALM1(IBDFVAL,X,67,6)
46 S IBDFVAL=$J($S($P(IBDFNODE,"^",6)]"":$P(IBDFNODE,"^",6),1:0),5)
47 S X=$$SETSTR^VALM1(IBDFVAL,X,75,5)
48 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
49 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)
50 S X=$$SETSTR^VALM1(IBDFVAL,X,82,6)
51 I $P(IBDFNODE,"^",7) S IBDFVAL=$P(IBDFNODE,"^",1)-$P(IBDFNODE,"^",7)
52 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)
53 S X=$$SETSTR^VALM1(IBDFVAL,X,90,13)
54 ;
55 ;
56TMP ; -- Set up TMP Array
57 S ^TMP("STATS",$J,IBDCNT,0)=X,^TMP("STATS",$J,"IDX",VALMCNT,IBDCNT1)=""
58 S ^TMP("STAIDX",$J,IBDCNT1)=VALMCNT
59 Q
60 ;
61 ;
62HEADER ; -- Set up header line for the display
63 S IBDCNT1=IBDCNT1+1
64 S IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
65 S X=""
66 S IBDF(IBDFDV)=IBDCNT
67 S X=$$SETSTR^VALM1(" ",X,1,3) D TMP
68 S X="",IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
69 S IBDVAL=IBDFDV
70 S X=$$SETSTR^VALM1(IBDVAL,X,1,25) D TMP,CNTRL^VALM10(VALMCNT,1,80,IOINHI,IOINORM,0)
71 S X="",IBDCNT=IBDCNT+1,VALMCNT=VALMCNT+1
72 S X=$$SETSTR^VALM1(" ",X,1,3) D TMP
73 S IBDCNT1=IBDCNT1-1
74 Q
75 ;
76 ;
77HELP ; -- help code
78 S X="?" D DISP^XQORM1 W !!
79 Q
80 ;
81 ;
82EXIT ; -- exit code
83 K IBDF,IBDFX,IBDFY,^TMP("STATS",$J),^TMP("STAIDX",$J)
84 Q
85 ;
86 ;
87EXPND ; -- expand code
88 Q
89 ;
Note: See TracBrowser for help on using the repository browser.