Has anyone created a EER (Data Modeling) Diagram for OpenEMR? I am trying to get a feel for the
relationships between the tables. I wondered whether anyone had all ready built one before I side
tracked off to building one with some thing like MySQL Workbench.
Thanks for your attention to this matter,
Greg Porter
I’ve loaded the schema into workbench, and it’s too much data to really be useful, plus there aren’t defined foreign key constraints that can really help you understand relationships.
However, key tables to understand off the top of my head
patient_data
forms
form_encounter
form_* (the other forms tables. the form_encounter is special because of the encounter column used in the forms table
lists
users
postcalendar_events (not it’s exact name…)
the ID column in patient_data is referred to in many other tables as PID (to identify which patient the data belongs to) again, no formally defined foreign key constraint, but it’s treated that way.
codes and code_types are kind of useful too.
Another way you might explore is to just “do stuff” with your installation (create patients, encounters, etc…) and then inspect the log table. The log table is the “audit log” generated by OpenEMR and you should be able to see which tables it accesses and updates that way.