source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDWLRSR.m@ 1078

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

revised back to 6/30/08 version

File size: 6.0 KB
RevLine 
[623]1SDWLRSR ;;IOFO BAY PINES/TEH/WAIT LIST STAT REPORT ; 01 Oct 2002 4:42 PM ; Compiled December 21, 2006 15:32:50
2 ;;5.3;scheduling;**263,273,399,412,425,415,446**;AUG 13 1993;Build 77
3 ;
4 ; Removed Sort logic as routine exceeded SACC maximum size of 10000
5 ; New routine SDWLRSRS was created to perform the Sort functionality
6 ;
7 ;
8EN ;
9 D INIT G END:$D(DUOUT) ;SD*5.3*415
10 D SORT^SDWLRSRS(SDWLBD,SDWLED,SDWLINS,.SDWL) ; SD*5.3*415 new routine to perform sort
11 D:'$$S^%ZTLOAD PRT ;SD*5.3*415
12 G END
13INIT ;
14 I $D(CT) S SDWLCT2=CT
15 I $D(DATE) S SDWLDATE=DATE
16 I $D(INS) S SDWLINS=INS
17 I $D(ZTSAVE) D
18 .S SDWLCT=$G(ZTSAVE("CT")),SDWLDATE=$G(ZTSAVE("DATE")),SDWLINS=$G(ZTSAVE("INS"))
19 I SDWLINS'="ALL" F I=1:1 S SDWL=$P(SDWLINS,";",I) Q:SDWL="" S SDWL("INS",+SDWL)=""
20 S SDWLBD=$P(SDWLDATE,U,1),SDWLED=$P(SDWLDATE,U,2),SDWLPG=0
21 D NOW^%DTC S Y=% D DD^%DT S SDWLDTP=Y
22 N POP S POP=0 ;SD*5.3*412
23 Q
24PRT ;PRINT REPORT
25 S (T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13)=0 ;SD*5.3*446
26 S (TT1,TT2,TT3,TT4,TT5,TT6,TT7,TT8,TT9,TT10,TT11,TT12,TT13,SDWLPG)=0 D HD,HD1 ;SD*5.3*415,446
27 I '$D(^TMP("SDWLRSR1")) W !!,"No Wait List Data to Report" Q
28 S SDWLINS="" F S SDWLINS=$O(^TMP("SDWLRSR1",$J,SDWLINS)) Q:SDWLINS="" D Q:POP D T2 Q:POP W !,"________________" I $Y>(IOSL-8) D:$D(SDWLSPT) SCR Q:POP D HD,HD1 ;SD*5.3*412 added Quit for early exit; 446
29 .I $$S^%ZTLOAD S DUOUT="" Q
30 .W !!,"INSTITUTION: ",SDWLINS,!
31 .S SDWLTY="" F S SDWLTY=$O(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY)) Q:SDWLTY="" D Q:POP ;SD*5.3*412 added Quit for early exit
32 ..S SDWLTNM=$$EXTERNAL^DILFD(409.3,4,,SDWLTY) W !,$E(SDWLTNM,1,15)
33 ..S SDWLSCN="" F S SDWLSCN=$O(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN)) Q:SDWLSCN="" D Q:POP ;SD*5.3*412 added Quit for early exit
34 ...S SDWLSCNM="" F S SDWLSCNM=$O(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM)) Q:SDWLSCNM="" D Q:POP D T1 Q:POP ;SD*5.3*412 added Quit
35 ....S SDWLPRI="" F S SDWLPRI=$O(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI)) Q:SDWLPRI="" D Q:POP ;SD*5.3*412 added Quit
36 .....N SDWLCLO ; SD*5.3*446
37 .....W !,?2,$E(SDWLSCNM,1,10)," ",$S(SDWLPRI="A":"ASAP",SDWLPRI="F":"FUTURE",1:"")
38 .....S SDWLPR=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"PR")) W ?20,SDWLPR
39 .....S SDWLCLO=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"CL")) W ?27,SDWLCLO ;SD*5.3*446
40 .....S SDWLD=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLD")) W ?34,SDWLD ;SD*5.3*415,446
41 .....S SDWLNC=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLNC")) W ?41,SDWLNC ;SD*5.3*415,446
42 .....S SDWLSA=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLSA")) W ?48,SDWLSA ;SD*5.3*415,446
43 .....S SDWLCC=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLCC")) W ?55,SDWLCC ;SD*5.3*415,446
44 .....S SDWLNN=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLNN")) W ?62,SDWLNN ;SD*5.3*415,446
45 .....S SDWLER=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLER")) W ?69,SDWLER ;SD*5.3*415,446
46 .....S SDWLCL=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLCL")) W ?76,SDWLCL ;SD*5.3*415,446
47 .....S SDWLTR=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"SDWLTR")) W ?83,SDWLTR ;SD*5.3*415,446
48 .....S SDWLAD=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"AD")) W ?90,SDWLAD ;SD*5.3*415,446
49 .....S SDWLRR=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"RR")) W ?97,SDWLRR ;SD*5.3*415,446
50 .....S SDWLNR=+$G(^TMP("SDWLRSR1",$J,SDWLINS,SDWLTY,SDWLSCN,SDWLSCNM,SDWLPRI,"NR")) W ?104,SDWLNR ;SD*5.3*446
51 .....S T1=T1+SDWLPR,TT1=TT1+SDWLPR
52 .....S T2=T2+SDWLCLO,TT2=TT2+SDWLCLO ;SD*5.3*446
53 .....S T3=T3+SDWLD,TT3=TT3+SDWLD
54 .....S T4=T4+SDWLNC,TT4=TT4+SDWLNC
55 .....S T5=T5+SDWLSA,TT5=TT5+SDWLSA
56 .....S T6=T6+SDWLCC,TT6=TT6+SDWLCC
57 .....S T7=T7+SDWLNN,TT7=TT7+SDWLNN
58 .....S T8=T8+SDWLER,TT8=TT8+SDWLER
59 .....S T9=T9+SDWLCL,TT9=TT9+SDWLCL ;SD*5.3*446
60 .....S T10=T10+SDWLTR,TT10=TT10+SDWLTR ;SD*5.3*446
61 .....S T11=T11+SDWLAD,TT11=TT11+SDWLAD ;SD*5.3*446
62 .....S T12=T12+SDWLRR,TT12=TT12+SDWLRR ;SD*5.3*446
63 .....S T13=T13+SDWLNR,TT13=TT13+SDWLNR ;SD*5.3*446
64 .....I $Y>(IOSL-8) D:$D(SDWLSPT) SCR Q:POP D HD,HD1 ;SD*5.3*412,446
65 Q
66SCR S DIR(0)="E" D ^DIR S:X="^" POP=1 ;SD*5.3*412
67 Q
68T1 ;
69 ;write sub-totals
70 W !?20,"------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------ ------" ;SD*5.3*446
71 W !,"Sub-Totals:",?20,T1,?27,T2,?34,T3,?41,T4,?48,T5,?55,T6,?62,T7,?69,T8,?76,T9,?83,T10,?90,T11,?97,T12,?104,T13 ;SD*5.3*446
72 S (T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13)=0 ;SD*5.3*415,446
73 I $Y>(IOSL-8) D:$D(SDWLSPT) SCR Q:POP D HD,HD1 ;SD*5.3*412,446
74 Q
75T2 W !,"Institution Totals:"
76 W ?20,TT1,?27,TT2,?34,TT3,?41,TT4,?48,TT5,?55,TT6,?62,TT7,?69,TT8,?76,TT9,?83,TT10,?90,TT11,?97,TT12,?104,TT13,! ;SD*5.3*446
77 S (TT1,TT2,TT3,TT4,TT5,TT6,TT7,TT8,TT9,TT10,TT11,TT12,TT13)=0 ;SD*5.3*415,446
78 I $Y>(IOSL-8) D:$D(SDWLSPT) SCR Q:POP D HD,HD1 ;SD*5.3*412,446
79 Q
80HD W:$D(IOF) @IOF S SDWLPG=SDWLPG+1 W !!,SDWLDTP,?80-$L("Wait List (Sch/PCMM) Stat Report")\2,"Wait List (Sch/PCMM) Stat Report",?65,"Page: ",SDWLPG
81 W !,?80-$L("STARTED Date: ")\2,"STARTED Date: " S Y=$P(SDWLDATE,U,1) D DD^%DT W Y
82 W !,?80-$L("FINISHED Date: ")\2,"FINISHED Date: " S Y=$P(SDWLDATE,U,2) D DD^%DT W Y
83 Q
84HD1 ;
85 W !,?20,"PREV",?90,"#",?97,"#",?104,"# NOT" ;SD*5.3*415,446
86 W !,"WAIT LIST TYPE",?20,"REMN",?27,"CLSD",?34,"DTH",?41,"NC",?48,"SA",?55,"CC",?62,"NN",?69,"ER",?76,"CL",?83,"TR",?90,"ADD",?97,"REMN",?104,"REMVD" ;SD*5.3*446
87 Q
88END D EN^SDWLKIL
89 K ^TMP("SDWLRSR1",$J),^TMP("SDWLRSR2",$J),SDWLY1,SDWLX1,SDWLRDT,CT,I
90 K T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,SDWLAD,SDWLBD,SDWLCC,SDWLCT,SDWLDFDT,SDWLDP,SDWLED,SDWLER,SDWLERR,SDWLFLD,X1,X2,DATE ;SD*5.3*415,446
91 K TT1,TT2,TT3,TT4,TT5,TT6,TT7,TT8,TT9,TT10,TT11,TT12,TT13,SDWLINSN,SDWLINST,SDWLNC,SDWLNN,SDWLNR,SDWLOFDT,SDWLOK1,SDWLOK2,SDWLTYPN ;SD*5.3*415,446
92 K SDWLOK3,SDWLPR,SDWLPR,SDWLPROM,SDWLRE,SDWLRFDT,SDWLRR,SDWLSA,SDWLSCN,SDWLSCNM,SDWLTASK,SDWLTK,SDWLTNM,SDWLTYNM,SDWLTYP,X4,SDWLTR,SDWLCL ;SD*5.3*415,446
93 Q
Note: See TracBrowser for help on using the repository browser.