source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDWLQOI.m@ 762

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1SDWLQOI ;;IOFO BAY PINES/TEH/WAIT LIST STAT REPORT - ENROLLEE SORT
2 ;;5.3;scheduling;**263,425,448**;AUG 13 1993
3 ;
4 ;
5 ;
6 ;
7 ;
8EN D HD
91 D INS G END:$D(DUOUT)
102 D DATE G END:$D(DUOUT)
11 D QUE G END:$D(DUOUT)
12 Q
13INS ;Get Institution
14 S SDWLERR=0,SDWLPROM="Select Institution ALL // ",SDWLINST=""
15IN W ! S DIC(0)="QEMA",DIC("A")=SDWLPROM,DIC=4,DIC("S")="I $D(^SDWL(409.32,""C"",+Y))!$D(^SDWL(409.31,""E"",+Y))!$D(^SCTM(404.51,""AINST"",+Y))" D ^DIC I Y<0,'SDWLERR Q:$D(DUOUT) S Y="ALL"
16 G IN2:Y<0 Q:$D(DUOUT)
17 I Y<0 S SDWLINST=$S(Y="ALL":"ALL",Y="":"ALL",Y="all":"ALL",Y="All":"ALL",Y["A":"ALL",Y["a":"ALL")
18 I Y="All"!(Y="")!(Y="all")!(Y="ALL") S SDWLINST="ALL",^TMP("SDWLROI",$J,"INS")="ALL" G IN3
19 S SDWLINST=SDWLINST_Y_";",SDWLPROM="Another Institution: ",SDWLERR=1 G IN
20IN2 S ^TMP("SDWLROI",$J,"INS")=SDWLINST
21IN3 Q
22DATE ;Date range selection
23 K X,Y,%DT
24 S SDWLERR=0 W ! S %DT="AE",%DT("A")="Start Date: " D ^%DT
25 I X["^" S DUOUT=1 Q
26 I Y<0 S DUOUT=1 Q
27 S SDWLBDT=Y
28 Q:$D(DUOUT)
29 S %DT("A")="End Date: " D ^%DT G DATE:Y<1 S SDWLEDT=Y K %DT(0),%DT("A")
30 G DATE:$D(DUOUT)
31 I SDWLEDT<SDWLBDT W !,"Beginning Date must be greater than Ending Date." G DATE
32 S ^TMP("SDWLROI",$J,"DATE")=SDWLBDT_"^"_SDWLEDT K DIR,DIC,DIE,%DT Q
33 Q
34QUE ;Queue Report
35 N ZTQUEUED,POP
36 K %ZIS,IOP,IOC,ZTIO S %ZIS="MQ" D ^%ZIS G:POP QUE1
37 S ZTRTN="EN^SDWLROI",ZTDTH=$H,ZTDESC="WAIT LIST ENROLL STAT REPORT"
38 S SDWLTASK="" F S SDWLTASK=$O(^TMP("SDWLROI",$J,SDWLTASK)) Q:SDWLTASK="" D
39 .S SDWLTK=$G(^TMP("SDWLROI",$J,SDWLTASK))
40 .S ZTSAVE(SDWLTASK)=SDWLTK
41 I $D(IO("Q")) K IO("Q") D ^%ZTLOAD W !,"REQUEST QUEUED" G QUE2
42QUE1 S:$E(IOST,1,2)="C-" SDWLIOSR=1 I $D(ZTRTN) U IO D @ZTRTN K SDWLIOSR
43 ;
44 ;
45QUE2 K SDWLTASK,SDWLY,SDWLED,SDWLBD,SDWLOPEN,SDWLDATE,SDWLFORM,SDWLPRI
46 K DIR,DIC,DR,DIE
47 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
48 Q
49END D EN^SDWLKIL K SDWLIOSR Q
50HD ;
51 W:$D(IOF) @IOF W !,?80-$L("Wait List Enrollment Status Report")\2,"Wait List Enrollment Status Report",!
Note: See TracBrowser for help on using the repository browser.