April 23, 2015, 1:24 pm

DR+NPR Tip: Running Web-based Reports from a MEDITECH Menu

by Thomas Harlan, Technical Team Lead – Data Repository at Iatric Systems & Mitchell Lawrence, HIS Programmer Analyst at Iatric Systems


Many sites using SQL Server Reporting Services will use the External Links feature in MEDITECH to route a user to the “top” of the reporting portal. However, you can also set up a structure in NPR that lets you invoke the user’s web browser and provide a URL to go to the reporting portal and open a specific report directly from a MEDITECH menu.

We do this by creating two NPRs (which are attached to this tip in both MAGIC (PDF) and C/S (PDF) versions):

First, there we’ll call the control report:


This single NPR holds a list of all web-based report URLs you want to invoke from a MEDITECH menu, and each one of them is assigned a unique identifying number. (If you’re using Data Request Numbers (tip from 2/19/2015), then you can use the same number here).

Example Report URLs

Business Objects http://boe.hospital.org:8080/BOE/OpenDocument/opendoc
MS Reporting Services http://rs.hospital.org/Reports/Pages/Report.aspx?

Second, we have a stub or template NPR that exists only to be copied into a version that you’ll update to point to the web-portal-based report:


This gets copied to something like:


Within that copy of the template (what we’ll call the link report) all we need to do is update the Title field (on Page 1) to reference the number we assigned to the URL that we want to kick off:


The launch macro over in zcus.is.rs then builds out the URL we want and launches the default browser on the workstation and goes to that URL, viewing the report.

Once that is set up, then you can attach EDM.PAT.zcus.is.rs.ed.dashboard to any MT menu that will accept an NPR as a menu option, and then launch the web-portal-based report from inside a MEDITECH workflow.

All of the report URLs are centrally managed in MIS.USER.zcus.is.rs so they are easy to find, update and add to.


  1. Each MEDITECH (MT) workstation needs a web-browser installed and set to handle http requests by default.
  2. Preferably, access to your web-reporting portal will be handled by Single Sign On, using the end user’s Active Directory credentials – so that they open the reporting portal web-page seamlessly without being prompted for a username and password.
  3. Users launching the reports from a MEDITECH menu will need at least * access to the appropriate application in the MIS user dictionary where the link report is created.
  4. Users will of course need appropriate access to the reporting server and the specified report they are running.

Creating MIS.USER.zcus.is.rs.template from scratch

This is the template report that the end user copies and then modifies the title field to call the proper report. This is also provided via an attachment to this tip (MAGIC (PDF) or Client/Server (PDF)).

  1. Start NPR
  2. Create a new NPR in MIS.USER called zcus.is.rs.template
  3. Edit the report
  4. Set the title to “_%MIS.USER.zcus.is.rs.M.launch(1)_”
  5. Set Detail to N
  6. File and Translate the report

Identify the URL to run an SSRS report

  1. Go to the MS Reporting Services portal and right-click on a report name in Report Manager. Copy the URL to clipboard, and you should get a URL like this:
  2. For long URLs, it is best to break up the url at a punctuation into smaller parts to avoid character limits:

    http://                                        PREFIX
    reportsvr                                      RSSERVER
    /Reports/Pages/Report.aspx?ItemPath=%2f        PATHTOREPORT(1)
    EDM_zcus_iatric_ed_dashboard                                  REPORT(1)

Create the Launch report from scratch

