EBM?

So I'm having dinner tonight with this group of happy medical students and they are bummin out about their EBM course and they ask me if I really use "EBM" and I say yes and then I do this little strep throat thing like this:

I see an adult in the office with a sore throat.  No kids.  No contact with kids

So I assume pre-test probability of about 5% Yeh – I made it up.  I'm probably close.

And the sensitivity of the test I'm doing is 85% (possibly better — but we'll be safe)

Specificty is very good – 99%

So let's do the poor man's version that I use to explain to the patient:

You have a 5% chance of having this BEFORE I do the test – so after the test you have a 15% chance of the 5% chance of having strep throat.

.15 x .05 = .0075 … let's round it up to 1%.

"Mrs Jones – you have a 1% chance that you have strep throat after this negative rapid-strep. Go home and drink warm tea with honey and you will feel better soon." (ok .. go find the evidence for THAT!)

VOIP, SwitchVox, SSL

We are getting very close to the day that we go live with our new phone system at the office.  Still a few bugs to work through .. but I've had enough random requests for the status – ever since I posted my review of SwitchVox that I do owe a bit of an update.

Here goes

The software is good, and we've been getting help from the tech support staff at FourLoop throughout.  There remain some wrinkles here and there, but updates seem to be coming at a pretty good clip – so I expect things will continue to improve.  

What sort of rough edges?  Well – the features of the software have come along well since the publication of the manual in June – and the help system that is embedded in the software is good.  But the documentation hasn't kept up with the features of the product – and this is sometime frustrating. It takes a while to "get" the best method for creating a really good IVR – and I wish that there were examples of more complex IVRs in the documentation – especially how to use the "option" functions.  Here's how (I think) it works:  Create an IVR.  Have step 1 be "play a sound" such as:  "choose 1 for eggs and 2 for peanut butter."   Now choose "options" and tell SV where to go when the user chooses Option 1 or Option 2:

Yes – it really is easy-as-pie.  And I THINK this is the way I'm supposed to do it .. but nothing in the documentation leads me there.  Some of this makes perfect sense and is very powerful-yet-simple (an awfully challenging combination to create) but the simplicity gets the upper hand in some places of the IVR – especially where it comes to the handling of options – and the handling of conditional clauses.

Having "options" stuck at the bottom of an IVR means that they HAVE to be the last thing that a user encounters.   While it's possible to develop a complex IVR that sends the user right to the end .. and then based on the option chosen – back up to a step above – this gets confusing quickly.  It would be much more intuitive to have the "options" behave like any other IVR action – since they are really just a "case" statement.  

And speaking of logic – the conditional clause is GREAT .. except it's only part of what I'd expect to see in a conditional clause.  I want ELSE and OR and AND and ELSEIF.

Ok.. enough complaining.

Josh and his team built something that I LOVE – and it's easy to use too.  It's a URL that I can put into web applications that causes the system to do something.

Here's the documentation for how it works:

 

What is the Call API?
The Call API provides a web interface for originating calls through the PBX. This is often called click-to-dial, and is done by requesting a specially fomulated url from the pbx.

How does it work?
Below is an example URL and a description of its functionality.

Originating a call Example URL:
https://IP.OF.PBX/api?cmd=call&extension=104&number=918005551212
cmd=call Tells the PBX this command is a call origination command
extension=104 What extension to ring on the PBX system
number=18005551212
When the call is answered by the extension this will be the number it will try to ring

How do my Call API Settings effect the call API?
The Call API settings allow the pbx to modify requested phone numbers so that they correctly match what the system expects. For example, if you request that the API dial 8005551212, the Call API Settings will add a 9 and a 1 to make the number 918005551212, which will then be dialed by your phone.

 
 
 
So if I have a link on a web page of our mini-EMR with a picture of a phone .. and it links to the pbx and tells it to call 5551212 from extension 500 .. then it calls 5551212 AND rings x 500 at the same time. So from the patient's chart – I can click to call the patient instead of dialing.
 
Yeh – you've heard of "click-to-dial" and you are not so excited?  maybe the fingers need a little exercise?
 
Ok .. but … say you need to call 1000 people over 4 days and let them know you have flu shots available and they can choose any of three saturday mornings to come in and get one.  How can you use the API to do THIS – you say?
 
Easy-as-pie:
 
Build a little application (I use coldfusion but you could use anything you like) .. and do the following:
 
  1. Build an IVR that plays a sound:  "Hi – you need a flu shot. If you want one – listen carefully.  You can come in and get one on any of the following days …  Press 1 for November 63rd, press 2 for October 34th and press 3 for December 44th. If you are hearing this message on your answering machine, you may call us back with your choice by calling 111-1111"
    1. Since the IVR will know who is called – it will send the result back to the application with:
      1. Name of person
      2. Date they chose
      3. (or that nothing was chosen – so maybe we got the answering machine .. which is fine.  We'll set up a temporary route on a DID so that when people call back they will get right to the IVR.  No waiting for a human.
  2. Query the database for the people you need to call and their phone numbers
  3. Loop through the query and send the phone numbers to the phone system every 40 seconds or so (evenings .. so we don't clog up the phones during the day).
  4. In the morning – run a report from the application to see who was called – who responded (and how) and how many people we need to schedule for the flu clinic on Saturday.
This works fine and I tested both the IVR and the Coldfusion and it seemed like they would work well – but I didn't (until tonight) try to tie them together.
 
When I did I got a mean error that Coldfusion couldn't connect to the PBX and all I got was a cryptic connection error.
 
So I had to do a little research and finally figured out that I had several problems.
 
  1. Fourloop build SwitchVox to use SSL when you are logged in as the administrator.
  2. To use the call API – you need to use SSL
  3. The SSL certificate is self-signed which is fine since it's OUR server and I think I trust myself. 
    1. But that's a little annoying because the browser complains that it doesn't have that certificate and that the name of the certificate (pbx) isn't the same as the name of the server. 
    2. But it's not so bad because I can click on the little alert .. or take the 29 seconds to install the certificate on my computer.
  4. But Coldfusion can't click the little box so I will have to install the certificate on the coldfusion server to make it happy.  Steven Erat shows us here how to do that.  .. ok .. now that wasn't so hard.  (or was it?)
    1. But it still won't work.  See the comments on Steven's page.  Several people got through step 1 only to learn that step 2 still stopped it from working:  "I was wondering if you know of a workaround for CFHTTP when posting to https:// where the certificate name on the SSL does not match the host name.

      When attempting this, I receive an Error Detail of I/O Exception: Name in certificate `www.domainname.com' does not match host name `xx.xx.xx.xx'"

      Hmm .. looks like I have the same problem.

But I figured out the solution!  Since I know that the certificate is called "pbx" and I now have it installed on the application server (which in this case is the client – SwitchVox is the server) .. still follow? .. I make an entry in the "hosts" file of the application server called pbx and point it to the IP address of SwitchVox.

Now I run my test page and my cell phone rings (every 40 seconds!) and it tells me I need a flu shot and the browser window of the debugging test page says:

Explanation OK
Http_Version HTTP/1.1
Server Apache/2.0.48 (Fedora)
Status_Code 200

 Hooray!

So we have solved the problem of coldfusion having trouble with SSL and reporting a connection error: I/O Exception: Name in certificate.   First, Install the certificate on the Colfusion server.  Next,  make a "hosts" entry to fool cf into thinking that the name of the remote server is the same as the name in the certificate.