I'm kind of embarassed to admit to this, but...

I'm trying to convert a lot of fields in Visual Form Editor (works
with GE's Electronic Medical Record) from the format

[<newline>
{CFMT(<observation term>, "", <caption>, "B", " ")}]

to

[fnFormatService(<observation term>, <caption>)]

Unfortunately, VFE doesn't support search-and-replace within the .DLG
file. (I could do it with the generated clinical kit files, but my
changes would be wiped out each time I saved.)

So, I opened up VFP and assigned the following to an fkey:

SET LIBRARY TO HOME()+"regexp.fll" ;
    , HOME()+"foxtools.fll"

lcVal = _CLIPTEXT
IF LEFT(lcVal,2) = CHR(13)
        lcVal = SUBSTR(lcVal, 2)
ENDIF

lcRegExp = '.*\{CFMT\((OBSNOW\("[^"]+"\)), "", ("[^"]*"),.*'

_cliptext = STRTRAN( ;
    reduce( ;
        regexp(lcVal, lcRegExp, 1, "fnFormatService\(\1, \2\)") ;
        ) ;
    , [ ")] ;
    , [")] ;
    )


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to