OCXF22 ;SLC/RJS,CLA - GENERATES CODE FOR 'Free Text (String)' OPERATORS ;10/29/98 12:37
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,316**;Dec 17,1997;Build 17
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
Q
;
;
LEN(X) ;
I ($E(X,1)="""") Q ($L(X)-2)
Q "$L("_X_")"
;
START(DATA,CVAL) ; DATA STARTS WITH VALUE
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "($E("_DATA_",1,"_$$LEN(CVAL)_")="_CVAL_")"
;
END(DATA,CVAL) ; DATA ENDS WITH VALUE
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "($E("_DATA_",($L("_DATA_")-("_$$LEN(CVAL)_"-1)),$L("_DATA_"))="_CVAL_")"
;
PAT(DATA,CVAL) ; MUMPS PATTERN MATCH
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"?"_CVAL_")"
;
;
CONT(DATA,CVAL) ; DATA CONTAINS VALUE
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"["_CVAL_")"
;
PREC(DATA,CVAL) ; DATA PRECEDES VALUE ALPHABETICALLY
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_CVAL_"]"_DATA_")"
;
;
FOLLOW(DATA,CVAL) ; DATA FOLLOWS VALUE ALPHABETICALLY
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"]"_CVAL_")"
;
AEQ(DATA,CVAL) ; DATA EQUALS VALUE ALPHABETICALLY
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "("_DATA_"="_CVAL_")"
;
AEQT(DATA,CVAL) ; DATA EQUALS STANDARD TERM ALPHABETICALLY
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "$$EQTERM("_DATA_","_CVAL_")"
;
NAEQ(DATA,CVAL) ; DATA DOES NOT EQUAL VALUE ALPHABETICALLY
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL)) "" Q "'("_DATA_"="_CVAL_")"
;
AINCL(DATA,CVAL1,CVAL2) ; ALPHA INCLUSIVE BETWEEN
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL1)) "" Q:'$L($G(CVAL2)) ""
;
Q "'("_$$PREC(DATA,CVAL1)_"!"_$$FOLLOW(DATA,CVAL2)_")"
;
AEXCL(DATA,CVAL1,CVAL2) ; ALPHA EXCLUSIVE BETWEEN
;
Q:'$L($G(DATA)) "" Q:'$L($G(CVAL1)) "" Q:'$L($G(CVAL2)) ""
;
Q "("_$$FOLLOW(DATA,CVAL1)_"&"_$$PREC(DATA,CVAL2)_")"
;
; ***** STRING LENGTH OPERATORS *****
;
LGRT(DATA,CVAL) ; GREATER THAN SPECIFIED STRING LENGTH
;
Q $$GRT^OCXF20("$L("_DATA_")",CVAL)
;
LESS(DATA,CVAL) ; LESS THAN SPECIFIED STRING LENGTH
;
Q $$LESS^OCXF20("$L("_DATA_")",CVAL)
;
LEQ(DATA,CVAL) ; EQUALS SPECIFIED STRING LENGTH
;
Q $$EQ^OCXF20("$L("_DATA_")",CVAL)
;
LINCL(DATA,CVAL1,CVAL2) ; STRING LENGTH INCLUSIVE BETWEEN
;
Q $$INCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
;
LEXCL(DATA,CVAL1,CVAL2) ; STRING LENGTH EXCLUSIVE BETWEEN
;
Q $$EXCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
;
EQSET(DATA,CVAL) ; STRING IS EQUAL TO ONE OF A LIST OF VALUES
;
Q "$$LIST("_DATA_","_CVAL_")"
;
CONSET(DATA,CVAL) ; STRING CONTAINS ONE OF A LIST OF VALUES
;
Q "$$CLIST("_DATA_","_CVAL_")"
;
CONNCSET(DATA,CVAL) ; CASE-INSENSITIVE STRING CONTAINS ONE OF A LIST OF VALUES ;DJE/VM *316
;
Q "$$CLIST($$UP^XLFSTR("_DATA_"),$$UP^XLFSTR("_CVAL_"))"
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXF22 2767 printed Nov 22, 2024@17:34:32 Page 2
OCXF22 ;SLC/RJS,CLA - GENERATES CODE FOR 'Free Text (String)' OPERATORS ;10/29/98 12:37
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,316**;Dec 17,1997;Build 17
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 QUIT
+4 ;
+5 ;
LEN(X) ;
+1 IF ($EXTRACT(X,1)="""")
QUIT ($LENGTH(X)-2)
+2 QUIT "$L("_X_")"
+3 ;
START(DATA,CVAL) ; DATA STARTS WITH VALUE
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "($E("_DATA_",1,"_$$LEN(CVAL)_")="_CVAL_")"
+3 ;
END(DATA,CVAL) ; DATA ENDS WITH VALUE
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "($E("_DATA_",($L("_DATA_")-("_$$LEN(CVAL)_"-1)),$L("_DATA_"))="_CVAL_")"
+3 ;
PAT(DATA,CVAL) ; MUMPS PATTERN MATCH
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "("_DATA_"?"_CVAL_")"
+3 ;
+4 ;
CONT(DATA,CVAL) ; DATA CONTAINS VALUE
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "("_DATA_"["_CVAL_")"
+3 ;
PREC(DATA,CVAL) ; DATA PRECEDES VALUE ALPHABETICALLY
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "("_CVAL_"]"_DATA_")"
+3 ;
+4 ;
FOLLOW(DATA,CVAL) ; DATA FOLLOWS VALUE ALPHABETICALLY
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "("_DATA_"]"_CVAL_")"
+3 ;
AEQ(DATA,CVAL) ; DATA EQUALS VALUE ALPHABETICALLY
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "("_DATA_"="_CVAL_")"
+3 ;
AEQT(DATA,CVAL) ; DATA EQUALS STANDARD TERM ALPHABETICALLY
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "$$EQTERM("_DATA_","_CVAL_")"
+3 ;
NAEQ(DATA,CVAL) ; DATA DOES NOT EQUAL VALUE ALPHABETICALLY
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL))
QUIT ""
QUIT "'("_DATA_"="_CVAL_")"
+3 ;
AINCL(DATA,CVAL1,CVAL2) ; ALPHA INCLUSIVE BETWEEN
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL1))
QUIT ""
if '$LENGTH($GET(CVAL2))
QUIT ""
+3 ;
+4 QUIT "'("_$$PREC(DATA,CVAL1)_"!"_$$FOLLOW(DATA,CVAL2)_")"
+5 ;
AEXCL(DATA,CVAL1,CVAL2) ; ALPHA EXCLUSIVE BETWEEN
+1 ;
+2 if '$LENGTH($GET(DATA))
QUIT ""
if '$LENGTH($GET(CVAL1))
QUIT ""
if '$LENGTH($GET(CVAL2))
QUIT ""
+3 ;
+4 QUIT "("_$$FOLLOW(DATA,CVAL1)_"&"_$$PREC(DATA,CVAL2)_")"
+5 ;
+6 ; ***** STRING LENGTH OPERATORS *****
+7 ;
LGRT(DATA,CVAL) ; GREATER THAN SPECIFIED STRING LENGTH
+1 ;
+2 QUIT $$GRT^OCXF20("$L("_DATA_")",CVAL)
+3 ;
LESS(DATA,CVAL) ; LESS THAN SPECIFIED STRING LENGTH
+1 ;
+2 QUIT $$LESS^OCXF20("$L("_DATA_")",CVAL)
+3 ;
LEQ(DATA,CVAL) ; EQUALS SPECIFIED STRING LENGTH
+1 ;
+2 QUIT $$EQ^OCXF20("$L("_DATA_")",CVAL)
+3 ;
LINCL(DATA,CVAL1,CVAL2) ; STRING LENGTH INCLUSIVE BETWEEN
+1 ;
+2 QUIT $$INCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
+3 ;
LEXCL(DATA,CVAL1,CVAL2) ; STRING LENGTH EXCLUSIVE BETWEEN
+1 ;
+2 QUIT $$EXCL^OCXF20("$L("_DATA_")",CVAL1,CVAL2)
+3 ;
EQSET(DATA,CVAL) ; STRING IS EQUAL TO ONE OF A LIST OF VALUES
+1 ;
+2 QUIT "$$LIST("_DATA_","_CVAL_")"
+3 ;
CONSET(DATA,CVAL) ; STRING CONTAINS ONE OF A LIST OF VALUES
+1 ;
+2 QUIT "$$CLIST("_DATA_","_CVAL_")"
+3 ;
CONNCSET(DATA,CVAL) ; CASE-INSENSITIVE STRING CONTAINS ONE OF A LIST OF VALUES ;DJE/VM *316
+1 ;
+2 QUIT "$$CLIST($$UP^XLFSTR("_DATA_"),$$UP^XLFSTR("_CVAL_"))"
+3 ;