Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCRPCGM

FSCRPCGM.m

Go to the documentation of this file.
FSCRPCGM ;SLC/STAFF-NOIS RPC Module Info ;1/11/98  15:24
 ;;1.1;NOIS;;Sep 06, 1998
 ;
MOD(MOD) ; from FSCRPCG
 N DEVOFF,GROUP,MODNAME,NAMECONV,NAMESP,PACK,PACKAGE,TYPE,ZERO
 S ZERO=$G(^FSC("MOD",+$G(MOD),0)) I '$L(ZERO) Q
 S MODNAME=$P(ZERO,U)
 S NAMESP=$P(ZERO,U,4)
 S NAMECONV=$P(ZERO,U,7)
 S TYPE=$$VALUE^FSCGET($P(ZERO,U,3),7105.4,2)
 S DEVOFF=$$VALUE^FSCGET($P(ZERO,U,5),7105.4,4)
 S PACK=$P(ZERO,U,8)
 S PACKAGE=$$VALUE^FSCGET(PACK,7105.4,7)
 S GROUP=$$VALUE^FSCGET($P($G(^FSC("PACK",PACK,0)),U,2),7105.5,2)
 S ^TMP("FSCRPC",$J,"OUTPUT",1)=MODNAME_"  "_TYPE
 S ^TMP("FSCRPC",$J,"OUTPUT",2)="Namespace: "_NAMESP
 S ^TMP("FSCRPC",$J,"OUTPUT",3)="Naming Convention: "_NAMECONV
 S ^TMP("FSCRPC",$J,"OUTPUT",4)="Office: "_DEVOFF
 S ^TMP("FSCRPC",$J,"OUTPUT",5)="Package: "_PACKAGE
 S ^TMP("FSCRPC",$J,"OUTPUT",6)="Package Group: "_GROUP
 Q
 ;
SPEC(MOD) ; from FSCRPCG
 N CNT,NUM,PACK,PACKNAME,USER,USERS K USERS
 S PACK=+$P($G(^FSC("MOD",+$G(MOD),0)),U,8) I 'PACK Q
 S PACKNAME=$P(^FSC("PACK",PACK,0),U)
 S CNT=0
 S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="Those affiliated with "_PACKNAME_":"
 D AFFIL(PACK,.USERS)
 S USER="" F  S USER=$O(USERS(USER)) Q:USER=""  D
 .S NUM=0 F  S NUM=$O(USERS(USER,NUM)) Q:NUM<1  D
 ..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=USER_"  "_USERS(USER,NUM)
 K USERS
 Q
 ;
ADPAC(MOD) ; from FSCRPCG
 N ADPAC,CNT,PACK,PACKNAME,SITE,SITENAME,STSITE
 S PACK=+$P($G(^FSC("MOD",+$G(MOD),0)),U,8) I 'PACK Q
 S PACKNAME=$P(^FSC("PACK",PACK,0),U)
 S CNT=1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="ADPACs:"
 S SITENAME="" F  S SITENAME=$O(^FSC("SITE","B",SITENAME)) Q:SITENAME=""  D
 .S SITE=0 F  S SITE=$O(^FSC("SITE","B",SITENAME,SITE)) Q:SITE<1  D
 ..S STSITE=$$STSITE^FSCRPCGN(SITE)
 ..I 'STSITE Q
 ..S ADPAC=$$APINFO^FSCRPCGN(STSITE,PACK)
 ..I $L(ADPAC) S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="  "_SITENAME_"   "_ADPAC
 Q
 ;
AFFIL(PACK,USERS) ;
 N DUTIES,FUNC,PACKGP,USER,USERNAME K USERS
 S PACKGP=+$P(^FSC("PACK",PACK,0),U,2)
 S USER=0 F  S USER=$O(^FSC("SPEC","AG",PACKGP,USER)) Q:USER<.1  D
 .I $P($G(^FSC("SPEC",USER,0)),U,2) Q
 .S USERNAME=$P(^VA(200,USER,0),U)
 .I $P($G(^FSC("SPEC",USER,20,+$O(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,3) D
 ..S DUTIES=$P($G(^FSC("SPEC",USER,20,+$O(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,2)
 ..S FUNC=$$VALUE^FSCGET($P(^FSC("SPEC",USER,0),U,4),7105.2,4) I $L(FUNC) S FUNC="("_FUNC_")"
 ..S USERS(USERNAME,USER)=FUNC_"    "_DUTIES_"    "_$$PH^FSCRPCGN(USER)
 S USER=0 F  S USER=$O(^FSC("SPEC","AP",PACK,USER)) Q:USER<.1  D
 .S USERNAME=$P(^VA(200,USER,0),U)
 .S DUTIES=$P($G(^FSC("SPEC",USER,30,+$O(^FSC("SPEC","AP",PACK,USER,0)),0)),U,2)
 .S FUNC=$$VALUE^FSCGET($P(^FSC("SPEC",USER,0),U,4),7105.2,4) I $L(FUNC) S FUNC="("_FUNC_")"
 .S USERS(USERNAME,USER)=FUNC_"    "_DUTIES_"    "_$$PH^FSCRPCGN(USER)
 Q
 ;