Report Writing

Interoperability and EHR Optimization

Privacy and Security

SQL Tip: Using a Date Dimension Table to Calculate Patient Days by Location

A very useful tool to have in your Data Repository toolbox is a Date Dimension table — which is a physical database table with one row per date from, say, 1900 through the end of 2499, and key elements pre-calculated about that date.

Read More

SQL Tip: Wrangling the SurCase_DocQuestions Table in MEDITECH 6.1


If you’ve been working with clinical documentation in the new SUR module in MEDITECH 6.1, you may have found that surgical interventions, assessments, query responses, and some standard fields are captured in this table:

Read More

Summer Webinars: Data Repository, NPR, 6.1 Reports Migration, and More

We’re pleased to offer several MEDITECH Report Writing webinars this summer, free to hospital employees. Register to attend any or all these presentations from the comfort of your own office on the dates noted below. Scroll down for registration links and a description of each webinar:

  • NPR and Report Designer Tips & Tricks
  • 6.1 Reports Migration
  • Make Data Repository Reports More Attractive & Functional
  • DR Resource CenterTM Demonstration
Read More

SSRS Tip: Control the Execution Order of SSRS Datasets

It may not be obvious when working in SQL Server Data Tools or Business Intelligence Development Studio, but when you add datasets to a SQL Server Reporting Services (SSRS) Report, they get an implied order of execution. Say you have a MEDITECH EDM dashboard, and it has some datasets that control parameter lists, and then two datasets that call stored procedures to get patient data and calculate median timings:

Read More

SQL Tip: Checking for Invalid Provider NPI Numbers


Most, if not all of us involved in US healthcare are familiar with the National Provider Identifier (NPI), which is a 10-digit number starting with a 1 or a 2. Each NPI uniquely identifies a specific provider. The provider can be a person or organization. NPIs are used and embedded in billing and claims workflows.

Read More

SQL Tip: Finding Lab Test LOINC Code Values

Like ICD-10 diagnosis and procedure codes, LOINC codes offer a platform-independent way to identify medical laboratory observations. Within MEDITECH’s LAB module, LOINC codes are set up as a “nomenclature” — a code describing another code — or in this case, a LOINC standard code is mapped to each LAB test in the appropriate dictionary.

Read More

SQL Tip: Checking for Duplicate Indexes

One of the few custom objects you want to add to your MEDITECH LIVE or TEST Data Repository (DR) databases are indexes. An index can speed up reporting by fetching records based on specific fields, like Service Date. MEDITECH themselves release only a few indexes, mostly focused on Meaningful Use reporting.

Read More

SQL Tip: Parsing Packed Fields in MEDITECH 6.x

It's common in MEDITECH’s 6.x Data Repository (DR) to encounter fields in PCM or EMR where a single long text field contains a packed data structure. For example, when a multi-select item has been stored with a variety of delimiters and special formatting. If you haven’t run across these fields before, here’s an example from EMR where we’re looking at the Discharge Problem field, which is a standard field attached to a documentation section for Clinical Impression:

Read More

SQL + SSRS Tip: Get the Data Structure of a SQL Command


This tip works if you are using SQL Server 2012 or better (Compatibility Level 110 and up). So before we get into the tip, check your Data Repository to see if you can use this tool:

Read More

SQL + SSRS Tip: Time Blocking

Wait, what is “time blocking”?

It’s generating a list of start and end dates/times in a result set, and then using that set of rows to do something else, like:

  • Generate a set of extract files for a vendor, with one set of files per time block line.
  • Count visits or patients seen in each time block line, even if there are no visits in the time period.
  • Look for clinical documentation that wasn’t done when it was supposed to be done.
  • And so on…
Read More