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

RCEVUTL1.m

Go to the documentation of this file.
  1. RCEVUTL1 ;WASH-ISC@ALTOONA,PA/LDB-Generic Event Utilities ;2/28/95 8:36 AM
  1. V ;;4.5;Accounts Receivable;;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. DATE(RANGE) ;Select date range or range of activity
  1. ;RANGE=$P1 (Prompt for type of range)
  1. ; $P2 (Prompt for default for beginning of range) NULL is FIRST
  1. ; $P3 (Prompt for default for end of range) NULL is LAST
  1. ; $P4 (%DT variable will be set to this type of date)
  1. ; $P5 (%DT(0) variable will be set to this date constraint)
  1. N %DT,DATE,FDT,X,Y
  1. BEG ;Select beginnning of range
  1. S %DT=$S($P(RANGE,"^",4)]"":$P(RANGE,"^",4),1:"T")
  1. S:$P(RANGE,"^",5)]"" %DT(0)=$P(RANGE,"^",5)
  1. S FDT=$S($P(RANGE,"^",2)]"":$$SLH^RCFN01($P(RANGE,"^",2)),1:"FIRST")
  1. W !,"Enter the beginning "_$S($P(RANGE,"^")]"":$P(RANGE,"^"),1:"DATE")_" : "_FDT_"// " R X:DTIME
  1. I '$T!(X="^") S Y=-1 Q Y
  1. I X="?" W !,"Examples of Valid Date: JAN 20 1957 or 20 JAN 57 or 1/20/57 or 012057" G BEG
  1. I X="" S (X,Y)=$P(RANGE,"^",2)
  1. I X]"" D ^%DT G:Y=-1 BEG
  1. S DATE=+Y X ^DD("DD") W " ",Y
  1. ;
  1. END ;Select ending of range
  1. S %DT=$S($P(RANGE,"^",4)]"":$P(RANGE,"^",4),1:"T")
  1. S:$P(RANGE,"^",5)]"" %DT(0)=$P(RANGE,"^",5)
  1. W !,"Enter the ending "_$S($P(RANGE,"^")]"":$P(RANGE,"^"),1:"DATE")_" : "_$S($P(RANGE,"^",3)]"":$$SLH^RCFN01($P(RANGE,"^",3)),1:"LAST")_"// " R X:DTIME
  1. I '$T!(X="^") S Y=-1 Q Y
  1. I X="?" W !,"Examples of Valid Date: JAN 20 1957 or 20 JAN 57 or 1/20/57 or 012057" G END
  1. I X="" S X=$S($P(RANGE,"^",3)]"":$P(RANGE,"^",3),1:"")
  1. I X="" S Y=0 S DATE=DATE_"^"_Y Q DATE
  1. I X]"" D ^%DT D G:Y=-1 END
  1. .I Y<DATE W !,*7,"Must be equal to or greater than beginning "_$S($P(RANGE,"^")]"":$P(RANGE,"^",2),1:"DATE"),!,*7 S Y=-1
  1. S DATE=DATE_"^"_+Y X ^DD("DD") W " ",Y
  1. Q DATE
  1. ;