Zend+Doctrine

bradymiller wrote on Wednesday, February 15, 2012:

Hi,

Just noticed in today’s oemr board meeting a discussion of using Zend+Doctrine to integrate a practice management module: http://www.oemr.org/phpBB3/viewtopic.php?f=28&t=114

Sounds like just in planning stages, but what struck my interest was that there is already a sponsor willing to pay for some of this. Was hoping to get some more details on this; things like advantages etc and see what other developers thoughts are. I also thought Z&H was going to contribute practice management modules in the future.

thanks,
-brady

zhhealthcare wrote on Wednesday, February 15, 2012:

Hi Brady

Was not present for today’s Board meeting : so cannot speak to the sponsorship of PM module.  We had discussed using zend framework for the next version. I brought up the subject to ask the tech specialists in the Board the best tool for MVC and stuff.   Zend seemed to be the unanimous choice.  So I have put in a couple of resources to test that framework for an internal application.  If successful we could start working on a phased upgrade of OpenEMR by modules to the new framework: possibly starting with the lab module which seems to be not used by many but needs some work.  All this, of course, was brainstorming.

in any case, now that the discussion has started, what does the community think of considering the development of OpenEMR 5.0 on Zend framework?  The effort could start with refactoring of the DB and moving the code module by module to the new framework/ 

However we are contributing the basic features which goes to the root of billing and PM  that we promised per the list presented in the google doc shared.  We also promised some reports for the PM module so that the Board can save the money they had earmarked for the paying someone to do all this.

Thanks
Shameem

aethelwulffe wrote on Wednesday, February 15, 2012:

The discussion (I was also not present, I just called to get a summary for the minutes) was that board members were willing to consider/commit to funding such a project on a hand-to-mouth basis.  It’s not like the money is lying around to fund an entire project.

The composition of the proposal was (as I understand) part of an effort to introduce database integrity, begin utilizing the Zend framework, and have practice management functions operating with, yet outside of the ambulatory EMR bit, so that the module can proceed as it’s own project and not impinge on OpenEMR’s development, database structure, or coding principles.  Once the ZH stuff gets out there, I am sure priorities will change, but we have these pow-wows to explore possibilities and for general board member education about what possibilities are out there.  In absence of more data about the future capacity of OpenEMR, schemes around the known facts are born.  I am sure it is all quite sincere, but it is either a contingency, or a thought experiment, depending on plenty of other factors.

  In  extending  the previous Zend discussion, and suffering from leftover Pavlovian salivation anticipating the ZH contributions (i.e. “Sorry, you have had your porridge, now you must wait another month for the Apple Pie”), what the heck else was gonna be discussed?  Yes, also, there are certainly folks willing to pay to have nice financials, accounting, and other business related bits for OpenEMR.  I have experienced this myself, as I have been dragged in to re-create EMR sites that include squirrelmail webmail, Accounting ( http://www.weberp.org/HomePage ), hmail, phpTimeclock, my location mapping programs, feedback response forms, forums, and all those other nice bits you can package into a zipped xammp server (along with Filezilla of course).  One group saw all that stuff, asked me to install the EMR, and though all the other stuff came with….so I had to go back before they started crying. 

bradymiller wrote on Wednesday, February 15, 2012:

Hi,

Regarding Zend, sounds rather ambitious (converting entire project to Zend and restructuring database) especially since it requires a huge amount of work and doesn’t appear to add any new features. Does converting to Zend and/or restructuring the database add any objective value to the project that is worth the effort it would take? Regarding database, sounds like getting it to InnoDB makes sense and would add real objective value to the project; is there other database restructuring that is being considered? Just asking the obvious questions that I’m guessing your group has already covered. If go ahead with Zend, then recommend picking a small module to convert which will likely bring any unexpected issues to light and evaluate how feasible it is with minimal investment of resources.

-brady

zhhealthcare wrote on Wednesday, February 15, 2012:

Brady

I have been hearing of DB restructuring for a quite some time now.  Let us start discussing ideas about this part first.  Let us sort that out.  Why not start another thread soliciting suggestions from the community on what is to be fixed and what is needed.  Should we include stored procedures and triggers…… I dont know, but let everyone who is fuming under the current DB spill their guts.

With Zend I am considering doing the Lab module.  Just needs some time to get started.  Please bear with us on this and the billing modifications:  I assure you the contributions will be good.

Thanks
Shameem

tmccormi wrote on Thursday, February 16, 2012:

As a sub note - the Rules GUI is written from scratch as a ZEND like framework.  Aron took a minimum set of ZEND features and modeled the UI structure on it to make the point that the two methods could co-exist and to provide an example of a simplistic use of this kind of MVC framework…. 

And we have other in-house projects where we have full ZEND based systems running inside frames in OpenEMR and communicating across the void :-)  (We did this with TomCat JavaServlets too).

