source: FOIAVistA/trunk/r/GENERIC_CODE_SHEET-GEC/GECSSITE.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1GECSSITE ;WISC/RFJ/KLD-get site, fy, person data ;01 Nov 93
2 ;;2.0;GCS;**6,15,27**;MAR 14, 1995
3 ;
4 N %,%Y,DIC,DONTASK,I,X,Y
5 I $G(GECS("SITENOASK")) S DONTASK=GECS("SITENOASK")
6 K GECS
7 ;
8 D GETUSER I '$D(GECS("PER")) Q
9 ;
10 ; find site
11 I '$O(^GECS(2101.7,0)) W !,"NO SITE PARAMETERS HAVE BEEN ENTERED IN FILE 2101.7," K GECS Q
12 I $P($G(^GECS(2101.7,0)),"^",4)'>1 D GETSITE(+$O(^GECS(2101.7,0))) Q
13 ;
14 ; if gecs("sitenoask") is defined (set in dontask), get param for site
15 I $G(DONTASK) D Q
16 . S %=+$O(^DIC(4,"D",+DONTASK,0)) I $D(^GECS(2101.7,%,0)) D GETSITE(%) Q
17 . W !,"SITE ",DONTASK," NOT FOUND IN FILE 2101.7." K GECS
18 ;
19 S %=$P($G(^DIC(4,+$G(^GECS(2101.7,"PRIMARY")),0)),"^")
20 I %'="" S DIC("B")=%
21 S DIC("A")="Select STATION NUMBER"_$S($D(DIC("B")):" (^ TO EXIT)",1:"")_": ",DIC="^GECS(2101.7,",DIC(0)="AEQMN" W ! D ^DIC I Y'>0 Q
22 D GETSITE(+Y)
23 Q
24 ;
25 ;
26GETSITE(GECSSITE) ; get site parameters for gecssite
27 N %,STATNAME,SUBSITE,SITE99
28 ; get user if not defined
29 I '$D(GECS("PER")) D GETUSER I '$D(GECS("PER")) K GECS Q
30 ;
31 S %=$G(^GECS(2101.7,+GECSSITE,0)) I %="" D
32 . W !!,"Site Missing From GENERIC CODE SHEET FILE 2101.7"
33 . W !,$$REPEAT^XLFSTR("*",57)
34 . W !,"Site ",GECS("SITE"),GECS("SITE1")," does not exist in File #2101.7. Please contact"
35 . W !,"your Information Resource Management(IRM) Personnel and"
36 . W !,"inform them that Site ",GECS("SITE"),GECS("SITE1")," must"
37 . W " be inserted into File"
38 . W !,"#2101.7 in order for you to continue with this option."
39 . W !,$$REPEAT^XLFSTR("*",57)
40 I %="" S SITEM=1 Q
41 I '+GECSSITE D
42 . I GECS("SITE") D
43 . . S SUBSITE=$O(^DIC(4,"D",GECS("SITE")_GECS("SITE1"),""))
44 . . I 'SUBSITE D
45 . . . W !!,"Site Missing From INSTITUTION FILE #4"
46 . . . W !,$$REPEAT^XLFSTR("*",51)
47 . . . W !,"Site ",GECS("SITE"),GECS("SITE1")," does not exit"
48 . . . W " in the INSTITUTION FILE #4"
49 . . . W !,"Please contact your Information Resource Management"
50 . . . W !,"(IRM) Personnel and inform them that Site "
51 . . . W GECS("SITE"),GECS("SITE1")," must"
52 . . . W !,"be inserted into File #4."
53 . . . W !,$$REPEAT^XLFSTR("*",51)
54 S STATNAME=$$GET1^DIQ(4,+GECSSITE,.01)
55 I STATNAME="" D
56 . S SITE99=$$GET1^DIQ(4,+GECSSITE,99) Q:'+SITE99
57 . W !!,"STATION NAME missing from INSTITUTION FILE #4"
58 . W !,$$REPEAT^XLFSTR("*",60)
59 . W !,"Site ",$$GET1^DIQ(4,+GECSSITE,99)," STATION NAME is not entered in Field #.01 of the"
60 . W !,"INSTITUTION FILE #4. Please inform your Information Resource"
61 . W !,"Management(IRM) Personnel."
62 . W !,$$REPEAT^XLFSTR("*",60)
63 I STATNAME="",+SITE99 Q
64 S %=$$GET1^DIQ(4,+GECSSITE,99) I %="" D
65 . W !!,"STATION NUMBER missing from INSTITUTION FILE #4"
66 . W !,$$REPEAT^XLFSTR("*",62)
67 . W !,"INTERNAL ENTRY NUMBER(IEN) "_GECSSITE_" does not have "
68 . W "a STATION NUMBER"
69 . W !,"entered in field #99 of the INSTITUTION FILE #4. Please "
70 . W "inform"
71 . W !,"your Information Resource Management(IRM) Personnel."
72 . W !,$$REPEAT^XLFSTR("*",62)
73 Q:%=""
74 S GECS("SITE")=$E(%,1,3),GECS("SITE1")=$E(%,4,6)
75 I '$G(GECSFNOP) W !,"Station: ",STATNAME," (#",%,")"
76 Q
77 ;
78 ;
79GETUSER ; find user
80 N %,%H,%I,X,Y
81 S GECS("PER")=+$G(DUZ)_"^"_$P($G(^VA(200,+$G(DUZ),0)),"^")
82 I $P(GECS("PER"),"^",2)="" W !,"YOU ARE NOT AN AUTHORIZED USER. CONTACT IRM SERVICE" K GECS Q
83 D NOW^%DTC S Y=X X ^DD("DD") D
84 . S GECS("FY")=$S($E(X,4,5)<10:$P(Y,",",2),1:$P(Y,",",2)+1)
85 Q
Note: See TracBrowser for help on using the repository browser.