VistA-WorldVistAEHR/r/NOIS-FSC/FSCXREFA.m

23 lines
870 B
Mathematica

FSCXREFA ;SLC/STAFF-NOIS Xrefs Alert ;4/22/94 14:32
;;1.1;NOIS;;Sep 06, 1998
;
AUC(OP,FIELD,VALUE,ENTRY) ; from dd 7100.3
N CALL,USER
I OP="SET" D Q
.I FIELD="CALL" D Q
..I VALUE S USER=$P(^FSCD("ALERT",ENTRY,0),U) I USER S ^FSCD("ALERT","AUC",USER,VALUE)=ENTRY
.I FIELD="USER" D Q
..I VALUE S CALL=$P(^FSCD("ALERT",ENTRY,0),U,2) I CALL S ^FSCD("ALERT","AUC",VALUE,CALL)=ENTRY
I OP="KILL" D Q
.I FIELD="CALL" D Q
..S USER=$P(^FSCD("ALERT",ENTRY,0),U) I USER K ^FSCD("ALERT","AUC",USER,VALUE)
.I FIELD="USER" D Q
..S CALL=$P(^FSCD("ALERT",ENTRY,0),U,2) I CALL K ^FSCD("ALERT","AUC",VALUE,CALL)
Q
ALERT(OP,VALUE,ENTRY) ; from dd 7100.3
I OP="SET" D Q
.I VALUE,$L($P($G(^FSCD("ALERT",+ENTRY,0)),U,2)) S ^FSCD("ALERT","ALERT",VALUE)=ENTRY ; only setup on self notification, not send notification
I OP="KILL" D Q
.K ^FSCD("ALERT","ALERT",VALUE)
Q