Report Writing

Interoperability and HIE

Regulatory and Compliance

Medical Device Integration

Patient Privacy


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

SQL + SSRS Tip: Avoid Trouble with DATETIME, DATETIME2 in SSRS Reports

In the MEDITECH report writing world, an old, old “gotcha” for database programmers is to write a report query that selects by Discharge Date, and then when the end-users run the report, they eventually realize that they are only getting patients discharged on the last date of the report range at exactly midnight.

Read More

NPR Tip: Custom Dictionary Lookups in NPR Reports

Teach a man to fish… One of my staff needed to create a custom lookup in a MEDITECH NPR report to show the "mapped from" and "mapped to" values for a particular BAR.CLAIM map, and he asked me, “Have you ever done that?”

Read More

SQL Tip: Using MEDITECH Date Mnemonics in SSIS

One of many nice things about the MEDITECH system is the availability of date mnemonics that you can use, either when running reports interactively, or when scheduling them. But this functionality is not available in SQL Server Reporting Services (SSRS) or in SQL Server Integration Services (SSIS) by default.

Read More

SQL Tip: How to Remove MTDD-style Formatting from TextLines

This example is based on how discharge text data is formatted in the MEDITECH MAGIC Data Repository (DR).

In the continuing saga of trying to recreate patient discharge instructions from the DR, I discovered that among the complications is detecting where line breaks should actually go.

Read More

Summer Webinars: Tips n Tricks, 6.1 Reports Migration, and More

At International MUSE in May, our report writing educational sessions were a hit once again. We presented two sessions:

  • NPR and Report Designer Tips n Tricks
  • 6.1 Reports Migration
Read More