source: FOIAVistA/tag/r/NOIS-FSC/FSCRPCGM.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1FSCRPCGM ;SLC/STAFF-NOIS RPC Module Info ;1/11/98 15:24
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4MOD(MOD) ; from FSCRPCG
5 N DEVOFF,GROUP,MODNAME,NAMECONV,NAMESP,PACK,PACKAGE,TYPE,ZERO
6 S ZERO=$G(^FSC("MOD",+$G(MOD),0)) I '$L(ZERO) Q
7 S MODNAME=$P(ZERO,U)
8 S NAMESP=$P(ZERO,U,4)
9 S NAMECONV=$P(ZERO,U,7)
10 S TYPE=$$VALUE^FSCGET($P(ZERO,U,3),7105.4,2)
11 S DEVOFF=$$VALUE^FSCGET($P(ZERO,U,5),7105.4,4)
12 S PACK=$P(ZERO,U,8)
13 S PACKAGE=$$VALUE^FSCGET(PACK,7105.4,7)
14 S GROUP=$$VALUE^FSCGET($P($G(^FSC("PACK",PACK,0)),U,2),7105.5,2)
15 S ^TMP("FSCRPC",$J,"OUTPUT",1)=MODNAME_" "_TYPE
16 S ^TMP("FSCRPC",$J,"OUTPUT",2)="Namespace: "_NAMESP
17 S ^TMP("FSCRPC",$J,"OUTPUT",3)="Naming Convention: "_NAMECONV
18 S ^TMP("FSCRPC",$J,"OUTPUT",4)="Office: "_DEVOFF
19 S ^TMP("FSCRPC",$J,"OUTPUT",5)="Package: "_PACKAGE
20 S ^TMP("FSCRPC",$J,"OUTPUT",6)="Package Group: "_GROUP
21 Q
22 ;
23SPEC(MOD) ; from FSCRPCG
24 N CNT,NUM,PACK,PACKNAME,USER,USERS K USERS
25 S PACK=+$P($G(^FSC("MOD",+$G(MOD),0)),U,8) I 'PACK Q
26 S PACKNAME=$P(^FSC("PACK",PACK,0),U)
27 S CNT=0
28 S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="Those affiliated with "_PACKNAME_":"
29 D AFFIL(PACK,.USERS)
30 S USER="" F S USER=$O(USERS(USER)) Q:USER="" D
31 .S NUM=0 F S NUM=$O(USERS(USER,NUM)) Q:NUM<1 D
32 ..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=USER_" "_USERS(USER,NUM)
33 K USERS
34 Q
35 ;
36ADPAC(MOD) ; from FSCRPCG
37 N ADPAC,CNT,PACK,PACKNAME,SITE,SITENAME,STSITE
38 S PACK=+$P($G(^FSC("MOD",+$G(MOD),0)),U,8) I 'PACK Q
39 S PACKNAME=$P(^FSC("PACK",PACK,0),U)
40 S CNT=1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="ADPACs:"
41 S SITENAME="" F S SITENAME=$O(^FSC("SITE","B",SITENAME)) Q:SITENAME="" D
42 .S SITE=0 F S SITE=$O(^FSC("SITE","B",SITENAME,SITE)) Q:SITE<1 D
43 ..S STSITE=$$STSITE^FSCRPCGN(SITE)
44 ..I 'STSITE Q
45 ..S ADPAC=$$APINFO^FSCRPCGN(STSITE,PACK)
46 ..I $L(ADPAC) S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" "_SITENAME_" "_ADPAC
47 Q
48 ;
49AFFIL(PACK,USERS) ;
50 N DUTIES,FUNC,PACKGP,USER,USERNAME K USERS
51 S PACKGP=+$P(^FSC("PACK",PACK,0),U,2)
52 S USER=0 F S USER=$O(^FSC("SPEC","AG",PACKGP,USER)) Q:USER<.1 D
53 .I $P($G(^FSC("SPEC",USER,0)),U,2) Q
54 .S USERNAME=$P(^VA(200,USER,0),U)
55 .I $P($G(^FSC("SPEC",USER,20,+$O(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,3) D
56 ..S DUTIES=$P($G(^FSC("SPEC",USER,20,+$O(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,2)
57 ..S FUNC=$$VALUE^FSCGET($P(^FSC("SPEC",USER,0),U,4),7105.2,4) I $L(FUNC) S FUNC="("_FUNC_")"
58 ..S USERS(USERNAME,USER)=FUNC_" "_DUTIES_" "_$$PH^FSCRPCGN(USER)
59 S USER=0 F S USER=$O(^FSC("SPEC","AP",PACK,USER)) Q:USER<.1 D
60 .S USERNAME=$P(^VA(200,USER,0),U)
61 .S DUTIES=$P($G(^FSC("SPEC",USER,30,+$O(^FSC("SPEC","AP",PACK,USER,0)),0)),U,2)
62 .S FUNC=$$VALUE^FSCGET($P(^FSC("SPEC",USER,0),U,4),7105.2,4) I $L(FUNC) S FUNC="("_FUNC_")"
63 .S USERS(USERNAME,USER)=FUNC_" "_DUTIES_" "_$$PH^FSCRPCGN(USER)
64 Q
65 ;
Note: See TracBrowser for help on using the repository browser.