1 | DIOC ;SFISC/TKW-GENERATE CODE TO CHECK QUERY CONDITIONS ;04:18 PM 13 Feb 2002
|
---|
2 | ;;22.0;VA FileMan;**97**;Mar 30, 1999
|
---|
3 | ;Per VHA Directive 10-93-142, this routine should not be modified.
|
---|
4 | BEF(X,Y,N,M) ; BEFORE (X before Y)
|
---|
5 | N Z D Q(.Y)
|
---|
6 | I $G(N)="'" S Z=Y_"']]"_X Q Z
|
---|
7 | S Z="" S:$G(M)]"" Z=X_"]"""","
|
---|
8 | S Z=Z_Y_"]]"_X Q Z
|
---|
9 | AFT(X,Y,N,M) ; AFTER (X after Y)
|
---|
10 | N Z D Q(.Y)
|
---|
11 | I $G(N)="'" S Z="" S:$G(M)]"" Z=X_"]""""," S Z=Z_X_"']]"_Y Q Z
|
---|
12 | S Z=X_"]]"_Y Q Z
|
---|
13 | BTWI(X,F,T,N,S) ;BETWEEN INCLUSIVE (NOTE: Param.'S' defined only if called from sort.
|
---|
14 | S S=$G(S) N Z
|
---|
15 | I $G(N)="'" S Z="("_$$BEF(X,F)_")!("_$$AFT(X,T)_")" Q Z
|
---|
16 | S:S]"" Z=$$AFT(X,F)
|
---|
17 | I S="" D Q(.F) S Z=F_"']]"_X
|
---|
18 | S Z="("_Z_")&("_$$AFT(X,T,"'")_")" Q Z
|
---|
19 | BTWE(X,F,T,N) ;BETWEEN EXCLUSIVE
|
---|
20 | N Z D Q(.T)
|
---|
21 | I $G(N)="'" S Z="("_$$AFT(X,F,"'")_")!("_T_"']]"_X_")" Q Z
|
---|
22 | S Z="("_$$AFT(X,F)_")&("_T_"]]"_X_")" Q Z
|
---|
23 | EQ(X,Y,N) ;EQUALS
|
---|
24 | N Z S:$G(N)'="'" N="" D Q(.Y) S Z=X_N_"="_Y Q Z
|
---|
25 | NULL(X,N) ;NULL
|
---|
26 | N Z S:$G(N)'="'" N="" S Z=X_N_"=""""" Q Z
|
---|
27 | ;
|
---|
28 | Q(X) ;
|
---|
29 | I +$P(X,"E")'=X S X=""""_$$CONVQQ^DILIBF(X)_""""
|
---|
30 | Q
|
---|