Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRCSPD

GMRCSPD.m

Go to the documentation of this file.
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