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

LRDATEDH.m

Go to the documentation of this file.
  1. LRDATEDH ;DALISC/DRH - DATE RANGE FOR LRRS 1-14-94
  1. ;;5.2;LAB SERVICE;;Sep 27, 1994
  1. ;;V1
  1. CONTROL ;
  1. D LRSD
  1. I 'OK S LREND=1 QUIT
  1. D LRED
  1. I 'OK S LREND=1 QUIT
  1. Q
  1. LRSD ;
  1. N X1,X2,X
  1. S OK=1
  1. K DIR
  1. S DIR(0)="D"
  1. S DIR("A")="Please enter the BEGINNING DATE here"
  1. S DIR("?",1)=" Date:"
  1. S DIR("?",2)=" Date can be T for Today"
  1. S DIR("?",3)=" T+1 for Tommorrow"
  1. S DIR("?",4)=" T-1 for Yesterday"
  1. S DIR("?",5)=" OR the date 10-12-93"
  1. S DIR("?")=" "
  1. S DIR("B")="T-30"
  1. D ^DIR
  1. I $D(DTOUT)!($D(DUOUT)) S OK=0 QUIT
  1. I $L(X)=2 D HLPDT Q:'OK G CONTROL QUIT
  1. I $E(Y,1,1)'=2 D HLPDT Q:'OK G CONTROL QUIT
  1. I $L(Y)'<7 D
  1. . W " ",$$FMTE^XLFDT(Y,"4D")
  1. . S X1=Y,X2=-1
  1. . D C^%DTC
  1. . S LRSDT=X
  1. Q
  1. HLPDT ;
  1. W !,"Insufficient data entered."
  1. W !,"TYPE ? FOR HELP ",$C(7)
  1. Q
  1. LRED ;
  1. S OK=1
  1. K DIR
  1. S DIR(0)="D"
  1. S DIR("A")="Please enter the LAST DATE here"
  1. S DIR("?",1)=" Date:"
  1. S DIR("?",2)=" Date can be T for Today"
  1. S DIR("?",3)=" T+1 for Tommorrow"
  1. S DIR("?",4)=" T-1 for Yesterday"
  1. S DIR("?",5)=" OR the date 10-12-93"
  1. S DIR("?")=" "
  1. S DIR("B")="TODAY"
  1. D ^DIR
  1. I $D(DTOUT)!($D(DUOUT)) S OK=0 QUIT
  1. I $L(X)=2 D HLPDT Q:'OK G LRED Q
  1. I $E(Y,1,1)'=2 D HLPDT Q:'OK G LRED QUIT
  1. I $L(Y)'<7 S LREDT=Y
  1. W " ",$$FMTE^XLFDT(Y,"4D")
  1. I LRSDT>LREDT D NONO G CONTROL Q
  1. Q
  1. NONO W !!,"THE LAST DATE MUST BE AFTER THE BEGINNING DATE!",$C(7),$C(7)
  1. Q