source: WorldVistAEHR/trunk/r/E_CLAIMS_MGMT_ENGINE-BPS/BPSOSU2.m@ 1270

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1BPSOSU2 ;BHAM ISC/FCS/DRS/FLS - copied for ECME ;06/01/2004
2 ;;1.0;E CLAIMS MGMT ENGINE;**1**;JUN 2004
3 ;----------------------------------------------------------------------
4 ;----------------------------------------------------------------------
5 ;Standard FREETEXT and Numeric Functions
6 ;----------------------------------------------------------------------
7 ;Standard FREETEXT PROMPT:
8 ;
9 ;Parameters:
10 ; PROMPT = Text to be displayed before read
11 ; DFLT = DEFAULT text
12 ; OPT = 1 - Answer optional 0 - Answer required
13 ; MINLEN = Minimum length of response text
14 ; MAXLEN = Maximum length of response text
15 ; TIMEOUT = Number of seconds
16 ;
17 ;Returns:
18 ; <null> = No response <^> - Up-arrow entered
19 ; <-1> = Timeout occurred <^^> - Two up-arrows entered
20 ; <text> = Response text
21 ;---------------------------------------------------------------------
22FREETEXT(PROMPT,DFLT,OPT,MINLEN,MAXLEN,TIMEOUT) ;EP
23 ;
24 N XDATA,DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
25 ;
26 Q:$G(PROMPT)="" ""
27 S:$G(MINLEN)="" MINLEN=0
28 S:$G(MAXLEN)="" MAXLEN=245
29 ;
30 S $P(DIR(0),"^",1)="FA"_$S(OPT=1:"O",1:"")
31 S $P(XDATA,":",1)=MINLEN
32 S $P(XDATA,":",2)=MAXLEN
33 S $P(DIR(0),"^",2)=XDATA
34 S DIR("A")=PROMPT
35 S:$G(DFLT)'="" DIR("B")=DFLT
36 S:+$G(TIMEOUT)>0 DIR("T")=TIMEOUT
37 D ^DIR
38 Q $S($G(DTOUT)=1:-1,$G(DIROUT)=1:"^^",$G(DUOUT)=1:"^",1:Y)
39 ;---------------------------------------------------------------------
40 ;Standard Numeric PROMPT:
41 ;
42 ;Parameters:
43 ; PROMPT = Text to be displayed before read
44 ; DFLT = DEFAULT Numeric
45 ; OPT = 1 - Answer optional 0 - Answer required
46 ; MINNUM = Minimum numeric value
47 ; MAXNUM = Maximum numeric value
48 ; MAXDEC = Maximum number of decimal places allowed
49 ; TIMEOUT = Number of seconds
50 ;
51 ;Returns:
52 ; <null> = No response <^> - Up-arrow entered
53 ; <-1> = Timeout occurred <^^> - Two up-arrows entered
54 ; <Numeric> = Response Numeric
55 ;---------------------------------------------------------------------
56NUMERIC(PROMPT,DFLT,OPT,MINNUM,MAXNUM,MAXDEC,TIMEOUT) ;EP
57 ;
58 N XDATA,DIR,X,Y,DTOUT,DUOUT,DIRUT,DIROUT
59 ;
60 Q:$G(PROMPT)="" ""
61 ;
62 S $P(DIR(0),"^",1)="NA"_$S(OPT=1:"O",1:"")
63 S $P(XDATA,":",1)=$G(MINNUM)
64 S $P(XDATA,":",2)=$G(MAXNUM)
65 S $P(XDATA,":",3)=$G(MAXDEC)
66 S $P(DIR(0),"^",2)=XDATA
67 S DIR("A")=PROMPT
68 S:$G(DFLT)'="" DIR("B")=DFLT
69 S:+$G(TIMEOUT)>0 DIR("T")=TIMEOUT
70 D ^DIR
71 Q $S($G(DTOUT)=1:-1,$G(DIROUT)=1:"^^",$G(DUOUT)=1:"^",1:Y)
Note: See TracBrowser for help on using the repository browser.