OpenEMR Advance Search web-service via REST API

bikash4mgrmtech wrote on Tuesday, October 08, 2013:

Hi all,

The default search interface (UI and functionality) provided by OpenEMR
is working good. But, for last few days we are developing an advance search UI
which can be used from an OpenEMR installed site via web-service (REST-API).

Here I am asking for you suggestion and opinion about this web service for “ADVANCE SEARCH”.

Main advantage of the Advance Search UI is that it searches with each key-press making the search experiance much like google search.

Some examples will give more light on this issue:-

Example-1: To search patients where name has ‘jacob’ and date-of-birth is 1977 you need to type
name=jacob dob=1977

Example-2: To search patients where first name has ‘john’ and last name has ‘smith’ you need to type
fname=john lname=smith

Example-3: To search patients where email is ‘john@gmail.com’ and phone number is ‘98765’ you need to type
email=john@gmail.com phone=98765

If you have an OpenEMR installation with a REST API, you can avail this web-service by creating your account on
http://www.healthcarenirvana.com/easy-search-for-openemr/


Thanks in advance
Bikash Barman
HealthCareNirvana.Com

yehster wrote on Tuesday, October 08, 2013:

The functionality you demo already exists as part of OpenEMR developed by Rod, funded by Dr. Eschelbacher on the finder screen. (Patient Client/Patient in the left nav.) Your prefix method allows for using some additional search parameters (like email address), but I don’t think that’s a particularly useful search criteria.

mdsupport wrote on Tuesday, October 08, 2013:

Agree with Kevin. Instead of ‘Advanced Search’, why not make the normal search do advanced stuff like mySQL full text search and automatic ranking. In the office no one has time to type phone=… As it is they are annoyed that after entering number if they forget to press ID link, emr returns 0 matches when the search term is (to them) clearly an ID.

bikash4mgrmtech wrote on Wednesday, October 09, 2013:

Hi Kevin and MD,

First of all thanks for your feedback.

Two main things I want to point out here about how “Advanced search” differs from “Default OpenEMR search”

  1. We use “Sphinx search” instead of traditional “MySQL Full Text Search”.
  2. We provide search result “on-keypress” instead of “on-click” event.

For a small chunk of patient record both ‘MySQL Full Text Search’ and ‘Sphinx search’ will perform well.
But as the size of database increases ‘Sphinx search’ is more preferable over ‘MySQL Full Text Search’.
For detail you can see http://sphinxsearch.com/blog/2013/06/26/from-mysql-fulltext-search-to-sphinx/

About the ‘on-click’ vs ‘on-keypress’ issue, I think most people will prefer ‘on-keypress’ as you can get the search result just typing out your search text.

Finally, considering the issue pointed out by MD “no one has time to type phone=…”, we can provide an query-builder-form popup which will create the ‘SEARCH TEXT’ for “Advanced search”.

Any other feedback?


Thanks in advance
Bikash Barman
HealthCareNirvana.Com

yehster wrote on Wednesday, October 09, 2013:

Do you have any performance metrics that indicate at what size the benefits of Sphinx search would be tangible?

On-keyup functionality is already part of the official OpenEMR code base, it would probably be useful for you to check it out.

deschel wrote on Thursday, October 10, 2013:

So, to use your new functionality, does Sphinx need to be installed on the server?