1 | OCXF22 ;SLC/RJS,CLA - GENERATES CODE FOR 'Free Text (String)' OPERATORS ;10/29/98 12:37
|
---|
2 | ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
|
---|
3 | ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
|
---|
4 | Q
|
---|
5 | ;
|
---|
6 | ;
|
---|
7 | LEN(X) ;
|
---|
8 | I ($E(X,1)="""") Q ($L(X)-2)
|
---|
9 | Q "$L("_X_")"
|
---|
10 | ;
|
---|
11 | START(DATA,CVAL) ; DATA STARTS WITH VALUE
|
---|
12 | ;
|
---|
13 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "($E("_DATA_",1,"_$$LEN(CVAL)_")="_CVAL_")"
|
---|
14 | ;
|
---|
15 | END(DATA,CVAL) ; DATA ENDS WITH VALUE
|
---|
16 | ;
|
---|
17 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "($E("_DATA_",($L("_DATA_")-("_$$LEN(CVAL)_"-1)),$L("_DATA_"))="_CVAL_")"
|
---|
18 | ;
|
---|
19 | PAT(DATA,CVAL) ; MUMPS PATTERN MATCH
|
---|
20 | ;
|
---|
21 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"?"_CVAL_")"
|
---|
22 | ;
|
---|
23 | ;
|
---|
24 | CONT(DATA,CVAL) ; DATA CONTAINS VALUE
|
---|
25 | ;
|
---|
26 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"["_CVAL_")"
|
---|
27 | ;
|
---|
28 | PREC(DATA,CVAL) ; DATA PRECEDES VALUE ALPHABETICALLY
|
---|
29 | ;
|
---|
30 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_CVAL_"]"_DATA_")"
|
---|
31 | ;
|
---|
32 | ;
|
---|
33 | FOLLOW(DATA,CVAL) ; DATA FOLLOWS VALUE ALPHABETICALLY
|
---|
34 | ;
|
---|
35 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"]"_CVAL_")"
|
---|
36 | ;
|
---|
37 | AEQ(DATA,CVAL) ; DATA EQUALS VALUE ALPHABETICALLY
|
---|
38 | ;
|
---|
39 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"="_CVAL_")"
|
---|
40 | ;
|
---|
41 | AEQT(DATA,CVAL) ; DATA EQUALS STANDARD TERM ALPHABETICALLY
|
---|
42 | ;
|
---|
43 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "$$EQTERM("_DATA_","_CVAL_")"
|
---|
44 | ;
|
---|
45 | NAEQ(DATA,CVAL) ; DATA DOES NOT EQUAL VALUE ALPHABETICALLY
|
---|
46 | ;
|
---|
47 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "'("_DATA_"="_CVAL_")"
|
---|
48 | ;
|
---|
49 | AINCL(DATA,CVAL1,CVAL2) ; ALPHA INCLUSIVE BETWEEN
|
---|
50 | ;
|
---|
51 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL1)) "" Q:'$L($G(CVAL2)) ""
|
---|
52 | ;
|
---|
53 | Q "'("_$$PREC(DATA,CVAL1)_"!"_$$FOLLOW(DATA,CVAL2)_")"
|
---|
54 | ;
|
---|
55 | AEXCL(DATA,CVAL1,CVAL2) ; ALPHA EXCLUSIVE BETWEEN
|
---|
56 | ;
|
---|
57 | Q:'$L($G(DATA)) "" Q:'$L($G(CVAL1)) "" Q:'$L($G(CVAL2)) ""
|
---|
58 | ;
|
---|
59 | Q "("_$$FOLLOW(DATA,CVAL1)_"&"_$$PREC(DATA,CVAL2)_")"
|
---|
60 | ;
|
---|
61 | ; ***** STRING LENGTH OPERATORS *****
|
---|
62 | ;
|
---|
63 | LGRT(DATA,CVAL) ; GREATER THAN SPECIFIED STRING LENGTH
|
---|
64 | ;
|
---|
65 | Q $$GRT^OCXF20("$L("_DATA_")",CVAL)
|
---|
66 | ;
|
---|
67 | LESS(DATA,CVAL) ; LESS THAN SPECIFIED STRING LENGTH
|
---|
68 | ;
|
---|
69 | Q $$LESS^OCXF20("$L("_DATA_")",CVAL)
|
---|
70 | ;
|
---|
71 | LEQ(DATA,CVAL) ; EQUALS SPECIFIED STRING LENGTH
|
---|
72 | ;
|
---|
73 | Q $$EQ^OCXF20("$L("_DATA_")",CVAL)
|
---|
74 | ;
|
---|
75 | LINCL(DATA,CVAL1,CVAL2) ; STRING LENGTH INCLUSIVE BETWEEN
|
---|
76 | ;
|
---|
77 | Q $$INCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
|
---|
78 | ;
|
---|
79 | LEXCL(DATA,CVAL1,CVAL2) ; STRING LENGTH EXCLUSIVE BETWEEN
|
---|
80 | ;
|
---|
81 | Q $$EXCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
|
---|
82 | ;
|
---|
83 | EQSET(DATA,CVAL) ; STRING IS EQUAL TO ONE OF A LIST OF VALUES
|
---|
84 | ;
|
---|
85 | Q "$$LIST("_DATA_","_CVAL_")"
|
---|
86 | ;
|
---|
87 | CONSET(DATA,CVAL) ; STRING CONTAINS ONE OF A LIST OF VALUES
|
---|
88 | ;
|
---|
89 | Q "$$CLIST("_DATA_","_CVAL_")"
|
---|
90 | ;
|
---|