create meditech meaningful use reports in a single step · this method will benefit any meditech...

7
MEANINGFUL USE ANALYTICS EHR MANAGEMENT CLINICAL INFORMATICS DATA & INFORMATION MANAGEMENT Transforming healthcare, one patient at a time. White Paper This method will benefit any MEDITECH hospital using standard SQL reports recommended by MEDITECH’s ARRA Best Practices. The “how to” guide for all MEDITECH Meaningful Use reports CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Upload: doanhuong

Post on 10-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

MEANINGFUL USE

ANALYTICS

EHR MANAGEMENT

CLINICAL INFORMATICS

DATA & INFORMATIONMANAGEMENT

Transforming healthcare, one patient at a time.

White Paper

This method will benefit any MEDITECH hospital using standard SQL reports recommended by MEDITECH’s ARRA Best Practices.

The “how to” guide for all MEDITECH Meaningful Use reports

CREATE MEANINGFUL USE REPORTS

IN A SINGLE STEP

Page 2: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

EXECUTIVE SUMMARYThe process of creating ARRA Meaningful Use (MU) reports is often time-consuming and tedious. This paper explains how a simple batch file can be used to run all of the reports and create the delimited text output automatically. This method will benefit any MEDITECH hospital who use the standard SQL reports that are distributed by MEDITECH via their corporate website, under the “ARRA Best Practices” section (excluding the 2016 CQM reports). While the focus of this white paper is on the MU reports, the techniques used in this report can easily be adapted to generate other SQL Server based reports and extracts.

BACKGROUND

Most hospitals generate MU reports on a regular, sometimes weekly, basis. This task is frequently performed by an analyst running each report individually in SQL Server Management Studio (SSMS) in order to create a delimited text file. The file is then imported into programs like Microsoft Excel for reporting and analysis. This process typically requires several hours of the analyst’s time. Occasionally, key hospital decision makers experience delays receiving crucial reports because the analyst is not available.

REQUIREMENTS

The primary tool used for this method is the SQLCMD utility which is provided by Microsoft for free. It is included in many builds of SQL Server Management Studio, but can also be obtained as a stand-alone program, part of the Microsoft Command Line Utilities for SQL Server utility, using this link: https://www.microsoft.com/en-us/download/confirmation.aspx?id=36433.

The user also needs the appropriate access rights to the MEDITECH Data Repository live database using either the users Windows user account (trusted connection), or a local SQL Server user account. The user should also have Read and Execute permissions for the Cmd.exe file, which is usually located in the Windows\System32 folder. Some versions of Windows may require that the “Run as administrator” option be used when executing the batch file.

A decent Text Editor is also recommended in order to make the initial setup and configuration of the batch file easier. While the standard Windows Notepad can be utilized, it is recommended that a more powerful text editor like the free Notepad++ that can be downloaded from: https://notepad-plus-plus.org/.

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Page 3: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

SQLMD

The key to the method detailed in this paper is the SQLCMD utility. SQLCMD allows SQL Server commands to be run from the Windows Command Line, and thus can be very useful when used in a batch file. This paper will demonstrate how to define the SQL Server environment the reports need to run in, how to setup the local parameters the reports need to run, and how to define the list of reports that will be run.

There are many tutorials available on the internet that describe how to use the SQLCMD utility. There are also many ways the utility can be used, and a large set of command line variables available to fine-tune the way the utility works. The method described in this paper is based on gathering user defined variables and using them to build an SQLCMD string for each report.

The final string for each report will be similar to the example below once the variables are gathered and inserted into the string. sqlcmd -S <dr server> -d livedb -U <user> -P <password> -Q “<report name> @FromDate = N’<from date>’, @ThruDate = N’<thru date>’,@Debug = N’Y’, @Audit = N’Y’, @EnvironmentID = N’CONFIG1’” -s “|” -o “c:\ReportName.txt” -W

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Page 4: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

THE BATCH FILE

The complete code, demonstrated here, is available on the HSi website. Please copy and paste this code into your text editor at this time.

The batch file needs to be setup initially with the values unique to the hospital’s environment. There are three groups of settings that need to be configured: the overall environment parameters, the report specific parameters, and the list of reports to run.

1. The Environment Parameters

This is where the configuration of the MEDITECH DR Server and the desired output format of the text file are set up. Enter the name or IP address of the DR Server. Please note that if the IP is used, then the DR Server instance needs to be setup to allow TCP/IP connections using the SQL Server Configuration Manager. TCP/IP connections are not allowed by default.

