deschel wrote on Thursday, July 19, 2012:
Overview
Storing and managing contact information is an important part of a medical practice. Most medical practices need to track contact information for patients, patient family members, specialists, durable medical equipment suppliers, pharmaceutical representatives, hospitals, home health agencies, etc.
Therefore, a robust contact system should thus be integral part of most EMRs.
The contact system currently in OpenEMR (and, for a matter of fact, most commercial EMRs) makes contact tracking fairly difficult and limiting. In a world where a person or business might have several phone numbers, email addresses, and physical locations, the need for a fully functioning and all encompassing contact system is important.
In the current database structure of OpenEMR: Phone numbers are stored in multiple tables, and even multiple times within the same table (no normalization). The same goes with addresses. Additionally, the address book stores information in the same table that OpenEMR user information/passwords are stored in (crazy, isn’t it?). Additionally, most contact info is stored in flat tables. This is one area where database normalization is strongly needed.
We would like redesign the way that contact information is stored in OpenEMR, creating a system with much more power for storing and managing contact information.
This system will contain normalized databases, allowing much easier searching of phone numbers and addresses. It will also allow flexibility as to what numbers will be stored, and allowing storage of old phone numbers and addresses. It will also be powerful and modularized enough to be used for every type of address and phone number stored (not just patient information). And, it will allow a centralized place for storage of all contact information stored in the database.
The first area this contact database will be used in will be the patient demographic system. Later projects will implement it in other areas that track contact information – address book, insurance companies, pharmacies, facilities, etc.
Some may not be crazy about this design – people don’t like change, and it will involve an entirely new paradigm of database design – taking the database away from flat storage, to take advantage of relational features/design. The power and usefulness of doing this should far outweigh these concerns.
In designing this layout we looked at another open source EMR project for inspiration and ideas — OpenMRS (https://wiki.openmrs.org/display/docs/Data+Model). We examined how it stores demographic information about “people” in the database. Our proposed database layout is partially modeled after theirs.
We will be providing database diagrams and sample queries to see how to interface with the new system.
Since there are really two aspects—the data layer and the user interface, this thread will focus on the data issues. If need be we can open another thread with how to display multiple phone numbers.
The attached diagram has the following table groups:
• Person
• Patient
• Business
• Patient Related Businesses
• Contact/Address Book
• User
• Data Logging and Related Tables
Question: Why have X in a separate table? Why not include it in Y?
Answer: The reason is for both current and future use, and due to complicated nature of the data. A business may have several names with different uses and needs. The new database layout will allow OpenEMR to grow with that information.
The purpose of this post is to get feedback from the community about these changes.
SEE FOLLOWING POST FOR DIAGRAM OF DATABASE TABLES.
David Eschelbacher MD
Chris Paulus, Cipher-Naught LLC