source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SDAMOS0.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 1.6 KB
Line 
1SDAMOS0 ;ALB/SCK - AM MGT REPORTS STATISTICS BUILD GLOBAL ;5/25/93
2 ;;5.3;Scheduling;;Aug 13, 1993
3 ;
4STOPC ; build global of action counts from division/stopcode in TMP
5 N I,SDFIN
6 S SDT=SDBEG F S SDT=$O(^SCE("B",SDT)) Q:'SDT!(SDT>SDEND) D
7 . S SDOE=0 F S SDOE=$O(^SCE("B",SDT,SDOE)) Q:'SDOE D
8 .. I '$D(^SCE(SDOE,0)) Q
9 .. S SDOEO=$G(^SCE(SDOE,0))
10 .. I '$$OKDIV(+$P($G(SDOEO),U,11))!('$$STCHK(+$P($G(SDOEO),U,3))) Q
11 .. S SDDIV=$P($G(^DG(40.8,+$P($G(SDOEO),U,11),0)),U)
12 .. S SDCODE=$P($G(^DIC(40.7,+$P(SDOEO,U,3),0)),U)
13 .. I $P($G(SDOEO),U,12)>0 S ^TMP("SDAMS",$J,SDDIV,SDCODE,+$P(SDOEO,U,12))=$G(^TMP("SDAMS",$J,SDDIV,SDCODE,+$P(SDOEO,U,12)))+1
14 K SDT,SDOE,SDOEO,SDDIV,SDCODE
15 Q
16 ;
17OKDIV(SDDV) ; check for division in list of valid divisions (vautd)
18 N Y S Y=0
19 I VAUTD S Y=1 G OKDIVQ
20 I $D(VAUTD(SDDV)) S Y=1
21OKDIVQ Q (+Y)
22 ;
23STCHK(SDSTC) ; check for stopcode in list of valid stopcodes (vautc)
24 N Y S Y=0
25 I VAUTC S Y=1 G STCHKQ
26 I $D(VAUTC(SDSTC)) S Y=1
27STCHKQ Q (+Y)
28 ;
29DISP() ; -- display selection choices
30 N C,D
31 D HOME^%ZIS W @IOF,*13
32 W $$LINE^SDAMO("Report Specifications")
33 W !!," Encounter Dates: ",$$FDATE^VALM1(SDBEG)," to ",$$FDATE^VALM1(SDEND)
34 W !," Report Format: ",$S(FMT=1:"Appointment Clinics",1:"Stop Codes")
35 W !!?15,"Divisions",?55,$S(FMT=1:"Clinics",1:"Stop Codes")
36 W !?15,"---------",?55,"----------"
37 S (D,C)=0
38 I VAUTD!VAUTC S D=$S(VAUTD:"All",1:$O(VAUTD(0))),C=$S(VAUTC:"All",1:$O(VAUTC(0))) W !?15,$S(D:VAUTD(D),1:D),?55,$S(C:VAUTC(C),1:C)
39 S D=+D,C=+C
40 F I=1:1 S:D'="" D=$O(VAUTD(D)) S:C'="" C=$O(VAUTC(C)) Q:'D&('C) W ! W:D ?15,VAUTD(D) W:C ?55,VAUTC(C) I I>9 S I=0 D PAUSE^VALM1 I 'Y G DISPQ
41 W !,$$LINE^SDAMO("")
42 S Y=1
43DISPQ Q Y
Note: See TracBrowser for help on using the repository browser.