source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SCRPIUT1.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.9 KB
Line 
1SCRPIUT1 ; ALB/SCK - Incomplete Encounter Mgmt Report Utilities ; 20 Nov 98 12:36 AM
2 ;;5.3;Scheduling;**66,147,154**;AUG 13, 1993
3 ;
4 Q
5DIV() ; Returns either list of selected divisions for multi-divisional site, or primary
6 ; division for single division site.
7 ;
8 N Y
9 I $P($G(^DG(43,1,"GL")),U,2) D
10 . W !
11 . D DIVISION^VAUTOMA
12 E D
13 . S VAUTD=0
14 . S Y=$$PRIM^VASITE
15 . S VAUTD(Y)=$P($G(^DG(40.8,Y,0)),U)
16 ;
17 Q Y
18 ;
19CLN() ; Select One/Many/All Clinics for selected Division
20 N Y
21 S VAUTNI=2
22 W !
23 D CLINIC^VAUTOMA
24 Q Y
25 ;
26CTR(X,SDLW) ; Center string x in display line
27 N SDL
28 I '$G(SDLW) S SDLW=80
29 S SDL=(SDLW-$L(X))/2
30 S X=$$SPACE(SDL)_X
31 Q
32 ;
33SPACE(SCWDTH) ; Build string of 'SCWDTH' spaces
34 ; Variable Input
35 ; SCWDTH - returns with formatted string
36 ;
37 ; Return
38 ; TAB - "spaces" to tab over
39 ;
40 N TAB S TAB=""
41 S $P(TAB," ",SCWDTH)=""
42 Q TAB
43 ;
44PARSE(ER,ER1,ER2,PB,PE) ; Parse error description into two lines for report
45 N SCX
46 F SCX=PB:1:PE I $E(ER,SCX)=" " D Q
47 . S ER1=$E(ER,1,SCX),ER2=$E(ER,SCX+1,$L(ER))
48 ;
49 S ER1=$E(ER,1,PE),ER2=$E(ER,PE+1,$L(ER))
50 Q
51 ;
52ERRLST ;
53 N SDIV,SDERR,DIR,DIRUT,DTOUT,DUOUT
54 I $P($G(^DG(43,1,"GL")),U,2) D Q:Y<0
55 . S DIR(0)="YA",DIR("B")="YES",DIR("A")="Select All Divisions? "
56 . D ^DIR K DIR Q:$D(DIRUT)
57 . I Y S SDIV="" Q
58 . S DIC=40.8,DIC(0)="AEQMZ"
59 . S DIC("A")="Enter Division for Errors: "
60 . S DIC("B")=$P($G(^DG(40.8,$$PRIM^VASITE($$NOW^XLFDT),0)),U)
61 . D ^DIC K DIC I +Y>0 S SDIV=+Y
62 E D
63 . S SDIV=""
64 ;
65 Q:$D(DIRUT)
66 ;
67 S DIR(0)="YA",DIR("B")="YES",DIR("A")="Select all Errors? "
68 D ^DIR K DIR Q:$D(DIRUT)
69 ;
70 I Y S SDERR=""
71 E D Q:$D(DTOUT)!($D(DUOUT))!(Y'>0)
72 . S DIC=409.76,DIC(0)="AEQMZ",DIC("A")="Select Error Code: "
73 . D ^DIC K DIC Q:$D(DTOUT)!($D(DUOUT))!(Y'>0)
74 . S SDERR=Y(0,0)
75 ;
76 S L=0
77 S DIC=409.75
78 S FLDS="[SCENI ERROR LIST]"
79 S BY="[SCENI ERROR SORT]"
80 S FR=SDIV_",,"_SDERR_","
81 S TO=SDIV_",,"_SDERR_","
82 S DISUPNO=0
83 D EN1^DIP
84 Q
Note: See TracBrowser for help on using the repository browser.