[613] | 1 | FSCTASKU ;SLC/STAFF-NOIS Task Update ;1/17/98 16:52
|
---|
| 2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
| 3 | ;
|
---|
| 4 | UPDATE ; dequeued from FSCTASK
|
---|
| 5 | ; FSCCALL is saved
|
---|
| 6 | I $D(ZTQUEUED) S ZTREQ="@"
|
---|
| 7 | S FSCDEV=1
|
---|
| 8 | D UPDATE^FSCTASKA(FSCCALL)
|
---|
| 9 | D LOCATION(FSCCALL)
|
---|
| 10 | D SPEC(FSCCALL)
|
---|
| 11 | D AFFL(FSCCALL)
|
---|
| 12 | D UPDATE^FSCLP(FSCCALL)
|
---|
| 13 | D NOTIFY^FSCNOTS(FSCCALL)
|
---|
| 14 | Q
|
---|
| 15 | ;
|
---|
| 16 | LOCATION(CALL) ;
|
---|
| 17 | N LOC,STATUS
|
---|
| 18 | S LOC=$P(^FSCD("CALL",CALL,0),U,5),STATUS=$P(^(0),U,2)
|
---|
| 19 | Q:'$L($P(^FSC("SITE",LOC,0),U,4)) I $P(^(0),U,5)="CLOSED",STATUS'=2 Q
|
---|
| 20 | I $D(^FSCD("NOTIFY","ACLOC",CALL,LOC)) Q
|
---|
| 21 | D SETUP^FSCNOT(CALL,,LOC)
|
---|
| 22 | Q
|
---|
| 23 | ;
|
---|
| 24 | SPEC(CALL) ;
|
---|
| 25 | N EVENT,METHOD,SPEC
|
---|
| 26 | S SPEC=$P(^FSCD("CALL",CALL,0),U,9) I 'SPEC Q
|
---|
| 27 | S METHOD=$P(^FSC("SPEC",SPEC,0),U,14),EVENT=$P(^(0),U,15) Q:'$L(METHOD) Q:'$L(EVENT)
|
---|
| 28 | I $D(^FSCD("NOTIFY","ACUSER",CALL,SPEC)) Q
|
---|
| 29 | D SETUP^FSCNOT(CALL,,,SPEC,METHOD,EVENT)
|
---|
| 30 | Q
|
---|
| 31 | ;
|
---|
| 32 | AFFL(CALL) ; from FSCTASKA
|
---|
| 33 | N MISC,ONETW,PACK,PACKGP,RTD,ZERO
|
---|
| 34 | S ZERO=$G(^FSCD("CALL",CALL,0)),ONETW=$G(^(120))
|
---|
| 35 | S PACK=$P(ONETW,U,9),PACKGP=$P(ONETW,U,13),MISC=$S($P(ZERO,U,10)=5:1,1:""),RTD=$S($P(ZERO,U,17):1,1:"")
|
---|
| 36 | I RTD D AFFLCHK(CALL,2,PACK,PACKGP)
|
---|
| 37 | I 'MISC D AFFLCHK(CALL,1,PACK,PACKGP)
|
---|
| 38 | Q
|
---|
| 39 | ;
|
---|
| 40 | AFFLCHK(CALL,TYPE,PACK,PACKGP) ;
|
---|
| 41 | N EVENT,METHOD,USER
|
---|
| 42 | S USER=0 F S USER=$O(^FSC("SPEC","AF",TYPE,USER)) Q:USER'>0 D
|
---|
| 43 | .I $$CHECK(CALL,USER,PACK,PACKGP) D
|
---|
| 44 | ..S METHOD=$P(^FSC("SPEC",USER,0),U,14),EVENT=$P(^(0),U,15) Q:'$L(METHOD) Q:'$L(EVENT)
|
---|
| 45 | ..D SETUP^FSCNOT(CALL,,,USER,METHOD,EVENT)
|
---|
| 46 | Q
|
---|
| 47 | ;
|
---|
| 48 | CHECK(CALL,USER,PACK,PACKGP) ; $$(call,user,package,package group) -> 0 or 1 if ok to tag for notify
|
---|
| 49 | I $D(^FSCD("NOTIFY","ACUSER",CALL,USER)) Q 0
|
---|
| 50 | I PACKGP,$P($G(^FSC("SPEC",USER,20,+$O(^FSC("SPEC","AG",PACKGP,USER,0)),0)),U,3) Q 1
|
---|
| 51 | I PACK,$O(^FSC("SPEC","AP",PACK,USER,0)) Q 1
|
---|
| 52 | Q 0
|
---|