As to the value of creating modules in ZEND (or anything else).  If we can do this one component at a time we can replace OpenEMR morass of 10yrs of tangled code with clean re-implementations that have new features and a new long shelf life without substantially disrupting the current goodness…

Modules that could have clean lines:
- Demographics Management
- Medical Notes/Forms/History
- Billing Management
- Practice Management (accounting, productivity)
- User Management / ACL
- External Entity Management (referals, hospitals, pizza guys, suppliers, labs, etc)
- Lab Interfaces
- Diagnostic Imaging Interfaces
- Direct Connect (Support for data exchange standards layer)
- Reporting, Management - run, queue, save, create custom reports
- Custom “Plug-in” features

Not a exhaustive list, but all would be connected with well defined API that won’t break (as easily) when new fields and features are added by using tools like Doctrine, Unit tests and embedded documentation of code (ala phpDoc)

It would be so nice to be able to build OpenEMR using just the modules you need and nothing more.

-Tony

sunsetsystems wrote on Thursday, February 16, 2012:

ZEND and code modularization/restructuring are two different topics… you can have either without the other.  Y’all are kinda mixing them up here.

Rod
www.sunsetsystems.com

suitable1 wrote on Thursday, February 16, 2012:

Well, I gotta tell you.  After we get this first installation under our belt, I have been planning to help with development.  However, if Zend Framework is required, I may have to rethink my involvment.  I went to the Zend site and looked at the “Quick Start”.  I’ve been involved with coding, documentation, and systems design since the late sixties and I believe that the “Quick Start” guide is among the most obtuse documentation I have ever read.

bradymiller wrote on Thursday, February 16, 2012:

Hi,

Sometimes I’m glad we can’t edit our posts; otherwise would never get to see words like “morass” :slight_smile:

I understand building new features via this (such as the admin CDR GUI, which plays nicely with OpenEMR; something I have noticied about these frameworks, both smarty and the CDR GUI is there seems to be much less coding/hacking/customization done there; ie. seems to be much harder for newer developers to understand the flow of the code with those frameworks) and I do look forward to Z&H’s new code. I just have a hard time envisioning spending a huge amount of resources to simply convert the old code to this without really adding much in the way of new features (ie. who will pay for such a thing). I could think of a large number of other things that would seem to be far more cost-effective:
http://www.open-emr.org/wiki/index.php/Active_Projects

Also, suitable1, there is no plan to ever make the Zend Framework a requirement, so please continue with your plan to help with OpenEMR development :slight_smile:

-brady

bradymiller wrote on Thursday, February 16, 2012:

wow,
just looked up morass and it is an actual word.
-brady

aethelwulffe wrote on Thursday, February 16, 2012:

WARNING!  ART RANT:

Not into classic literature? :slight_smile:
…admittedly, if you look too closely at the spelling of the word without simply recognizing it, you might be inspired by the crudity of it’s possible meanings.  Of course, I lived in an are called “The Mangrove Morass”.
  I grew up reading 19th century literature (our community had not invested in any new library books for a rather extensive period of time), and I am rather surprised sometimes at what appear to be huge gaps in most folks vocabulary.  My wife is far better more extensively institutionally educated than I, but chokes on words I consider to be etymologically basic English.  I hear the local domestics haver (that means ‘babble’ without the Judea-Christian implications) about immigrants needing to “Larn Anglish” when they come to the US, yet look confused when I utilize a word longer than two letters.
ZEND
  I agree about the whole “is a framework shift worth it” idea.  There has to be a pay-off.  Fine.  On that side, I think it’s a pretty good holistic outlook as far as representative features for end users (holistic=big picture, complete).  There are other factors rather than what an end user may call a feature.
  Lets go over them:

API-  Admittedly, Zend will not give us a completed programmer’s interface for OpenEMR developers.  That would be our job.  On the other hand, there ARE functions and API documents for those functions with the framework, though buried in it’s “obtuse morass” of technobabble that is the typical “Developer” answer for technical writing.  We would be looking for tightening code using the existing functions, and creating our own API derived from Zend and our own libraries, or rolling our own functions and libraries into a cohesive set…and documenting it.  There is a catch here for Zend:  It’s own API seems inconsistent in different areas, and of course, it’s documentation sucks in more way than one.  For instance, you may  be reading along, and the language for use will flop back and forth between assuming one OS, and then another.  It’s seriously inconsistent.

