source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDWLQSR.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1SDWLQSR ;BPOI/TEH - WAIT LIST STAT REPORT;06/12/02
2 ;;5.3;scheduling;**263,425,448,524**;08/13/93;Build 29
3 ;
4 ;
5 ;
6 ;
7 ;
8EN N ZCODE,ZTDESC,ZTDTH,ZTIO,ZTQUEDED,ZTREQ,ZTRTN,ZTSAVE,ZTSK,POP
9 K ^TMP("SDWLQSR",$J)
10 D HD
111 D INS G END:$D(DUOUT)
122 D DATE G END:$D(DUOUT)
133 D EXCL G END:$D(DUOUT)
14 D QUE G END:$D(DUOUT)
15 Q
16INS ;Get Institution
17 S SDWLERR=0,SDWLPROM="Select Institution ALL // ",SDWLINST=""
18IN 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"
19 G IN2:Y<0 Q:$D(DUOUT)
20 I Y<0 S SDWLINST=$S(Y="ALL":"ALL",Y="":"ALL",Y="all":"ALL",Y="All":"ALL",Y["A":"ALL",Y["a":"ALL")
21 I Y="All"!(Y="")!(Y="all")!(Y="ALL") S SDWLINST="ALL",^TMP("SDWLQSR",$J,"INS")="ALL" G IN3
22 S SDWLINST=SDWLINST_Y_";",SDWLPROM="Another Institution: ",SDWLERR=1 G IN
23IN2 S ^TMP("SDWLQSR",$J,"INS")=SDWLINST
24IN3 Q
25DATE ;Date range selection
26 K X,Y,%DT
27 S SDWLERR=0 W ! S %DT="AE",%DT("A")="Start Date: " D ^%DT
28 I X["^" S DUOUT=1 Q
29 I Y<0 S DUOUT=1 Q
30 S SDWLBDT=Y
31 Q:$D(DUOUT)
32 S %DT("A")="End Date: " D ^%DT G DATE:Y<1 S SDWLEDT=Y K %DT(0),%DT("A")
33 G DATE:$D(DUOUT)
34 I SDWLEDT<SDWLBDT W !,"Beginning Date must be greater than Ending Date." G DATE
35 S ^TMP("SDWLQSR",$J,"DATE")=SDWLBDT_"^"_SDWLEDT K DIR,DIC,DIE,%DT Q
36 Q
37EXCL ;EXCLUDE # REMAINING =0 - PATCH SD*5.3*524
38 S SDWLEXCL=0,^TMP("SDWLQSR",$J,"EXCL")=0
39 S DIR("A",1)="Do you wish to exclude any Teams, Specialities or Specific"
40 S DIR("A")="Clinics where ALL values are zero"
41 S DIR("B")="YES",DIR(0)="Y^A0" D ^DIR
42 I X["^" S DUOUT=1 Q
43 I Y<0 S DUOUT=1 Q
44EXCL1 I Y S SDWLEXCL=1,^TMP("SDWLQSR",$J,"EXCL")=SDWLEXCL
45 K DIR,X,Y,SDWLEXCL
46 Q
47QUE ;Queue Report
48 N ZTQUEUED,POP
49 K %ZIS,IOP,IOC,ZTIO S %ZIS="MQ" D ^%ZIS G:POP QUE1
50 S ZTRTN="EN^SDWLRSR",ZTDTH=$H,ZTDESC="WAIT LIST STAT REPORT"
51 S SDWLTASK="" F S SDWLTASK=$O(^TMP("SDWLQSR",$J,SDWLTASK)) Q:SDWLTASK="" D
52 .S SDWLTK=$G(^TMP("SDWLQSR",$J,SDWLTASK))
53 .S ZTSAVE(SDWLTASK)=SDWLTK
54 I $D(IO("Q")) K IO("Q") D ^%ZTLOAD W !,"REQUEST QUEUED" G QUE2
55QUE1 S:$E(IOST,1,2)="C-" SDWLSPT=1 I $D(ZTRTN) U IO D @ZTRTN K SDWLSPT
56 ;
57 ;
58QUE2 K SDWLTASK,SDWLY,SDWLED,WDWLBD,SDWLOPEN,SDWLDATE,SDWLFORM,SDWLPRI
59 K DIR,DIC,DR,DIE
60 D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
61 Q
62END D EN^SDWLKIL
63 K DUOUT,SDWLBDT,SDWLEDT,SDWLERR,SDWLIST,SDWLPROM,SDWLTK
64 Q
65HD ;
66 W:$D(IOF) @IOF W !,?80-$L("Wait List Stat Report")\2,"Wait List Stat Report",!
67 Q
Note: See TracBrowser for help on using the repository browser.