Developer Documentation

lsuardi wrote on Monday, March 02, 2009:

Hi there, I am a senior PHP developer and I am evaluating OpenEMR as possible platform for a hospital information system.

I am looking for developer documentation that provides an overview of the architecture and one or more tutorial that show how to extend OpenEMR with new features, hopefully in a modular way. I have seen references to embedded PostNuke code and I would like to know if the concepts of PN module and PN permissions are used within OpenEMR.

Thank you!

cfapress wrote on Monday, March 02, 2009:

Isuardi,

I’m sorry to say the developer documentation isn’t complete. You should still read through what can be found in the <oemr>/Documentation folder.

The PostNuke code is for the calendar system. It’s not really PostNuke anymore but something of a monster created on the base of PostNuke. All other code in OpenEMR is straight PHP, HTML, Javascript, SQL, and a little bit of PHP Smarty.

To get started you might want to pick an area that you feel needs development. Start tinkering so that the software begins to suit the needs of your environment. And, if you feel inclined, contribute back what you’ve done so long as it can be applied globally to many other health care facilities in the world.

Jason

tmccormi wrote on Tuesday, March 03, 2009:

This is a big pretty big issue for my little team at Medical Information Integration (MI2).  We are using OpenEMR is some situations that require a clear understanding of the structure to make sure we can leverage what already works well.

The big hole to me is the Database Schema.  It is very difficult to unravel the table relationships.  Some of that is legacy and some is bad choices (like using the InsCo name like it was a fixed Key).  I hope to have some time to document that as I figure it out.

For to code it would be good to adopt a standard embedded doc format like the Perl (and later Java) community did with perldoc and javadoc.  

Converting it to a Hospital EMR happens to be one of them, as does using it as a service for charity clinics and co-op clinics with membership billing needs (versus service billing).  we also use it a a targeted home based patient EMR with automated integration with an offline EMR data collection tool and electronic billing to contracted Insurance companies with special requirements.

bradymiller wrote on Tuesday, March 03, 2009:

hey,

We’ve also got some documentation on the wiki at http://www.oemr.org/modules/wiwimod

-brady

tmccormi wrote on Tuesday, March 03, 2009:

The wiki has useful information, no question.  Thanks for reminding me.  I believe that the wiki is the best place for overall documentation and specs and we’ll certainly post any contributions we have there.
-Tony

tekknogenius wrote on Tuesday, March 03, 2009:

You might want to look at the database sql scripts which can be found in the [openemr root]/sql directory. Also you can use a tool such as http://dev.mysql.com/downloads/workbench/5.1.html to look at the schema graphically. The table names should give you an idea of what each are used for. Also, you’ll have to “grep” through the source to see exactly where they are used.

tmccormi wrote on Tuesday, March 03, 2009:

Those are certainly some of the tools/methods I’ve been using.  :slight_smile:

–Tony

lsuardi wrote on Thursday, March 05, 2009:

I have done this. Unfortunately, no foreign key constraints are specified, so reverse engineering tools cannot reconstruct the table relationships, which are most useful to understand the data model.

cfapress wrote on Thursday, March 05, 2009:

lsuardi,

I think you’ll find no foreign key constraints in the OpenEMR database; unfortunately. The only way to learn how all the database tables are interconnected is to sift through the code. It’s an arduous task and I don’t think any one developer here can give a complete description.

I suggest we start a wiki page with a complete database schema with descriptions of the tables and their fields. It would be a good first step in clearing up dependencies.

Jason

tmccormi wrote on Thursday, March 05, 2009:

Which, of course, brings up the question of why no foreign key constraints are used/  They are certainly both (foreign keys and constraints) that are enforced (somewhat) by the code.  Why not in the DB?

Perhaps this should be a different thread …

–Tony