Explaining the OpenMRS Database Schema and On-Line Documentation Resources
There are three main resources that describe the OpenMRS database schema and tables:
- The OpenMRS Data Model:
- A png Image version of the OpenMRS Database Tables:
- A Browse able repository of the OpenMRS 1.11 data model (essentially the same as the 1.12 model):
There are three resources posted on the CSE4701 web page:
- A PPT of OpenEMR schema:
- A PPT Poster OpenEMR schema:
- A MySql Workbench mwb file:
The OpenMRS Data Model ( has a set of domains that organize the database tables in terms of the various information and also usage of the system. The domains are:
- Concept:Concepts are defined and used to support strongly coded data throughout the system. For example, weight in kilograms is a concept associated with a patient’s weight while blood type is a concept that has four values A, B, AB, and O.
- Encounter:Contains the meta-data regarding health care providers interventions with a patient.For example, this is what a medical provider sees a patient at a location and data is captured. A patient that visits a medical provider office would have multiple encounters: checked in for appointment, seen by a doctor, medications dispensed by pharmacy at the location.
- Form:Essentially, the user interface description for the various components.
- Observation:This is where the actual health care information is stored. There are many observations per Encounter.For example, Observations are related to Concepts and are related to specific points in time. A child has an observation at each well-care visit that includes: height, weight, and head circumference; this observation is unique for each encounter.
- Order:Things/actions that have been requested to occur.For example, a doctor order blood test, X-ray, MRI, EKG, prescription, etc., are all orders.
- Patient:Basic information about patients in this system.For example, anyone that receives care and there is a unique patient identifier (patient_id) – patients have encounters where observations are recorded and actions are ordered.
- User:Basic information about the people that use this system.
- Person:Basic information about person in the system.
- Business:Non medical data used to administrate openmrs
- Groups/Workflow:Workflows and Cohort data
The Data Information Model ( explains all of these different domains. This includes other information that is tracked for a patient such as:
- Allergy Lists including the allergen, reaction, severity, etc. which is managed separately from Observations: observing an allergic reaction to a drug does not automatically add an Allergy to the list. Unlike an Observation (which happens at one moment in time), an Allergy is longitudinal data, with start and end dates.
- Problem Listsis managed separated from Observations: observing that the patient has "Diagnosis Present = Diabetes" does not automatically add a Problem to the list. Unlike an Observation (which happens at one moment in time), a Problem is longitudinal data, with start and end dates.
- Drug table is utilized to represent the medications that a patient is taking, including past, current, and over the counter; these are drugs provided by any medical provider that a patient has seen. Drug orders are used to capture the new prescriptions that are given to a patient by a medical provider; there is no separate medication table.
- Locationsfor the different offices at which the patient is seen.
The Browse able repository of the OpenMRS ( is utilized to a allow you to jump between the different tables via embedded html links that connect the primary keys of tables to foreign keys in other tables. Examples are show below.