WANT the MEDITECH Reports BLOG via EMAIL?

Your email:

About MEDITECH Reports

MEDITECH Reports is an online reference for NPR Report Writing and not affiliated with MEDITECH, Inc @ http://meditech.com. To learn more about NPR report development using the Meditech Report Writer read more here.

View John Sharpe's profile on LinkedInI'm your host, John Sharpe, a MEDITECH Report Writing Consultant in Spokane, WA. More about me.


Email John

Follow Comstock Software on Twitter 

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

MEDITECH NPR & RW RESOURCES:

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

MEDITECH Reports

Current Articles | RSS Feed RSS Feed

Multiples In Downloads - NPR Report Writer


I like to use the # sign in Downloads where free text will be printed. Its common practice to use a comma as the delimiter; but that can be a problem if a field like some.description has a comma you weren't expecting.

The particular Download I'm working with today has 20 fields on the picture. The last 4 fields are multiples. I've decided to let the NPR Report Writer handle looping thru the multiples in this scenario.





When I printed the Download, NPR put the multiples from the end of the first row at the wrong place in the following lines. The first 2 columns of my spreadsheet looked like this. The columns were not lining up properly in Excel. This was because there are no other fields on the second report detail line.

ACCOUNT TOTAL CHG
1223456 1248.3
162.9 ANOTHER-HMO
276.1

I decided to use an ECB line attribute on the second detail line to correct the problem:

ECB=0^Q,DO{Q<16 Q+1^Q,(D(34)_D(34)_D(35))^!},


Opening this Download with Excel and Formatting Text to Columns on the # DELIMITER allows Excel sees the data as hoped.






Now columns 17 & 18 line up perfectly:

DIAG INSURANCE
310.2 ANOTHER-HMO
162.9 INSURANCE-NO2
276.1


Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics

Receive email when someone replies.