About MEDITECH Reports

 

View John Sharpe's profile on LinkedInI'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...

Connect ...

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

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

HIT Topics

MEDITECH Reports

Current Articles | RSS Feed RSS Feed

Dynamic Location/Database

 

If you need to run a report in a multi-location, multi-database hospital system; you want to code the logic for the database once and have it work everywhere.

One way to do this is use the database for the application you are in. Example: you have an ADM fragment call to NUR. You want the NUR fragment to dynamically know which database to use. You are running the ADM report in the ADM.CHW database. You want the frag to run in the NUR.CHW database.

Next time try this code to populate your database variable in the code:

@.db#1."^DATABASE

This will set the value of DATABASE to: CHW.

Then append the DATABASE to the module you want to work with: "NUR."_DATABASE^APP

The APP variable now contains the value: NUR.CHW


.: This article applies to Meditech NPR Report Writing :.

Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!

Subscribe to the Meditech Blog     

                                                                                                                                                                                                          

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