This NPR holds the code to produce our report based on the parameter fed to M.launch.

  1. Start NPR
  2. Create a new NPR in MIS.USER called zcus.is.rs
  3. Edit the report
  4. Set the title to Reporting Services Utilities
  5. Set Detail to N
  6. File and Translate the report
  7. Create a new macro called “launch”
  8. Enter the following into the macro code
    For C/S:

    ;C/S title code: “_%(MIS)USER..zcus.is.rs.M.launch(URLSEQ)_”

    ;Set the URLSEQ
    ;Suppress Print On Prompt and End of Report messages




    For MAGIC:

    ;MAGIC title code: “_%MIS.USER.zcus.is.rs.M.launch(URLSEQ)_”

    ;Set the URLSEQ
    ;Suppress Print On Prompt and End of Report messages




  9. File and translate your macro
  10. Create a new macro called “url”
  11. Enter the following into the macro code for C/S and MAGIC both:


    ;Get Global Variables

    ;Build Final URL from Sequenced Path
    DO{+(/URL[SEQ],DATA)^SEQ @Add(L(DATA),TOT)},

  12. File and translate your macro
  13. Create a new macro called “config”
  14. Enter the following into the macro code for C/S and MAGIC both (NOTE: this is where the customer will need to do the most customization, see comment lines in green):

    ;– %MIS.USER.zcus.is.rs.M.config(“”)

    ;– Set /RSSERVER to the DNS name for your reporting server. This will be used to
    ;– dynamically build the URL to launch the reports.
    ;– Set /PREFIX to “https://” or “http://”, depending on your report server environment
    ;– Set the /PATHTOREPORT, Note, if this is exceedingly long, you may need to use more
    ;– than one array element

    ;– ED Dashboard
    “ED Dashboard”^/R.TITLE[1],
    ;– Pledge Form Download
    “Pledge Form Download”^/R.TITLE[220],

  15. File and translate your macro

NOTE: Customization by the customer for their environment is mostly done in the M.config macro, with the exception of copying and modifying the stub report for each individual SSRS report being ran.

Using template NPR to create stub reports for your SSRS reports

  1. Copy MIS.USER.zcus.is.rs.template to a unique name that identifies the report you are wanting to run out of SSRS, for example: MIS.USER.zcus.is.rs.ed.dashboard.
  2. Identify the ID number of the report to invoke. “1” in our example.
  3. In the new NPR, modify the title field to read
    1. For C/S: “_%(MIS)USER..zcus.is.rs.M..launch(1)_”
    2. For MAGIC: “_%MIS.USER.zcus.is.rs.M.launch(1)_”
  4. File and translate the new NPR
  5. Attach new NPR to user’s menu, which will allow them to run the SSRS report EDM_zcus_iatric_ed_dashboard from the Reporting Services server in their default web browser.
  6. Attach EDM.PAT.zcus.is.rs.ed.dashboard to user’s menus and they will now be able to execute the ED dashboard SSRS report from within MEDITECH.


  1. In this example we used MIS.USER as the template report DPM because MIS reports exist on every MAGIC segment. However both the template and the shell reports can be created in any DPM.
  2. MAGIC has a maximum line size of 250 characters. In practice, lines should not exceed 200 characters to leave room for overhead. Very long SSRS report paths can be broken into shorter segments and loaded into additional lines in the /URL array, as shown.

Extra Credit

★ Modify the control NPR (zcus.is.rs) to list the contents of the URL array in the Detail section of that report– then you can run that report and get immediate documentation of everything you have set up.

★ Make a variant of the zcus.is.rs and zcus.is.rs.template structure to run from a specific DPM (like BAR.PAT) – prompt for an account number using the MT prompt screen(s) – and then invoke an SSRS or Crystal Report passing that account number as a parameter: (Passing Parameters by URL for SSRS | Passing Parameters by URL for Business Objects ).

Visit our report library at http://www.iatric.com/Information/NPRReportLibrarySearch.aspx.

You can find additional Report Writing Tips on our website at http://www.iatric.com/Information/NPRTips.aspx, as well as information about our on-site Report Writer Training and Report Writing Services.

To subscribe for email notifications for new Report Writing classes, please follow this link:


For more information, please contact Karen Roemer at 978.805.3142 or email

This article originally appeared in the April 2015 issue of Iatric Systems Updates! newsletter.

April 23, 2015, 1:20 pm

NPR Tip: Save Trees and Charge for More ER Supplies

Joe Cocuzzo, Senior Vice President – Report Writing Services

MEDITECH MAGIC or Client/Server – Force a report to PREVIEW and show bar codes for scanning

A MEDITECH Magic customer recently asked us to produce a report that could show bar codes on the screen of all current ER Patients to allow Nurses to scan an account number code and then any supplies issued to the patient. Charging for the “patient issues” was being done by MM staff who would download the set of account number and item bar codes from the hand-held scanners a few times per day to create patient issue charges in MM.

The plan was to have a PC in the supply room setup to run an NPR report and produce output like this on all current ER patients, so bar codes could be scanned from the screen before item bar codes were scanned as chargeable supplies are picked up:

NPR Tip Image

We want a report that does the following:

  • Automatically outputs to PREVIEW (no print on prompt for user)
  • Creates a two column list of patients with bar codes

The first step is to build a report in EDM.PAT that gets current ER patients. We can just use the “tracker.patients.index”:

NPR Tip Image

We want to sort the patients by name and exclude the entries in the tracker index that represent empty rooms:

NPR Tip Image

Now we want to manipulate the report so that there is no “Print On” prompt for the user and the output automatically goes to PREVIEW.

Step #1 is to “imbed a program in the title.” To get the title for the report selection window, and to put the title of the report in the Page Header, the string in the report title is executed as a line of magic code. What this means is that we can imbed a program in the title, and that program will be executed as the selection screen is displayed to the user.

We just need to write a macro “as a program” (below we call the macro “d”), and imbed in the title surrounded by double quotes and underscores:

NPR Tip Image

In Client Server, the “internal” or “object code” name needs to be used, like this:

NPR Tip Image

The way to tell how the macro is named is to use the “List Object Code” option from process reports and check the name in the lookup box:

NPR Tip Image

Let me explain how you create the “d” macro so it is a program that both forces output to “PREVIEW” and gives your report a title to show for the selection screen window and to print in the page banner (if you have one).

The first thing to know is that a macro created to be a program needs to end with a semi-colon, and the last Magic expression before the semi-colon will be the value that the program returns.

So, if we want to have a “title macro” return “THIS IS THE TITLE OF THE REPORT,” we write it like this:

NPR Tip Image

With this macro imbedded in the title and no selections for the report, when we run the report we get this:

NPR Tip Image

To suppress the “PRINT on:” prompt and force the report to PREVIEW, we need to do two things in our macro; call the printer selection utility “Z.on.device” with a hardcoded printer selection of “PREVIEW” and then to set the /Z.SCHED.LOG flag, which will cause the report writer’s call to Z.on.device to do nothing.

While we are at it, we will change our report title to something a little less generic:

NPR Tip Image

Finally, we use a /DONE flag to set up the “d” macro so that the diversion to PREVIEW only happens once. Since the report title macro will run multiple times (when the selection screen displays, and then as each new page prints), we would have odd behavior if we tried to open to PREVIEW multiple times in the same report run.

The Client Server “d” macro is slightly different because the arguments to Z.on.device for C/S are different, with the device passed in as C vs E and using the D argument to suppress the dialog box to the user.

For reference when writing macros, it can be very helpful to use the F(4) “get” key in the macro editor to view the source code of a MEDITECH procedure.  The arguments are typically in comments at the top of the program.  In the example below, I copied these comments into my macro.

NPR Tip Image

The first time the macro runs “not done” or ‘/DONE is TRUE and the code in the IF statement runs and puts a value of 1 into /DONE. The next time the macro runs, ‘/DONE is false so the condition of the IF is not executed.

The apostrophe is the “not” operator. When used on a slash or permanent data structure or a variable, it returns a value (true) if the structure does not exist or if the variable is nil, and nil (false) if the structure exists or the variable has a value.

Now we have a report that goes directly to PREVIEW.

The next step is to set up the report to store the set of patients selected in a list, and print them out in two columns in the trailer.

Our report has no detail region, just a TR. Per each detail record, we store our patients using a bit of code in a footnote:

NPR Tip Image

The “tr” macro is going to run before the TR region gets printed.  What we need to do in the tr macro is to split our list of patients into a left column and right column.   In this report I decided to keep the columns in alpha order like this:

A         F
B         G
C         H
D         I
E         J

Rather than like this:

A         B
C         D
E         F
G         H
I          J

The size of the ER at the hospital for which I was writing was such that the entire set of ER patients would likely fit on one page of output, and I thought snaking rather than zig-zag made a better sort order.

The tr macro takes a structure build by the d footnote:

/LIST[1] = urn of first patient
/LIST[2] = urn of second patient
/LIST[3] = urn of third patient
/LIST[4] = urn of fourth patient

And makes it a list like this:

/DATA[1]|0 = urn of first patient /DATA[1]|1 = urn of third patient
/DATA[2]|0 = urn of second patient /DATA[2]|1 = urn of fourth patient

