Proposed project

davehaertel wrote on Friday, June 05, 2009:

After speaking with Brady about an installation (and many props, because he was right on the ball with the resolution) issue he suggested I throw up one of the ideas that I’m pursuing here with the developers.

I install and maintain Asterisk based phone systems and have several medical offices running with these systems, basically it’s a light CentOS kernel with Asterisk core services running the phone sytem parts.  My wish is to provide a completely open source office to my medical customers, workstations running ubuntu desktop, Open EMR as their medical software and the open source phone system.  I can already pretty much do this but would like to find a way to tie in the phone system with Open EMR and basically do the following:

- Grab the caller ID string
- Compare it to the patients contact information fields
- If only one match found, then bring up the patients chart
- If several matches found (say nursing home or hospital number), then bring up a populated patient search box with all the people that have that number listed as a contact number.

Basically I need to write a short app that will interface directly with the asterisk call manager and with Open EMR.  I’m not a coder but dabble in things every once in a while, so if anyone has an idea about this would you please respond here or send an email to me here?   Thanks in advance

Dave

whimmel wrote on Friday, June 05, 2009:

This sounds like an interesting project.  I use Asterisk at home but I haven’t deployed it in a doctor’s office yet.  However I did work in a large customer service call center in another life…

I think you would want to tie a logged-in user to a particular phone extension, so you’re not changing everyone’s current patient when the phone rings. Perhaps with a cookie so that phone-pc association remains if a different user logs in to that machine.

Also make it optional: When the call comes in, pop up an “incoming call” window with the pt’s name and phone or abbreviated search results.  The user would click on the patient to go to that record or dismiss the alert.

http://www.linuxjournal.com/article/9159

This article suggests that you could get the current call info out of Asterisk’s call detail record and provides some methods for displaying it on the screen.

fred0 wrote on Friday, June 05, 2009:

I’d considered integration between the two a while back and remember someone else a few years ago starting to try it. I ended up giving up on it mostly for lack of time, but also because I use the Trixbox distro and their install has certain library requirements that were different than what I needed for OpenEMR & SQL-Ledger. It was easier to just run the Trixbox system as a pbx and set up an ubuntu box for OpenEMR. In that config, you’d then need to make the two boxes talk to each other.
But this question (and the fact that I am doing OS X tests currently) makes me wonder if I shouldn’t revisit installing OpenEMR on Trixbox now that A/R is integrated. I can’t recall, but it might all been incompatibilities with SQL-Ledger.

rabbai wrote on Friday, June 05, 2009:

Well I couldnt help but notice this forum…As a matter of fact it would be easier if both were on the same machine…Asterisk comes as part of Ubuntu if you look under the synaptic…So if you install OpenEMR on the same box, I think integration would be possible.

mike-h30 wrote on Saturday, June 06, 2009:

The subject matter caught my attention.  Is there a cost savings to a practice for using Asterisk versus traditional telephone company’s business call plans?  Or is using Asterisk in a practice setting merely for adding communication features with the OpenEMR system?

-Mike

fred0 wrote on Saturday, June 06, 2009:

Asterisk is just a pbx phone system in software. I use with analog ports connected to regular analog POTS trunk lines from the telco. Usually with the unlimited calling plans they offer for business.
IN the office, I use VOIP based handsets for the users since I can plug them in anywhere there’s ethernet and config them via a web interface too. Very handy for remote administration.
But, you could forgo the telco and connect trixbox to a voip trunk provider if you have enough bandwidth to support multiple concurrent voice connections and a decent and properly configured router with QOS.
It really depends on your needs. You could also get the pbx functions hosted for you offsite (usually called Hosted PBX). The telcos offer this kind of service as do many VOIP providers.
Myself, I like having more control so I buy business plans (usually from verizon called Centranet) and ask them to strip away all the extra features except unlimited calling, circular hunting and callerid. The hardware investment is slightly higher (have to buy analog PCI phone card for the computer) but analog lines are the most reliable trunk you can get, easy to configure and, as long as we’re talking small biz with 8 or less lines, you can get unlimited calling.
I’ve also built systems for T1 trunks (expensive!) and VOIP trunks.

mike-h30 wrote on Saturday, June 06, 2009:

Fred,

Thanks for your quick reply.  I am very interested in looking further into Asterisk.  I went to their web site and glanced through some of the forum topics.  I was a bit overwhelmed with all the PBX lingo so I appreciate your summary.   Funny thing is this morning I was looking at our business phone bill to see where we could save money.  Our office has 2 phone lines and one fax line.  I would like to set up Asterisk on our server ( SLES 10 ) and host our own PBX. 

Is Asterisk what would be needed to set OpenEMR to automatically call patients to remind them of their appointments?

-Mike

fred0 wrote on Saturday, June 06, 2009:

First, you should really look at trixbox.org. It is by leaps and bounds the easiest asterisk distro to use. Trying get asterisk set up from scratch is an exercise in masochism.

