source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRPCAP.m@ 1046

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1FSCRPCAP ;SLC/STAFF-NOIS RPC Alert Process ;1/11/98 18:48
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4ALERT(XQADATA) ; from FSCRPCA
5 I '$O(^FSCD("SEND","B",+XQADATA,0)) Q
6 N CALL,LNUM,NUM
7 K ^TMP("FSC CURRENT LIST",$J)
8 K ^TMP("FSC LIST CLEANUP",$J)
9 S LNUM=0
10 S NUM=0 F S NUM=$O(^FSCD("SEND","B",+XQADATA,NUM)) Q:NUM<1 D
11 .S CALL=+$P($G(^FSCD("SEND",NUM,0)),U,2)
12 .D SETUP(CALL,$P($G(^FSCD("ALERT",+XQADATA,0)),U,3))
13 .D MRA^FSCMR(DUZ,CALL)
14 .S LNUM=LNUM+1
15 .S ^TMP("FSC LIST CLEANUP",$J,LNUM)=$P($G(^FSCD("ALERT",+XQADATA,0)),U,3)
16 .D OUTPUT^FSCRPCA
17 S NUM=0 F S NUM=$O(^FSCD("SEND","B",+XQADATA,NUM)) Q:NUM<1 D
18 .I '$L($P($G(^FSCD("SEND",NUM,0)),U,3)) S $P(^(0),U,3)=DT
19 Q
20 ;
21USER ; from FSCRPCA
22 N CALL,DA,DIK,LNUM,NUM,X,Y
23 K ^FSCD("ALERT","ALERT",DUZ)
24 K ^TMP("FSC CURRENT LIST",$J)
25 K ^TMP("FSC LIST CLEANUP",$J)
26 S LNUM=0
27 S DIK="^FSCD(""ALERT"","
28 S CALL=0 F S CALL=$O(^FSCD("ALERT","AUC",DUZ,CALL)) Q:CALL<1 S NUM=^(CALL) D
29 .D SETUP(CALL,$P($G(^FSCD("ALERT",NUM,0)),U,3))
30 .D MRA^FSCMR(DUZ,CALL)
31 .S LNUM=LNUM+1
32 .S ^TMP("FSC LIST CLEANUP",$J,LNUM)=$P(^FSCD("ALERT",NUM,0),U,3)
33 .S DA=+NUM D ^DIK
34 .D OUTPUT^FSCRPCA
35 Q
36 ;
37SETUP(CALL,MSG) ;
38 N LNUM
39 S LNUM=1+$O(^TMP("FSC CURRENT LIST",$J,"A"),-1)
40 I LNUM<1000 S LNUM=LNUM+1000
41 S ^TMP("FSC CURRENT LIST",$J,LNUM)=CALL_U_$$SHORT^FSCRPXUS(CALL,DUZ)_" ("_MSG_")"
42 S ^TMP("FSC CURRENT LIST",$J,"C",CALL)=LNUM
43 Q
Note: See TracBrowser for help on using the repository browser.