The steps are:

  • Get the last value for the subscript of /LIST (that is total record count)
  • Divide by 2
  • Loop through the entire /LIST
  • If you are in the first half of the list, put the urn into |0 of DATA[n+1^n]
  • If you are in the second half of the list, reset n back to nil and put the urn in |1 of DATA[n+1^n]. We use the “r” variable to track whether we have done a “reset” to start loading the right hand values.
  • Set n back to 1 as you start loading the second half

The actual macro looks like this:

NPR Tip Image

Why didn’t we just load the data into a couple of /MV arrays and build a trailer region that looks like this?

xx.mv1__________________________                     xx.mv2____________________
xx.mv1__________________________                     xx.mv2____________________

The problem with this approach is that we are looking for output where each field in the column can have different formatting:

NPR Tip Image

It is quite a nuisance to persuade fields loaded into an MV array to have a variety of characteristics. It is easier (I know – easier for me) to wrap a loop around a set of lines and set up individual fields and use field characteristics to make 1 bold, another a bar code, etc.

The looping code goes through our /DATA[n] structure and puts the left hand column urn into the variable LEFT and the right hand column into the variable RIGHT and then we can set up computed fields like this:


Or for the bar codes:

Here is the ECB-ECE looping code:

NPR Tip Image

Some further explanation for the diehard programmer-wannabes:

The looping is “next get” syntax, which allows you to loop through a data structure and put the value of each node into a variable in a single + operation.

So this:

Is the same as:

This expression:

Takes the zeroth piece of DATA and puts it into the variable LEFT and the 1th piece of data and puts it into the variable RIGHT

It works like this:
Or even:

All give you this:
And you can do this:
And then A = “FIRST” and B= “SECOND”

So now we have a report that runs like this (Magic example shown, C/S is similar):

NPR Tip Image

And (here shown with a page banner) has output like this:

NPR Tip Image

Sample reports for C/S and Magic named EDM.PAT.zcus.is.bar.code.page have been loaded to our Report Library.

Visit our report library at http://www.iatric.com/Information/NPRReportLibrarySearch.aspx.

You can find additional Report Writing Tips on our website at http://www.iatric.com/Information/NPRTips.aspx, as well as information about our on-site Report Writer Training and Report Writing Services.

To subscribe for email notifications for new Report Writing classes, please follow this link:


For more information, please contact Karen Roemer at 978.805.3142 or email

This article originally appeared in the April 2015 issue of Iatric Systems Updates! newsletter.

April 22, 2015, 5:17 pm

Update on Meaningful Use Audits and Stage 3

Kay Jackson, Manager, Software Certification, and Compliance

Meaningful Use Audits Mean Double Trouble
Just when you started to think you were safe from MU audits, the Office of the Inspector General (OIG) released their Work Plan for 2015, and included their plan for Meaningful Use Audits. As a reminder, Congress recently requested more oversight on Meaningful Use Payments, so both the OIG and Figliozzi & Company will now be preforming MU audits.

The OIG audits will occur nationwide, across a random sample of providers that have received incentive payments for achieving “Meaningful Use” under the Medicare Electronic Health Record (EHR) Incentive Program from January 1, 2011 to June 30, 2014. In contrast, audits performed by Figliozzi & Company will only focus on a single reporting period. For more details please go to the Work Plan and refer to pages 74-75.

As you may know, many Eligible Providers were audited in Q1 2015 with Pre-Payment Meaningful Use Audits. To date, CMS is reporting 651 Meaningful Use Audits with a failure rate of 4.7%. All of our Iatric Systems Meaningful Use Manager customers who have been audited to date have achieved a 100% pass rate.

We have yet to hear of any Stage 2 EH or CAH audits, but when we do, we will post on our Meaningful Use iForum. To avoid the stress that comes with a potential audit, and ensure sites have the proper documentation before being audited, our Professional Services team offers a Meaningful Use Mock Audit service. Contact Cindy Paul at Cindy.Paul@iatric.com for details.

Meaningful Use Stage 3:
I finished reading the NPRM for Stage 3 (all 301 pages) in one long day. If you plan to attend International MUSE (The MEDITECH User Group conference, to be held on May 26-29), I will present an overview of the NPRM in the educational session Meaningful Use Stage 3 – How You Can Succeed. The final regulation is due late summer. We are still waiting for the spring announcement regarding the 2015 reporting period change, but we’ll keep you informed as soon as the final decision is released.

