source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SDAMOC0.m@ 1328

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

initial load of FOIAVistA 6/30/08 version

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