source: FOIAVistA/tag/r/NOIS-FSC/FSCTASKN.m@ 1456

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1FSCTASKN ;SLC/STAFF-NOIS Task Notification ;1/13/98 17:11
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4NOTIFY ; from FSCTASKA
5 N ADDRESS,ARRAY,CALL,DA,DIK,EVENT,LIST,LISTNAME,METHOD,MSG,NOTIFY,NUM,USER K ARRAY
6 S LIST=0 F S LIST=$O(^FSC("LIST","AU","A",LIST)) Q:LIST<1 D
7 .Q:$P($G(^FSC("LIST",LIST,0)),U,7)'="ADDED" Q:'$L($P(^(0),U,6)) S LISTNAME=$P(^(0),U)
8 .S NUM=0 F S NUM=$O(^FSCD("NOTIFY","ALIST",LIST,NUM)) Q:NUM<1 D
9 ..S NOTIFY=$G(^FSCD("NOTIFY",NUM,0)),CALL=+NOTIFY I 'CALL Q
10 ..D GET^FSCNOTS(NOTIFY,.USER,.METHOD,.EVENT,.ADDRESS)
11 ..S MSG="Call added to "_LISTNAME_" "_$$FMTE^XLFDT(DT)_"."
12 ..D
13 ...I METHOD="MAIL" D Q
14 ....I $L(ADDRESS) S ARRAY(ADDRESS)="",ARRAY(ADDRESS,1)="I" Q
15 ....S ARRAY(USER)="",ARRAY(USER,1)="I"
16 ...I METHOD="ALERT" D ALERT^FSCNOTS(CALL,USER,MSG) Q
17 ..S DA=NUM,DIK="^FSCD(""NOTIFY""," D ^DIK
18 ..I $L($O(ARRAY(0))) D MAIL^FSCNOTS(CALL,.ARRAY,MSG) K ARRAY
19 Q
20 ;
21CHKALERT ; from FSCTASKA
22 N USER
23 S USER=0 F S USER=$O(^FSCD("ALERT","ALERT",USER)) Q:USER'>0 D NEWALERT(USER)
24 Q
25 ;
26NEWALERT(USER) ;
27 N XQA,XQADATA,XQAID,XQAMSG,XQAROU K XQA,^TMP("FSC CHKALERT",$J)
28 D USER^XQALERT("^TMP(""FSC CHKALERT"",$J)",USER,2900101)
29 I '$O(^TMP("FSC CHKALERT",$J,0))!'$O(^XTV(8992,USER,"XQA",0)) D
30 .S XQA(USER)="",XQADATA="",XQAMSG="NOIS Calls",XQAROU="USER^FSCNAR",XQAID="FSC-A"
31 .D SETUP^XQALERT
32 K ^TMP("FSC CHKALERT",$J)
33 Q
34 ;
35DELIVERY(UPDATE) ; from FSCTASKA
36 N ALERT,DA,DATE,DIE,DR,NUM,XQA,XQADATA,XQAID,XQAMSG,XQAROU K XQA
37 S XQAROU="ALERT^FSCNAR",DIE="^FSCD(""ALERT"","
38 S DATE=0 F S DATE=$O(^FSCD("ALERT","AD",DATE)) Q:DATE<1 Q:DATE>UPDATE D
39 .S NUM=0 F S NUM=$O(^FSCD("ALERT","AD",DATE,NUM)) Q:NUM<1 D
40 ..S ALERT=$G(^FSCD("ALERT",NUM,0)) I '$L(ALERT) Q
41 ..I $P(ALERT,U,4) Q
42 ..S DA=NUM,DR="3///"_$$NOW^XLFDT_";4///@"
43 ..L +^FSCD("ALERT",NUM,0):30 I '$T Q ; *** skip
44 ..D ^DIE
45 ..L -^FSCD("ALERT",NUM,0)
46 ..S XQAROU="ALERT^FSCNAR",XQADATA=NUM,XQA(+ALERT)="",XQAMSG=$P(ALERT,U,3),XQAID="FSC-A"
47 ..I $O(XQA(0)) D SETUP^XQALERT
48 Q
Note: See TracBrowser for help on using the repository browser.