P.S. Our first Meaningful Use Manager customer recently received an OIG Meaningful Use audit.

This article originally appeared in the April 2015 issue of Iatric Systems Updates! newsletter.

April 22, 2015, 5:15 pm

Life and Energy in Chicago

Jeff McGeath, Senior Vice President

The 2015 HIMSS event is now in the books. There are many adjectives to describe a power-packed week of HIMSS. If I had to choose one, it would be “Invigorating.” Merriam-Webster defines invigorating as “to give life and energy to someone/something.” Let me explain why the week was invigorating, by telling you about what we shared.

Our HIMSS week was full of highly valued conversations with existing customers and emerging new customers. We were able to talk about our new offerings of HealthPulse, Bi-directional smart pump programming, and emerging topics such as FHIR and Analytics.

HealthPulse is an exciting new offering from Iatric Systems that has (at least initially) been developed for the Apple iOS platform to engage and connect patients with their healthcare data. Think of it as a patient portal experience in your hand! This application allows you to manage encounters at multiple hospitals, provides “authorized representative” access as recently announced by the MU3 proposed rule, and helps you meet very aggressive Secure Messaging and View/Download/Transmit metrics defined by the proposed MU3 rule. With access to patient-generated data via Apple HealthKit integration, it becomes a valuable solution for a hospital looking to address MU3 Objectives 5, 6, and 7.

Smart Pump integration and bi-directional pump programming are topics that Iatric Systems has been working on and have been tested at the annual IHE Connectathon event the last three years. At this year’s event, we had smart pump vendors coming to us to discuss plans and individual strategies to get their pumps operating at full feature strength in the hospital EMR. The MEDITECH community was of special interest to them. That community holds a dear spot in our hearts too! We were excited to be approached by a couple of sites that committed to undertake a smart pump programming project with us. This is the year that the ultimate workflow integration we have designed for smart pump customers will make its debut in facilities across the country. Contact us to get on that list.

FHIR and Analytics were buzzwords at the show this year, and for good reason. With the industry racing down the rails to fee for value models, both technologies will be major contributors. We are excited about our offerings in these two areas. We will be discussing FHIR in depth at the upcoming MUSE conference and showing some of our FHIR platform. The Analytics space is full of vendors with unique tools and approaches to sell, but as an integration company with system interoperability built into our DNA and already in place at over 1000 healthcare systems, I think you will find our Actionable Analytics approach something that is just a natural extension of what you may already own from Iatric Systems.

We had many more conversations and topics of interest with customers at HIMSS this year; ranging from old stalwarts like Visual Flowsheet to Patient Privacy solutions led by KLAS Category Leader Security Audit Manager. Our extremely high-growth Professional Services offerings were another topic that resonated given our customer’s increasing need for support in researching, evaluating, and implementing new healthcare technology.

The great conversations we had and the excitement we saw in attendees eyes had our whole team saying things like “I’ve never felt this good on the last day of HIMSS!” And that is what I call invigorating.

This article originally appeared in the April 2015 issue of Iatric Systems Updates! newsletter.

April 22, 2015, 12:33 pm

HealthsystemCIO.com: Anne Lara, CIO, Union Hospital of Cecil County, Chapter 2

Call it history repeating itself. In the fall of 2013, Anne Lara and her team were knee-deep in plans to become one of just two organizations (at the same) to migrate to Meditech 6.1. A year and a half later, Union Hospital of Cecil County is at it again, paving the way by going live with Meditech’s scribe functionality. In this interview, Lara talks about what it takes to be an early adopter, the biggest hurdles with attesting to stage 2, how her team is partnering with DataMotion to enable direct messaging, and the complexity of HIE when you closely border two states. She also discusses the culture change needed to increase patient engagement, her key concerns as CIO, and why she feels “very positive” about where the industry is headed.

Chapter 1

Chapter 2

  • Success of CRISP — “They listen to the folks that are doing the work on a daily basis.”
  • Preparing for ICD-10 & computer-assisted coding
  • Improving workflow — “It can be very labor intensive”
  • “Fragmented” portals
  • Working with AT&T and Vivify to create Bluetooth-enabled kits
  • “It has to be a clinical-IT partnership.”

