source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXF22.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 2.4 KB
Line 
1OCXF22 ;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 ;
7LEN(X) ;
8 I ($E(X,1)="""") Q ($L(X)-2)
9 Q "$L("_X_")"
10 ;
11START(DATA,CVAL) ; DATA STARTS WITH VALUE
12 ;
13 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "($E("_DATA_",1,"_$$LEN(CVAL)_")="_CVAL_")"
14 ;
15END(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 ;
19PAT(DATA,CVAL) ; MUMPS PATTERN MATCH
20 ;
21 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"?"_CVAL_")"
22 ;
23 ;
24CONT(DATA,CVAL) ; DATA CONTAINS VALUE
25 ;
26 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"["_CVAL_")"
27 ;
28PREC(DATA,CVAL) ; DATA PRECEDES VALUE ALPHABETICALLY
29 ;
30 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_CVAL_"]"_DATA_")"
31 ;
32 ;
33FOLLOW(DATA,CVAL) ; DATA FOLLOWS VALUE ALPHABETICALLY
34 ;
35 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"]"_CVAL_")"
36 ;
37AEQ(DATA,CVAL) ; DATA EQUALS VALUE ALPHABETICALLY
38 ;
39 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"="_CVAL_")"
40 ;
41AEQT(DATA,CVAL) ; DATA EQUALS STANDARD TERM ALPHABETICALLY
42 ;
43 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "$$EQTERM("_DATA_","_CVAL_")"
44 ;
45NAEQ(DATA,CVAL) ; DATA DOES NOT EQUAL VALUE ALPHABETICALLY
46 ;
47 Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "'("_DATA_"="_CVAL_")"
48 ;
49AINCL(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 ;
55AEXCL(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 ;
63LGRT(DATA,CVAL) ; GREATER THAN SPECIFIED STRING LENGTH
64 ;
65 Q $$GRT^OCXF20("$L("_DATA_")",CVAL)
66 ;
67LESS(DATA,CVAL) ; LESS THAN SPECIFIED STRING LENGTH
68 ;
69 Q $$LESS^OCXF20("$L("_DATA_")",CVAL)
70 ;
71LEQ(DATA,CVAL) ; EQUALS SPECIFIED STRING LENGTH
72 ;
73 Q $$EQ^OCXF20("$L("_DATA_")",CVAL)
74 ;
75LINCL(DATA,CVAL1,CVAL2) ; STRING LENGTH INCLUSIVE BETWEEN
76 ;
77 Q $$INCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
78 ;
79LEXCL(DATA,CVAL1,CVAL2) ; STRING LENGTH EXCLUSIVE BETWEEN
80 ;
81 Q $$EXCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
82 ;
83EQSET(DATA,CVAL) ; STRING IS EQUAL TO ONE OF A LIST OF VALUES
84 ;
85 Q "$$LIST("_DATA_","_CVAL_")"
86 ;
87CONSET(DATA,CVAL) ; STRING CONTAINS ONE OF A LIST OF VALUES
88 ;
89 Q "$$CLIST("_DATA_","_CVAL_")"
90 ;
Note: See TracBrowser for help on using the repository browser.