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
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCRPCGM 2835 printed Dec 13, 2024@02:19:25 Page 2
FSCRPCGM ;SLC/STAFF-NOIS RPC Module Info ;1/11/98 15:24
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
MOD(MOD) ; from FSCRPCG
+1 NEW DEVOFF,GROUP,MODNAME,NAMECONV,NAMESP,PACK,PACKAGE,TYPE,ZERO
+2 SET ZERO=$GET(^FSC("MOD",+$GET(MOD),0))
IF '$LENGTH(ZERO)
QUIT
+3 SET MODNAME=$PIECE(ZERO,U)
+4 SET NAMESP=$PIECE(ZERO,U,4)
+5 SET NAMECONV=$PIECE(ZERO,U,7)
+6 SET TYPE=$$VALUE^FSCGET($PIECE(ZERO,U,3),7105.4,2)
+7 SET DEVOFF=$$VALUE^FSCGET($PIECE(ZERO,U,5),7105.4,4)
+8 SET PACK=$PIECE(ZERO,U,8)
+9 SET PACKAGE=$$VALUE^FSCGET(PACK,7105.4,7)
+10 SET GROUP=$$VALUE^FSCGET($PIECE($GET(^FSC("PACK",PACK,0)),U,2),7105.5,2)
+11 SET ^TMP("FSCRPC",$JOB,"OUTPUT",1)=MODNAME_" "_TYPE
+12 SET ^TMP("FSCRPC",$JOB,"OUTPUT",2)="Namespace: "_NAMESP
+13 SET ^TMP("FSCRPC",$JOB,"OUTPUT",3)="Naming Convention: "_NAMECONV
+14 SET ^TMP("FSCRPC",$JOB,"OUTPUT",4)="Office: "_DEVOFF
+15 SET ^TMP("FSCRPC",$JOB,"OUTPUT",5)="Package: "_PACKAGE
+16 SET ^TMP("FSCRPC",$JOB,"OUTPUT",6)="Package Group: "_GROUP
+17 QUIT
+18 ;
SPEC(MOD) ; from FSCRPCG
+1 NEW CNT,NUM,PACK,PACKNAME,USER,USERS
KILL USERS
+2 SET PACK=+$PIECE($GET(^FSC("MOD",+$GET(MOD),0)),U,8)
IF 'PACK
QUIT
+3 SET PACKNAME=$PIECE(^FSC("PACK",PACK,0),U)
+4 SET CNT=0
+5 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="Those affiliated with "_PACKNAME_":"
+6 DO AFFIL(PACK,.USERS)
+7 SET USER=""
FOR
SET USER=$ORDER(USERS(USER))
if USER=""
QUIT
Begin DoDot:1
+8 SET NUM=0
FOR
SET NUM=$ORDER(USERS(USER,NUM))
if NUM<1
QUIT
Begin DoDot:2
+9 SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=USER_" "_USERS(USER,NUM)
End DoDot:2
End DoDot:1
+10 KILL USERS
+11 QUIT
+12 ;
ADPAC(MOD) ; from FSCRPCG
+1 NEW ADPAC,CNT,PACK,PACKNAME,SITE,SITENAME,STSITE
+2 SET PACK=+$PIECE($GET(^FSC("MOD",+$GET(MOD),0)),U,8)
IF 'PACK
QUIT
+3 SET PACKNAME=$PIECE(^FSC("PACK",PACK,0),U)
+4 SET CNT=1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)="ADPACs:"
+5 SET SITENAME=""
FOR
SET SITENAME=$ORDER(^FSC("SITE","B",SITENAME))
if SITENAME=""
QUIT
Begin DoDot:1
+6 SET SITE=0
FOR
SET SITE=$ORDER(^FSC("SITE","B",SITENAME,SITE))
if SITE<1
QUIT
Begin DoDot:2
+7 SET STSITE=$$STSITE^FSCRPCGN(SITE)
+8 IF 'STSITE
QUIT
+9 SET ADPAC=$$APINFO^FSCRPCGN(STSITE,PACK)
+10 IF $LENGTH(ADPAC)
SET CNT=CNT+1
SET ^TMP("FSCRPC",$JOB,"OUTPUT",CNT)=" "_SITENAME_" "_ADPAC
End DoDot:2
End DoDot:1
+11 QUIT
+12 ;
AFFIL(PACK,USERS) ;
+1 NEW DUTIES,FUNC,PACKGP,USER,USERNAME
KILL USERS
+2 SET PACKGP=+$PIECE(^FSC("PACK",PACK,0),U,2)
+3 SET USER=0
FOR
SET USER=$ORDER(^FSC("SPEC","AG",PACKGP,USER))
if USER<.1
QUIT
Begin DoDot:1
+4 IF $PIECE($GET(^FSC("SPEC",USER,0)),U,2)
QUIT
+5 SET USERNAME=$PIECE(^VA(200,USER,0),U)
+6 IF $PIECE($GET(^FSC("SPEC",USER,20,+$ORDER(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,3)
Begin DoDot:2
+7 SET DUTIES=$PIECE($GET(^FSC("SPEC",USER,20,+$ORDER(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,2)
+8 SET FUNC=$$VALUE^FSCGET($PIECE(^FSC("SPEC",USER,0),U,4),7105.2,4)
IF $LENGTH(FUNC)
SET FUNC="("_FUNC_")"
+9 SET USERS(USERNAME,USER)=FUNC_" "_DUTIES_" "_$$PH^FSCRPCGN(USER)
End DoDot:2
End DoDot:1
+10 SET USER=0
FOR
SET USER=$ORDER(^FSC("SPEC","AP",PACK,USER))
if USER<.1
QUIT
Begin DoDot:1
+11 SET USERNAME=$PIECE(^VA(200,USER,0),U)
+12 SET DUTIES=$PIECE($GET(^FSC("SPEC",USER,30,+$ORDER(^FSC("SPEC","AP",PACK,USER,0)),0)),U,2)
+13 SET FUNC=$$VALUE^FSCGET($PIECE(^FSC("SPEC",USER,0),U,4),7105.2,4)
IF $LENGTH(FUNC)
SET FUNC="("_FUNC_")"
+14 SET USERS(USERNAME,USER)=FUNC_" "_DUTIES_" "_$$PH^FSCRPCGN(USER)
End DoDot:1
+15 QUIT
+16 ;