Read more or listen to the podcast at healthsystemCIO.com.

April 20, 2015, 10:45 am

Rotherham updates Meditech

The Rotherham NHS Foundation Trust has upgraded its Meditech electronic patient record system to version 6.07, three years after the troubled implementation of its predecessor.

The upgrade was completed early last month and the trust now plans to implement Meditech’s electronic prescribing and medicines administration module by April 2016.

A spokesperson for The Rotherham told EHI News that the EPR is now stable.

The trust’s initial deployment of Meditech in 2012, as part of a £21 million upgrade of its clinical systems, ran into serious difficulties.

Read more at ehi.co.uk.

April 17, 2015, 9:39 am

Produce MEDITECH Data Repository (DR) reports quickly, today

You know creating MEDITECH DR reports can be challenging.

Register now for this live webcast. You’ll see how DR Resource Center™ serves as a central location where you can access a wealth of DR assistance for any platform (6.1, 6.0, C/S, or MAGIC).

Tuesday, April 21, 2015, 2:00 p.m. ET
Wednesday, April 29, 2015, 2:00 p.m. ET
You’ll see that DR Resource Center provides:

  • Microsoft SQL™ Views and Stored Procedures
  • A Library of SSRS Reports
  • A Library of Lookup Parameters
  • A Toolkit of SQL Functions
  • Training Videos and Documentation

Come to this webcast to learn how you can have a wealth of DR reports at your fingertips, quickly.

To learn more about DR Resource Center, visit our website.

April 16, 2015, 12:49 pm

St. Mary’s Healthcare System for Children Selects MEDITECH Home Health for Optimal Integration

As one of the nation’s leading providers of pediatric post-acute care and the largest provider of long-term care for children with complex medical conditions in New York State, St. Mary’s Healthcare System for Children (Bayside, NY) needed a home care product that could complement the advanced functionality of their EHR.

Given the smooth workflows and inherent integration they’d experienced with their MEDITECH inpatient system, it wasn’t surprising when the organization decided to go with MEDITECH’s Home Health solution.

But don’t take our word for it: here’s what St. Mary’s leadership had to say about their choice.

“Our patients regularly transition from the inpatient setting to home care, so continuity of care and information accuracy is very important. With MEDITECH’s complete integration, we know that our patient data will always be correct and up-to-date.” - Ken Kupetsky, VP/CIO

Read more at meditech.com.

April 15, 2015, 12:58 pm

Houston Healthcare Expands with the Times, and with MEDITECH’s Web Ambulatory

Houston Healthcare (Warner Robins, GA) started out as a 50-bed hospital back in 1960. But today, the organization serves approximately 300,000 patients and consists of seven distinct facilities—including the 237-bed Houston Medical Center, a surgery center, a rehab clinic, and a cardiac institute.

With services stretching across the continuum, Houston needed a sophisticated EHR that could give providers a complete picture of their patients, integrating data from all care environments. So they decided to expand their successful long-term partnership with MEDITECH, and adopt the new 6.1 Web Ambulatory solution.

Read more at meditech.com.

April 13, 2015, 4:13 pm

Nineteen Hospitals Reach HIMSS Analytics Stage 7 Using MEDITECH’s EHR

Using MEDITECH’s EHR, 19 hospitals reach the highest level of the HIMSS Analytics EMR Adoption Model (EMRAM), including the first hospital in Canada and first Behavioural Health hospital in the world to achieve Stage 7, Ontario Shores Centre for Mental Health Sciences.

MEDITECH, the electronic health record (EHR) vendor chosen by more than 2,400 healthcare institutions globally, is pleased to announce that 19 hospitals have reached Stage 7 of the HIMSS Analytics EMR Adoption Model (EMRAM) using its EHR.

In order to reach Stage 7, internationally accepted as the highest industry standard of sophisticated EHR use, healthcare organizations must have “a complete EMR; CCD transactions to share data; Data continuity with the ED, ambulatory, and OP” and have met the previous six stages’ requirements, including physician documentation, closed loop medication administration, CPOE, Clinical Decision Support protocols, and nursing flowsheets.

Read more.