FSCEVENT ;SLC/STAFF-NOIS Events ;1/13/98 11:30
;;1.1;NOIS;;Sep 06, 1998
ADD ; from FSCUEDS
D EVENT("ADD")
Q
;
DEL ; from FSCUEDS
D EVENT("DELETE")
Q
;
EVENT(MODE) ;
N D0,DIC,FROM,TO,X,Y K DIC,Y
S DIC=7103.2,DIC(0)="AEMOQ",DIC("A")="Select Event: "
D ^DIC K DIC Q:Y<1
S D0=+Y
D DATES(.FROM,.TO)
I 'FROM Q
I 'TO Q
D EVENT^FSCEVENP(MODE,D0,FROM,TO)
Q
;
ALL ; testing
N FROM,MODE,NUM,TO
S MODE="DELETE",FROM=2950401,TO=2951231,NUM=0 F S NUM=$O(^FSC("REVENT",NUM)) Q:NUM<1 D EVENT^FSCEVENP(MODE,NUM,FROM,TO)
Q
;
DATES(FROM,TO) ;
N DIR,END,START,X,Y K DIR S (FROM,TO)=0
S START=$E(DT,1,3)-1_"0101",END=$E(DT,1,3)+1_"0101"
S DIR(0)="DAO^"_START_":"_END_":EX"
S DIR("A")="From: "
S DIR("?",1)="Enter the beginning date of a date range."
S DIR("?")="^D HELP^%DTC,HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) Q
S FROM=Y
;
N DIR,X,Y K DIR
S DIR(0)="DAO^"_START_":"_END_":EX"
S DIR("A")="To: "
S DIR("?",1)="Enter the ending date of a date range."
S DIR("?")="^D HELP^%DTC,HELP^FSCU(.DIR)"
S DIR("??")="FSC U1 NOIS"
D ^DIR K DIR
I $D(DIRUT) S FROM=0 Q
S TO=Y I FROM>TO S X=FROM,FROM=TO,TO=X
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCEVENT 1197 printed Oct 16, 2024@18:18:20 Page 2
FSCEVENT ;SLC/STAFF-NOIS Events ;1/13/98 11:30
+1 ;;1.1;NOIS;;Sep 06, 1998
ADD ; from FSCUEDS
+1 DO EVENT("ADD")
+2 QUIT
+3 ;
DEL ; from FSCUEDS
+1 DO EVENT("DELETE")
+2 QUIT
+3 ;
EVENT(MODE) ;
+1 NEW D0,DIC,FROM,TO,X,Y
KILL DIC,Y
+2 SET DIC=7103.2
SET DIC(0)="AEMOQ"
SET DIC("A")="Select Event: "
+3 DO ^DIC
KILL DIC
if Y<1
QUIT
+4 SET D0=+Y
+5 DO DATES(.FROM,.TO)
+6 IF 'FROM
QUIT
+7 IF 'TO
QUIT
+8 DO EVENT^FSCEVENP(MODE,D0,FROM,TO)
+9 QUIT
+10 ;
ALL ; testing
+1 NEW FROM,MODE,NUM,TO
+2 SET MODE="DELETE"
SET FROM=2950401
SET TO=2951231
SET NUM=0
FOR
SET NUM=$ORDER(^FSC("REVENT",NUM))
if NUM<1
QUIT
DO EVENT^FSCEVENP(MODE,NUM,FROM,TO)
+3 QUIT
+4 ;
DATES(FROM,TO) ;
+1 NEW DIR,END,START,X,Y
KILL DIR
SET (FROM,TO)=0
+2 SET START=$EXTRACT(DT,1,3)-1_"0101"
SET END=$EXTRACT(DT,1,3)+1_"0101"
+3 SET DIR(0)="DAO^"_START_":"_END_":EX"
+4 SET DIR("A")="From: "
+5 SET DIR("?",1)="Enter the beginning date of a date range."
+6 SET DIR("?")="^D HELP^%DTC,HELP^FSCU(.DIR)"
+7 SET DIR("??")="FSC U1 NOIS"
+8 DO ^DIR
KILL DIR
+9 IF $DATA(DIRUT)
QUIT
+10 SET FROM=Y
+11 ;
+12 NEW DIR,X,Y
KILL DIR
+13 SET DIR(0)="DAO^"_START_":"_END_":EX"
+14 SET DIR("A")="To: "
+15 SET DIR("?",1)="Enter the ending date of a date range."
+16 SET DIR("?")="^D HELP^%DTC,HELP^FSCU(.DIR)"
+17 SET DIR("??")="FSC U1 NOIS"
+18 DO ^DIR
KILL DIR
+19 IF $DATA(DIRUT)
SET FROM=0
QUIT
+20 SET TO=Y
IF FROM>TO
SET X=FROM
SET FROM=TO
SET TO=X
+21 QUIT