On appt calls, I suppose you could write something that might do that via asterisk, but it would not do it “out of the box.”
There’s online service that does that called Appointment Call from tavoca.com. In fact, a commercial competitor to OpenEMR called Accubase has added the ability to export a tavoca.com formatted file that can be uploaded to their service. Might be something to consider adding to OpenEMR at some point.

And for anyone curious, I did a quick test by installing the CVS version to my Trixbox (v2.6.2) to see if the dependencies were sorted out. Looks like they are. In fact, the only thing I had to different than the basic linux install instructions was change php.ini to set allow_call_time_pass_reference = On.
So, good news! A reasonably fast pc (2ghz or better) with a gig or two of ram should be more than enough to support both Trixbox and OpenEMR on the same server in a small to medium office setting.

fred0 wrote on Saturday, June 06, 2009:

Oh, one other note on installing to Trixbox:
Apache runs as user asterisk on their distro so, where the basic linux install docs say "chmod -R apache:apache" changes to "chmod -R asterisk:asterisk" and the default mysql root password is "passw0rd"

rabbai wrote on Saturday, June 06, 2009:

Hey,

Any one ever heard of elastix by palosanto??? Its by far the best, and easiest of all open source PBX platforms, as it has support for your cards out of the box with little or no configuration. I havent tried it to see how it would integrate with openEMR but i know its probably easier than trixbox. You can give it a look… not sure though just giving a suggestion as I have worked with all three of them.

aperezcrespo wrote on Saturday, June 06, 2009:

Hi,
  How does this affect or fit in with Hylafax, which is already supported by OpenEMR?

fred0 wrote on Sunday, June 07, 2009:

Hylafax is an install option for Trixbox via yum or their web based package manager interface. Besides being able to have OpenEMR take advantage of that, there is a FOSS web based fax system called AvantFax that can also be used to replace a physical fax machine.
http://www.avantfax.com/

davehaertel wrote on Wednesday, June 10, 2009:

WOW, I’m glad that this topic was so interesting to many folks. 

To address the cost savings issues for medical offices, a traditional 3com nbx or NEC pbx for around 20 extensions, out the door is about 20,000 US dollars.  Trixbox CE is the Asterisk distro that I’m currently using, costs nothing, with unlimited extensions, has all the features and more of the above mentioned phone systems and including the phones and hardware could do the same for about 1/3 less than the above mentioned systems.  Also throw in scalability by the easy ability to link the systems and it quickly can save money.  Right now I have the below listed setup and it saved the medical office about 50,000 or so if they would have gone with the commercial PBX systems:

4 locations, (location A, B, C, D)
A 100 series extensions
B 200 series extensions
C 300 series extensions
D 400 series extensions
A, B and C are all conntected through an MPLS T1 PRI (digital Link LAN’s between the 3 major offices)
we linked D into all the systems through an IAX trunk
So, now all 4 locations can transfer calls to each of the other offices as an internal call (this would definitely save money if your locations were separated by long distance charged areas)
In order for the commercial ones to work the same way, they would have had to buy a separate 20,000 dollar system for each office.

Some of the other nice features of Trixbox over the commercial stuff is that you can run it on PC hardware, these systems are installed on Dell Optiplex 360’s which when purchased with Freedos, cost us about 600 dollars per unit.  This particular box with 4 gigs of decent RAM and the add on cards can handle up to 24 voice lines in a PRI, so it’s very scalable.  This could even have been set up as the main location having one server and the other servers using the main one as a VOIP server of it’s own, but 1.5 Meg T1’s are just not enough bandwidth for that kind of setup, so this was a better solution with the existing overhead.  These systems handle 10 to 15 extensions in each office and handle it VERY WELL.  So, in essence a basic system, 600 dollars for the box, 850 for the add on phone card, either digital or analog and the IP phones that connect via SIP to the server, plus the installation and training costs.  Much more of a cost savings than the commercial side.  The reason Open EMR is not an option with them is because they are a new customer and are using Futura already and are not interested in making the change over.  But for future offices, I think this is a great solution if we can get the plugin to work.

Ok, on to the plug in, there’s already a plugin written that is very well done to integrate Sugar CRM with Trixbox, so I’m thinking that the coding of it might not be all that different, both Open EMR and the CRM are running on LAMP stacks so dependencies are probably not that different, the asterisk call manager at the core of the trixbox can be manually coded to allow connections for scripts outside of the phone system, so I think this may be pretty straight forward.  The client for that plugin is very small but seems to be very effective.  I think the hardest part would be the server side in Open EMR to allow the script to make calls to the database which may not even be all that hard. 

I definitely agree that it should be username and password based, so that it’s limited to the receptionist(s) who are handling the bulk of the calls.  Sorry I’ve been out of touch, I  wasn’t aware this was getting this much action.

Dave