source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SDAMO.m@ 771

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1SDAMO ;ALB/MJK - AM Mgt Reports ; 12/1/91
2 ;;5.3;Scheduling;**132**;Aug 13, 1993
3 ;
4EN ; main entry point
5 N DIC,SDBEG,SDEND,SDSEL,VAUTD,VAUTC,SDSORT,SDAMLIST
6EN1 I '$$INIT G ENQ
7 I '$$RANGE G ENQ
8 I '$$SELECT G ENQ
9 S SDSEL=SDSEL+4 ; for backwards compatibility
10 G STATS^SDAMOS
11ENQ Q
12 ;
13INIT() ; -- init vars
14 Q 1
15 ;
16RANGE() ; select date range
17 ; input: none
18 ; output: SDBEG := begin date
19 ; SDEND := end date
20 ; return: was selection made [ 1|yes 0|no]
21 ;
22 W !!,$$LINE("Date Range Selection")
23 Q $$RANGE^SDAMQ(.SDBEG,.SDEND)
24 ;
25SELECT() ; -- get selection criteria
26 ; input: none
27 ; output: SDSEL := criteria selected
28 ; return: was selection made [ 1|yes 0|no]
29 ;
30 W !!,$$LINE("Statisitcs Criteria")
31 S X="S^"
32 S X=X_"1:Statistics;"
33 S X=X_"2:Division(s) Only Statistics"
34 S DIR(0)=X,DIR("A")="Which Visits",DIR("B")="Statistics"
35 D ^DIR K DIR S SDSEL=$S($D(DIRUT):0,1:+Y)
36 Q SDSEL>0
37 ;
38DIV() ; -- get division data
39 ; input: none
40 ; output: VAUTD := divs selected (VAUTD=1 for all)
41 ; return: was selection made [ 1|yes 0|no]
42 ;
43 W:$P($G(^DG(43,1,"GL")),U,2) !!,$$LINE("Division Selection")
44 D ASK2^SDDIV I Y<0 K VAUTD
45 Q $D(VAUTD)>0
46 ;
47CLINIC() ; -- get clinic data
48 ; input: VAUTD := divisions selected
49 ; output: VAUTC := clinic selected (VAUTC=1 for all)
50 ; return: was selection made [ 1|yes 0|no]
51 ;
52 W !!,$$LINE("Clinic Selection")
53 D CLINIC^SDAMO0
54 I Y<0 K VAUTC
55CLINICQ Q $D(VAUTC)>0
56 ;
57STOP() ; -- get stop code data
58 ; output: VAUTC := stop codes selected (VAUTC=1 for all)
59 ; return: was selection made [ 1|yes 0|no]
60 ;
61 W !!,$$LINE("Stop Codes Selection")
62 S DIC="^DIC(40.7,",VAUTSTR="stop code",VAUTVB="VAUTC",VAUTNI=2
63 D FIRST^VAUTOMA
64 I Y<0 K VAUTC
65STOPQ Q $D(VAUTC)>0
66 ;
67 ;
68LINE(STR) ; -- print line
69 ; input: STR := text to insert
70 ; output: none
71 ; return: text to use
72 ;
73 N X
74 S:STR]"" STR=" "_STR_" "
75 S $P(X,"_",(IOM/2)-($L(STR)/2))=""
76 Q X_STR_X
77 ;
Note: See TracBrowser for help on using the repository browser.