GMRCSPD ;SLC/DCM,JFR - Change Date Range in CSLT Tracking Module ;4/19/00 14:32
;;3.0;CONSULT/REQUEST TRACKING;**1,14,7**;DEC 27, 1997
; 19 APR 00 - MA - Date "GMRCDT2" was not being reset - KILLED GMRCDT2
EN ;START HERE
N DTOUT,DIR,DUOUT,DIRUT,X,Y,GMRCDTS1,GMRCDTS2
I $D(GMRCDT1)&($D(GMRCDT2)) D DTSAV
K GMRCQUT
EN1 S DIR(0)="FA^1:45",DIR("A")="List From Starting Date: "
S DIR("B")="ALL DATES" D ^DIR
I $D(DUOUT)!($D(DTOUT)) D DTRES S GMRCQUT=1 Q
S GMRCDT1=$$CHECK(X) I 'GMRCDT1,GMRCDT1'="ALL" G EN1
I GMRCDT1="ALL" S GMRCDT2=0 Q
K DIR
S DIR(0)="DA^::E",DIR("A")="List To This Ending Date: " D ^DIR
I $D(DTOUT)!($D(DUOUT)) K GMRCDT1 D DTRES S GMRCQUT=1 Q
I +Y<GMRCDT1 S GMRCDT2=GMRCDT1,GMRCDT1=+Y
S:'$D(GMRCDT2) GMRCDT2=+Y
I $D(GMRC("NMBR")) D RESET^GMRCSLMV(GMRC("NMBR")) K GMRC("NMBR")
Q
DTSAV ;Save old dates in case user '^'s out.
I $D(GMRCDT1),$S(GMRCDT1>0:1,GMRCDT1="ALL":1,1:0) S GMRCDTS1=GMRCDT1,GMRCDT1=""
I $D(GMRCDT2),GMRCDT2>0 S GMRCDTS2=GMRCDT2 K GMRCDT2
I GMRCDTS1="ALL" K GMRCDT2
Q
DTRES ;Restore old date in case user '^' out.
I $D(GMRCDTS1) S GMRCDT1=GMRCDTS1
I $D(GMRCDTS2) S GMRCDT2=GMRCDTS2
K GMRCDTS1,GMRCDTS2 Q
CHECK(GMRCDAT) ;CHECK FREE TEXT INPUT
N %DT,X,Y
;I "ALL DATES"[$$UP^XLFSTR(GMRCDAT) Q "ALL"
I $E("ALL DATES",1,$L(GMRCDAT))=$$UP^XLFSTR(GMRCDAT) Q "ALL"
S %DT="E",X=GMRCDAT D ^%DT I Y<1 Q 0
Q +Y
GMRCSPD ;SLC/DCM,JFR - Change Date Range in CSLT Tracking Module ;4/19/00 14:32
+1 ;;3.0;CONSULT/REQUEST TRACKING;**1,14,7**;DEC 27, 1997
+2 ; 19 APR 00 - MA - Date "GMRCDT2" was not being reset - KILLED GMRCDT2
EN ;START HERE
+1 NEW DTOUT,DIR,DUOUT,DIRUT,X,Y,GMRCDTS1,GMRCDTS2
+2 IF $DATA(GMRCDT1)&($DATA(GMRCDT2))
DO DTSAV
+3 KILL GMRCQUT
EN1 SET DIR(0)="FA^1:45"
SET DIR("A")="List From Starting Date: "
+1 SET DIR("B")="ALL DATES"
DO ^DIR
+2 IF $DATA(DUOUT)!($DATA(DTOUT))
DO DTRES
SET GMRCQUT=1
QUIT
+3 SET GMRCDT1=$$CHECK(X)
IF 'GMRCDT1
IF GMRCDT1'="ALL"
GOTO EN1
+4 IF GMRCDT1="ALL"
SET GMRCDT2=0
QUIT
+5 KILL DIR
+6 SET DIR(0)="DA^::E"
SET DIR("A")="List To This Ending Date: "
DO ^DIR
+7 IF $DATA(DTOUT)!($DATA(DUOUT))
KILL GMRCDT1
DO DTRES
SET GMRCQUT=1
QUIT
+8 IF +Y<GMRCDT1
SET GMRCDT2=GMRCDT1
SET GMRCDT1=+Y
+9 IF '$DATA(GMRCDT2)
SET GMRCDT2=+Y
+10 IF $DATA(GMRC("NMBR"))
DO RESET^GMRCSLMV(GMRC("NMBR"))
KILL GMRC("NMBR")
+11 QUIT
DTSAV ;Save old dates in case user '^'s out.
+1 IF $DATA(GMRCDT1)
IF $SELECT(GMRCDT1>0:1,GMRCDT1="ALL":1,1:0)
SET GMRCDTS1=GMRCDT1
SET GMRCDT1=""
+2 IF $DATA(GMRCDT2)
IF GMRCDT2>0
SET GMRCDTS2=GMRCDT2
KILL GMRCDT2
+3 IF GMRCDTS1="ALL"
KILL GMRCDT2
+4 QUIT
DTRES ;Restore old date in case user '^' out.
+1 IF $DATA(GMRCDTS1)
SET GMRCDT1=GMRCDTS1
+2 IF $DATA(GMRCDTS2)
SET GMRCDT2=GMRCDTS2
+3 KILL GMRCDTS1,GMRCDTS2
QUIT
CHECK(GMRCDAT) ;CHECK FREE TEXT INPUT
+1 NEW %DT,X,Y
+2 ;I "ALL DATES"[$$UP^XLFSTR(GMRCDAT) Q "ALL"
+3 IF $EXTRACT("ALL DATES",1,$LENGTH(GMRCDAT))=$$UP^XLFSTR(GMRCDAT)
QUIT "ALL"
+4 SET %DT="E"
SET X=GMRCDAT
DO ^%DT
IF Y<1
QUIT 0
+5 QUIT +Y