MEDITECH DR, NPR, MEDITECH Reporting, MEDITECH Reports, MEDITECH DR Reports, MEDITECH BI, MEDITECH Data Repository
I'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...
Expand your network by connecting on these social media sites:
Sign up for the MEDITECH Reports Blog; details to attend MEDITECH workshops are sent out 1 week in advance to all MEDITECH Report blog subscribers.These MEDITECH Workshops are sponsored by Donna Carroll at the MEDITECH Community Bulletin
Ascii Table: For NPR Report Writer Loop Builder: For NPR Macros Key Codes: For CDS Attributes List Builder: For NPR Macros MT Report Names: For NPR Reports MT Structure Viewer: For Physicals Strings: Format & Sort
Current Articles | RSS Feed
You've added the dashes '-' to a field; but what about removing them?To remove the dashes from a MEDITECH field (social security number, or phone number), you can use tokens and the NOT operator like this:"123-45-6789"^/SSN,/SSN'#1A'#1A^/SSNResult: /SSN = 123456789 OR/SSN'#1A^/SSNResult: /SSN = 12345-6789/SSN'#1A^/SSNResult: /SSN = 123456789ORDO{/SSN#L(/SSN,"-") /SSN'#1A^/SSN}Result: /SSN = 123456789
/VARIABLE:0S^/VARIABLE trims the LEADING & TRAILING spaces from a variable. But what if that last character looks like a space? And /VARIABLE still appears to have a space at the end of it?Try /VARIABLE:0XS^/VARIABLE. The :0X will replace non-printable characters with a space. Adding the 'S' to :0X trims the space added by :0X. Next time you're trying to remove spaces from the beginning or end of a value in NPR, try something like this: /VARIABLE:0XS^/VARIABLE.Example 1: VAL=(@pt.first.name:0XS)_" "_(@pt.last.name:0XS)Example 2: IF{@rich.text.line:0XS^/REPORT.LINE_.'=. /REPORT.LINE;"NO TEXT FOUND"}
The billing extract you’ve just sent to a payer has been rejected. There are quotes in the data, and they must be removed in order for your file to be processed. You update the NPR extract and resend. This time everything goes through.Read the rest here in the latest issue of the Meditech Bulletin: Reformatting NPR Report Output Using Find & Replace.
Ever needed to replace a character in a report's output? Next time you do, try something like this: {";",":",/TXT}^@STRING.FIND.REPLACE^/TXTSTRING.FIND.REPLACE; Input(s): /PARAMS; Output(s): /STRING; Author: John Sharpe; Usage: {@QUOTE,"`",/TXT}^@STRING.FIND.REPLACE^/TXT/PARAMS,/PARAMS|0^FIND,/PARAMS|1^REPLACE,/PARAMS|2^STRING,DO{STRING#(L(STRING,FIND)^P) (STRING$P)_REPLACE_(STRING%P)^STRING},STRING^/STRINGQUOTED(34)
When users of an NPR report need to enter a known free text value in a select and you want to make sure the value is always upper-cased: MAGIC: c.xx.type~$L.TO.U^c.xx.type CS: c.xx.type@Tr.l2u^c.xx.type
$TIME(@.sd)^TIME,(TIME$2^HH)_((TIME%2)$2^MM)_(TIME%5^SS)^TIME
The MEDITECH System does not have regular expressions, but it does have translation strings which function much like regular expressions.Upper Case Conversion: "Alphabet"~$L.TO.U results in "ALPHABET"Lower Case Conversion: "Alphabet"~$U.TO.L results in "alphabet"