How to Learn Meditech Architecture?

1,115 views
Skip to first unread message

Mo

unread,
Jan 17, 2012, 4:21:58 PM1/17/12
to DR - Data Repository
I'm trying to understand the Meditech architecture to begin writing
SQL SSIS and SSRS jobs out of the Data Reposity. Are there any
documents on the Meditech site that address this issue? How did you
learn it? Does anyone have SQL Server or MS Access relationships
already mapped?
Thanks! I am new to Meditech but lots of experience developing
databases.
Moe

Lizard Of Oz

unread,
Mar 20, 2012, 4:03:42 PM3/20/12
to dr---data-...@googlegroups.com

Sorry if this is a duplicate post, but my previous reply never did appear ...


We are running Meditech C/S 5.64.21

 

In a separate database (named dba) which I created on the same SQLServer as livedb, I created the following view which has helped me identify where data is.

 

Sadly, there are no foreign keys in the schema since all data integrity is supposed to be assured within the Meditech application/module

 

View uses three tables, the obvious two (SysDrTables and SysDrColumns) as well as SysStorage which contains number of rows by table by date. This table adds a row for each DR table each day.

 

I don't really know of any quick way of becoming familiar with the schema except to locate equivalent data pointers in Meditech using Shift-F9. This will show the NPR as well as the DR identifiers.

 

Understanding a little about the Meditech processes themselves also helps. In the end, trial & error methodology along with a lot of persistence and some of the examples from Meditech's DR Repository and their ARRA Stage 1 measure queries. Note that the ARRA queries may not reflect your specific architecture/processes.

 

create view [dbo].[pmap] as

select

  t.Name tablename,

  c.Name columname,

  c.DataType + '(' + rtrim(convert(char,c.Length)) + ')' datatype,

  c.ColumnPosition colpos,

  case c.SortKey

    when 0 then ' '

    else rtrim(convert(char,c.SortKey))

  end sortkey,

  t.Keylevel tabletype,

  DataPages dpages,

  IndexPages ipages,

  RowsRW trows,

  t.Application _app,

  t.TableID _tableid,

  c.NprDpm _dpm,

  c.NprSegment _segment,

  c.NprElement _element

from

  livedb..SysDrTables t

join

  livedb..SysDrColumns c on t.TableID = c.TableID

join

  livedb..SysStorage s on t.TableID = s.TableID

and

  DateTimeID = (

    select

      max(DateTimeID)

    from

      livedb..SysStorage)

BRHS_DBA-Programmer

unread,
Apr 4, 2012, 6:47:39 PM4/4/12
to dr---data-...@googlegroups.com

Hi everyone, I’m happy to find a Meditech Dr group for people working with SQL tools out of DR data.
I have two years experience in Meditech and many as programmer.
I agree is frustrating to find out that there are not foreign keys or table relations in any way, and a common practice is to use the “Shift-F9” (Shift-F8 in Magic) shortcut to find out what table/field we need to use.
I created a couple of stored procedures that help me to find what I’m looking for.

The first I called “BRHS_FieldSearch” It receives two parameters @String and @Module
@String it receive a fragment of the name of the field I’m looking for.
@ModuleL it receive a coma separated list of the Modules (Applications) that we want to be search (e.g., 'adm,abs,rad')
(a list of Applications can be obtained by running “Select DISTINCT a.Application FROM SysDrTables AS a ORDER BY a.Application”)
Example: If you execute...
EXECUTE Livendb.dbo.BRHS_FieldSearch 'discharge','adm, abs'
The result will be 1061 rows with:

 

Most the columns are self explanatory;
CP column is the column position of each column, I find it useful for .Net programming
K column is the Sort Key, If the column is not part of the key I fill it with XXX (couldn’t find other logic for sorting proposes)
X (Mark the spot) Column will be fill with an X if the column description is LIKE the @String parameter.
 
Note: If you execure: EXECUTE Livendb.dbo.BRHS_FieldSearch '','' it will return all tables with all fields (71,911 rows for me)
In order to “BRHS_FieldSearch” work you will need first to add a Table valued function named “BRHS_SplitList”
The second (I will post it later...)

 

BRHS_SplitList.sql
BRHS_FieldSearch.sql

Healthsec

unread,
Apr 9, 2013, 5:45:56 PM4/9/13
to dr---data-...@googlegroups.com
Dear Friends,

We have Meditech 5.6 and are moving to 6.1 in few months; do any of you have experience or scripts to pull audit log information from either version?
Please advice. 

Regards.

Jean Pierre Chabot

unread,
Mar 2, 2022, 9:40:12 AM3/2/22
to DR - Data Repository
I am also glad to find this group. I am new to both SSRS, SSIS, SSMS and Meditech. Am in the process of acquiring credentials to access our facility's SQL Server for DR. I happened upon a couple of resources that might be helpful:
Reply all
Reply to author
Forward
0 new messages