Also enter the value for the existing path where the output files should go. The “output_ext” variable specifies the file extension to use for the output files. Finally, specify in quotes the delimiter that should be used in the output files to separate the data fields in the output text file.

In the example code, the batch file is going to use the DR Server located on the users network at IP address 192.168.1.156. The data for the MU Reports is being stored in the DR Database named “livedb”. The output files will be written to “C:\MU_Files” as a plain text “.txt” file. The pipe or “|” character is used as the delimiter.

TIP: When assigning variables, always be sure there are no spaces after the equal signs.

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Page 5: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

2. The Report Specific Parameters

These are the parameters standard MEDITECH MU reports require in order to run. The dates may be hard coded, or if no value is provided, then the script will prompt for the date values. Many sites prefer to always use the same starting date, and update the end date each time the reports are run. If that is the case, hard code the “fromdate” variable with the starting date, and leave the “thrudate” variable blank. The user will be prompted for this date when the batch file is run.

The “debug” parameter specifies whether to display the record level detail of the data comprising the report. This should normally be set to “Y”. If the “audit” parameter is set to “Y”, a copy of the records will be saved to the DR audit tables for later retrieval if needed. The “environment” parameter corresponds to the EnvironmentID column in the CoreMenuReportConfiguration table.

Please consult MEDITECH’s documentation on their corporate website, under the “ARRA Best Practices” section, if there are any questions about which settings to use here.

Please consult MEDITECH’s documentation on their corporate website, under the “ARRA Best Practices” section, if there are any questions about which settings to use here.

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Page 6: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

3. The Report List

The final setting to configure is the actual list of reports to be included when the batch file is run. The naming convention should follow the exact name of the stored procedure that is used to run the report. For most hospitals, this list will include a set of Core Reports and several sets of CQM reports. In order to make this process as convenient as possible, the list can be broken up and placed into their own groups. The most important thing to note is that the report list should ultimately be defined in the “reports” variable.

For example, a group called “cqm_stk_reports” could be defined with all of the reports that pertain to the CQM reports dealing with STK. Then another group named “cqm_vte_reports” could be defined for all of the VTE CQM reports. If both of these groups need to run, then set the “reports” variable to include both groups by the line “SET reports=%cqm_stk_reports%,%cqm_vte_reports”.

The reports variable can also be used to specify a specific report or reports by name. For example, the line “SET reports=mtzcus_2014_ActiveMedList,mtzcus_2014_AdvanceDirective” tells the batch to only run those two specific reports.

4. Save the Batch File and Run

After all of the variables are set up, save the file with the extension “.bat” and run either from the Windows Command Line or by double-clicking the file. The utility will loop through each report on the list and run the SQLCMD utility for each one. The output will be generated in the specified format in the specified folder.

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

Page 7: Create MEDITECH Meaningful Use Reports in a Single Step · This method will benefit any MEDITECH hospital using standard SQL ... for all MEDITECH Meaningful Use reports ... rights

Health Systems informaticsBainbridge Island, WA • Knoxville, TN • Salt Lake City, UTwww.hsi-corp.com • (641) 715-3900 Ext. 320604# • [email protected]

AUTHORMatt Blackwell

Senior Healthcare Technical ConsultantHealth Systems informatics (HSi)

ABOUT HSi

Health Systems informatics (HSi) is a healthcare consulting and solutions firm focused on delivering high quality consulting and support services that enable healthcare organizations to select, implement, manage and optimize the right information technology applications and systems to yield and maintain best practices. We remain focused on providing value-driven results in strategic services, clinical informatics, healthcare information and analytics, EHR implementation, system and process optimization, meaningful use strategy and execution, project and change management, population health management, and value management services. Built on a foundation of robust, diverse, healthcare talent and a “clients as partners” business philosophy, HSi provides value and support in today’s ever-changing healthcare market. For more information, visit hsi-corp.com.

Follow HSi

CREATE MEANINGFUL USE REPORTS IN A SINGLE STEP

FOR MORE INFORMATION

(641) 715-3900Extension 320604#

[email protected] hsi-corp.com

©2016 Health Systems informatics. All rights reserved. Doc-11-0013-AA

5. What Now!

The report that is generated in the output folder is readable and adequate on its own as a report, but delimited text files are very easily imported into more popular and easy to work with products such as Microsoft Excel. That import process can also be simplified down to a single step. If you would like some help with this feel free to reach out to HSi and we can get you set up, as well as help you identify other ways that you can streamline and optimize your day-to-day MEDITECH operations.