Blog

Data Repository System Tables

Using DR metadata tables to locate the data you need

Read
Blog

Topic:

Blog

Industry trends, regulatory updates, and expert perspective on the MEDITECH ecosystem.

TL/DR

MEDITECH provides system-level metadata tables that help report writers locate data in the Data Repository by mapping application-level structures to SQL tables and columns.

  • NPR platforms use DrTableMain and DrTableColumns in livedb; M-AT platforms use DrTable_Main and DrTable_Columns in livefdb
  • Basic T-SQL queries against these tables let you search by table name, column name, or NPR/M-AT components

MEDITECH's DR system tables map application data to SQL columns, helping report writers quickly find the right tables and fields.

Article content

How do I find data in the MEDITECH Data Repository?

Many new DR report writers struggle locating data in the DR due to unfamiliarity with database table and column naming conventions. MEDITECH provides tools within applications and system-level tables for NPR and M-AT platforms to help identify table and column data.

For NPR-based systems (MAGIC, C/S and 6.0x), there are DrTableMain and DrTableColumns tables. These provide information about which MEDITECH NPR DPM, segments and elements populate tables and columns in the NPR side (livendb) of the Data Repository. You'll find these in livedb, livemdb and livendb. (Note: original system tables named SysDrTables and SysDrColumns may still exist and contain valid data, but may be outdated.)

For M-AT systems (6.1x and Expanse), DrTable_Main and DrTable_Columns tables provide information about M-AT objects, records and fields related to SQL tables in the livefdb database.

Understanding MEDITECH Data Storage

Each NPR or M-AT application functions like a file cabinet with drawers representing DPMs (NPR) or Objects (M-AT). Opening drawers reveals folders representing segments or records, equivalent to database tables. Individual sheets represent data elements or columns, fields from DR tables.

Finding Data in SQL Server Using DR System Tables

Basic TSQL queries can locate tables and columns by searching by name, NPR DPM/segment/element, or M-AT object/record/field.

For NPR queries, you can search the DrTableMain and DrTableColumns tables in livedb to find which tables contain a specific column. For example, searching for "AccountNumber" reveals it exists in AbstractData, AdmVisits and BarVisits. (Join tables within the same application when possible.)

For M-AT queries, search DrTable_Main and DrTable_Columns in livefdb. For example, searching for REG application tables containing "AdmitDate" reveals RegAcct_Main likely contains admission date information.

Using DR metadata helps identify tables and columns quickly, making Data Repository reporting more efficient.