Developer Accessibility-  PRO:  There are good coders out there that would be pleased with a shift to Zend.  CON:  Most of us are not good coders.  It seems folks either grew up with Zend, or it makes what used to seem easy very difficult…and they would have to start reading a lot of the php5.3, Apache, and OOP equivelant of 19th century literature to even begin to understand it’s use.

OTHER FRAMEWORKS:

Is there another framework that is applicable to OpenEMR and where it needs to go that is more N00b friendly?  Ref Codeignitor or AppFlower?

ROLLING OUR OWN:

We want standards to make coding faster, reviewing easier, and allow for code maintenance cycles to actually happen.  To do that, we need to define official API documented functions…and document them…while defining an “official” set of developer tools that are completely cross-platform.  Differences in implementation for different Operating Systems on development machines as well as servers should be well annotated.  This would involve going through a real code maintenance cycle to re-structure the openemr directory structure, cleaning up functions in a number of places and popping them into libraries, and documenting each function in a standardized manner.
  Such a code maintenance cycle would probably be the best financial investment we could make.  At this moment, items like basic 5010 billing and ONC cert are pretty much out of the way (not all of which has made it to the code base yet, and none of which has seen extensive testing, much less been put into a patch or release, but…).  Re-vamping at this point would pay serious dividends in the long run.  This would be a big project management piece (Development vs coding), but the work could easily be dispersed to many contributors if the coding standards were published.  At one point, Ibelieve there was a standard for contrib forms that mattered.  Directory structure, file names, and methodologies are pretty well defined, even if the ideas for it are pretty out-of date.  Everywhere else in the EMR seems to be pretty much a free-for-all, and there is no road map.  You have to go through code, guessing where shit is, tracking down one include after another…through multiple levels sometimes…to find what you are looking for.  There should be ways to call scripts with defined functions and constants throughout the application.  I have thousands of function from different engines floating in my head.  I have been woking with OpenEMR for two years, and I can’t name even one function specific to OpenEMR that I can just use after referencing the proper include.  They are inconsistent and undocumented as far as I know, though it is possible there are cryptic references somewhere buried on those wonderful wikis.
In one engine, I think:  “I need to draw a square on the screen”.  I don’t have to look at the API.  I can GUESS what the function is.  I also don’t have to worry about what library it is in, because the libraries that will be used are included in a library sorting include.  I say "this is a draw function, so it starts with ‘draw’.  So I guess draw_rectangle(view,x1,y1,x2,y2,c_black);  Then I think:  “I want it fancier than that”, so I guess draw_rectangle_color_extended(view,x1,y1,x2,y2,1, c_black,c_ltgray,3,c_red); to give me a gradient black to grey box, gradient from left to right, outlined with red 3 units thick.  The functions are so standardized that most of the time I know the sequence of the arguments.  If I need to go to the api, I can find what I am looking for indexed and searchable, and the definition will have the format, argument definitions, and a complete practical example of it’s use.  I can almost always guess the name of the function, even if I am not sure of the arguments.  We could have this too.  With tools like that, you don’t have to have an initial understanding of a particular programming language to dabble, you don’t have to squint your eyes at long blocks of code with cryptic nomenclature to try to figure out what it is doing, and you can code in a happy content sort of way KNOWING that the functions themselves have proven performance.
That’s worth a lot to the projects of tomorrow.  You can chop wood all you want, but if you don’t sharpen the axe (or don’t know how), you are not earning your pay, and you arn’t a professional woodcutter.

bradymiller wrote on Friday, February 17, 2012:

one word (not morass):
grep
:slight_smile:

yehster wrote on Friday, February 17, 2012:


Everyone has their own favorite tools. 

aethelwulffe wrote on Friday, February 17, 2012:

Sure, everyone has their own favorite tools.

When you write documentation for activities that must utilize a tool of some sort, the manual must reference the usage within the same tools throughout.  This is not setting a standard, it is setting the viewpoint.  Quite a different thing from trying to get everyone to use the same tools.  It does, however, give noobs a starting point in which they can say "OK, I got >this<, now I can follow along….
….much the same with saying “use Git BAsh to start!”   right???