source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCEVUTL1.m@ 1604

Last change on this file since 1604 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1RCEVUTL1 ;WASH-ISC@ALTOONA,PA/LDB-Generic Event Utilities ;2/28/95 8:36 AM
2V ;;4.5;Accounts Receivable;;Mar 20, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4DATE(RANGE) ;Select date range or range of activity
5 ;RANGE=$P1 (Prompt for type of range)
6 ; $P2 (Prompt for default for beginning of range) NULL is FIRST
7 ; $P3 (Prompt for default for end of range) NULL is LAST
8 ; $P4 (%DT variable will be set to this type of date)
9 ; $P5 (%DT(0) variable will be set to this date constraint)
10 N %DT,DATE,FDT,X,Y
11BEG ;Select beginnning of range
12 S %DT=$S($P(RANGE,"^",4)]"":$P(RANGE,"^",4),1:"T")
13 S:$P(RANGE,"^",5)]"" %DT(0)=$P(RANGE,"^",5)
14 S FDT=$S($P(RANGE,"^",2)]"":$$SLH^RCFN01($P(RANGE,"^",2)),1:"FIRST")
15 W !,"Enter the beginning "_$S($P(RANGE,"^")]"":$P(RANGE,"^"),1:"DATE")_" : "_FDT_"// " R X:DTIME
16 I '$T!(X="^") S Y=-1 Q Y
17 I X="?" W !,"Examples of Valid Date: JAN 20 1957 or 20 JAN 57 or 1/20/57 or 012057" G BEG
18 I X="" S (X,Y)=$P(RANGE,"^",2)
19 I X]"" D ^%DT G:Y=-1 BEG
20 S DATE=+Y X ^DD("DD") W " ",Y
21 ;
22END ;Select ending of range
23 S %DT=$S($P(RANGE,"^",4)]"":$P(RANGE,"^",4),1:"T")
24 S:$P(RANGE,"^",5)]"" %DT(0)=$P(RANGE,"^",5)
25 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
26 I '$T!(X="^") S Y=-1 Q Y
27 I X="?" W !,"Examples of Valid Date: JAN 20 1957 or 20 JAN 57 or 1/20/57 or 012057" G END
28 I X="" S X=$S($P(RANGE,"^",3)]"":$P(RANGE,"^",3),1:"")
29 I X="" S Y=0 S DATE=DATE_"^"_Y Q DATE
30 I X]"" D ^%DT D G:Y=-1 END
31 .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
32 S DATE=DATE_"^"_+Y X ^DD("DD") W " ",Y
33 Q DATE
34 ;
Note: See TracBrowser for help on using the repository browser.