source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRPXU.m@ 1150

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1FSCRPXU ;SLC/STAFF-NOIS RPC Process Utility ;8/8/98 00:39
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4USERS ; display users
5 N USER,VERSION,CNT,NCNT
6 S CNT=0,NCNT=0
7 S USER=0 F S USER=$O(^XTMP("FSCRPC","<VERSION>",USER)) Q:USER<1 S VERSION=^(USER) D
8 .W !,USER,?10,VERSION,?20 W:$$ACCESS^FSCU(USER,"SPEC") "* " W $P($G(^VA(200,USER,0)),U)
9 .S CNT=CNT+1 I '$L(VERSION) S NCNT=NCNT+1
10 W !,CNT," ",NCNT
11 Q
12 ;
13TODAY ; display todays users
14 N TIME,USER
15 S TIME="" F S TIME=$O(^XTMP("FSCRPC","<STARTUP>",TIME)) Q:TIME="" D
16 .I -TIME<DT Q ;(DT-1) Q
17 .S USER=0 F S USER=$O(^XTMP("FSCRPC","<STARTUP>",TIME,USER)) Q:USER<1 D
18 ..W !,$$FMTE^XLFDT(-TIME) W:$$ACCESS^FSCU(USER,"SPEC") ?25,"*",$E($P($G(^FSC("SPEC",USER,0)),U,4)) W ?30,$P($G(^VA(200,USER,0)),U)
19 ..W ?50,$G(^XTMP("FSCRPC","<VERSION>",USER))
20 ..W ?60,$P($G(^DIC(4,+$P($G(^VA(200,USER,120000)),U,2),0)),U)
21 Q
22 ;
23DAYS ;
24 N CNT,DAY,TIME,USER K ^TMP($J)
25 S TIME="" F S TIME=$O(^XTMP("FSCRPC","<STARTUP>",TIME)) Q:TIME="" D
26 .;I -TIME<DT Q
27 .S DAY=-TIME\1
28 .S USER=0 F S USER=$O(^XTMP("FSCRPC","<STARTUP>",TIME,USER)) Q:USER<1 D
29 ..S ^TMP($J,DAY,USER)=""
30 S DAY=0 F S DAY=$O(^TMP($J,DAY)) Q:DAY<1 D
31 .W !,DAY
32 .S CNT=0
33 .S USER=0 F S USER=$O(^TMP($J,DAY,USER)) Q:USER<1 S CNT=CNT+1
34 .W ?20,CNT
35 K ^TMP($J)
36 Q
37 ;
38PROF ;
39 N CNT,RTN,USER
40 S DIC=200,DIC(0)="AEMOQZ",DIC("A")="User: "
41 D ^DIC I Y<1 Q
42 S USER=+Y
43 S RTN="" F S RTN=$O(^XTMP("FSCRPC","ZZUSER",USER,RTN)) Q:RTN="" S CNT=+^(RTN) D
44 .W !,RTN,?20,CNT
45 Q
46 ;
47ROU ;
48 N CNT,RTN,TCNT,USER K ^TMP("FSCTEST",$J)
49 W !,"Enter routine: " R X:30 I $L(X)'>6 Q
50 S RTN=X
51 S USER=0 F S USER=$O(^XTMP("FSCRPC","ZZUSER",USER)) Q:USER<1 D
52 .S CNT=+$G(^XTMP("FSCRPC","ZZUSER",USER,RTN)) I 'CNT Q
53 .S NAME=$P(^VA(200,+USER,0),U) I $$ACCESS^FSCU(+USER,"SPEC") S NAME="* "_NAME
54 .S ^TMP("FSCTEST",$J,CNT,NAME,USER)=""
55 S CNT=0 F S CNT=$O(^TMP("FSCTEST",$J,CNT)) Q:CNT<1 D
56 .S NAME="" F S NAME=$O(^TMP("FSCTEST",$J,CNT,NAME)) Q:NAME="" D
57 ..S USER=0 F S USER=$O(^TMP("FSCTEST",$J,CNT,NAME,USER)) Q:USER<1 D
58 ...W !,CNT,?10,NAME
59 K ^TMP("FSCTEST",$J)
60 Q
61 ;
62RTN ;
63 N CNT,RTN K ^TMP("FSCRPC",$J)
64 S RTN="" F S RTN=$O(^XTMP("FSCRPC",RTN)) Q:RTN="" D
65 .I RTN=0 Q
66 .I RTN="<STARTUP>" Q
67 .I RTN="<VERSION>" Q
68 .I RTN="ZZUSER" Q
69 .S CNT=+^XTMP("FSCRPC",RTN)
70 .S ^TMP("FSCRPC",$J,CNT,RTN)=""
71 S CNT="" F S CNT=$O(^TMP("FSCRPC",$J,CNT)) Q:CNT="" D
72 .S RTN="" F S RTN=$O(^TMP("FSCRPC",$J,CNT,RTN)) Q:RTN="" D
73 ..W !,CNT,?10,RTN
74 K ^TMP("FSCRPC",$J)
75 Q
76EPTYPE ;
77 K ^FSCD("CALL","AET")
78 S CNT=0
79 S CALL=0 F S CALL=$O(^FSCD("CALL",CALL)) Q:CALL<1 S NODE=$G(^(CALL,120)) D
80 .S EPTYPE=$P(NODE,U,21)
81 .I 'EPTYPE W !,CALL Q
82 .S CNT=CNT+1
83 .I CNT#1000=0 W !,"*",CNT
84 .I EPTYPE=1 S EPTYPE=3
85 .S $P(^FSCD("CALL",CALL,120),U,21)=EPTYPE
86 .S ^FSCD("CALL","AET",EPTYPE,CALL)=""
87 Q
88TEST ;
89 S CALL=60000 F S CALL=$O(^FSCD("STATUS HIST","B",CALL)) Q:CALL<1 D
90 .S COUNT=0
91 .S NUM=0 F S NUM=$O(^FSCD("STATUS HIST","B",CALL,NUM)) Q:NUM<1 D
92 ..S ZERO=$G(^FSCD("STATUS HIST",NUM,0)) I '$L(ZERO) Q
93 ..I $P(ZERO,U,4)=1,$P(ZERO,U,5)="" S COUNT=COUNT+1
94 .I COUNT>1 W !,CALL," ",COUNT," ",$P(^FSCD("CALL",CALL,0),U)
95 Q
Note: See TracBrowser for help on using the repository browser.