Ad Hoc Reporting for MEDITECH NPR Data Definitions
MEDITECH fields, at times, can elude even experienced NPR Report Writers. Let's review a quick way to find them using an unlikely technology for this task: SQL Server.
To produce unique lists of DPMS, SEGMENTS, & FIELDS from your MEDITECH Data Definitions, load them into a SQL Server database and then run ad hoc SQL queries against them. Today, I want to show you how to use SQL Server to: De-duplicate a list, Find fields by DPM, & Learn about fields that compile to the same object code.
Let's get started.
[De-Duplicate a List]
Want a list of DPMS from your MEDITECH Data Defs? Try a query like this in SQL Server.

One problem, you'll notice is that the list of 140K+ rows is not unique. To de-duplicate the list, you could add a GROUP BY clause.

Or if you prefer a standardized method of de-duplicating the list, try the SQL Keyword DISTINCT.

The record count of 1894 rows is the same for our data set here, for either approach you use.
[Find Fields]
Looking for a field containing the letters 'drg'? Want only fields from BAR? Add a WHERE clause for DPM and FIELD.

[Fields Compiling to Same Local Variable]
How many fields share the local variable for ADM.PAT.urn? In CS 5.5 about: 243, depending on which MEDITECH modules you have installed.

Which MEDITECH applications contain a reference to 'aa' the local variable for ADM.PAT.urn? Depending on the MEDITECH modules you have installed, about: 21.

Now when you're having trouble finding a field, this approach might help you find it.
Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!