Search in OpenEMR

From OpenEMR Project Wiki

Search in OpenEMR - How To Find What You Need

The Search functions in OpenEMR vary somewhat depending on where the search is performed, and the search choices vary as well. So each is covered separately below.

Left Frame “Find: by:” Search

The “Find: by:” box at the lower left allows you to place in the box as few as a single character on which to perform the search of the “patient_data” database field(s) chosen beneath the box with any of the six choices; “Name” will only check the Last Name field (lname in the database), “SSN” and “DOB” should be obvious, “Any” will look for the text match in all the fields within the database, so will be very slow if you have a large number of records, “ID” looks in the “pubpid” field, which can be different from the “pid” field which is usually assigned automatically when a new patient is created. The “pid” must have only one, whereas the “pubpid” can have multiple matches. Lastly, “Filter” allows you to select the fields you will include in the search by using the check box for each, so like “Any” can be slower depending on the number chosen.

Note that all patients which match the selected criteria will be listed alphabetically according to “lname”, and that list will require use of the “<<” and “>>” at top right of the list to scroll to the next grouping which are limited to 100 in the distribution to save post times, unless you change that setting in the ../interface/globals.php file. Also note that non-standard characters like an apostrophe can have unusual results, which are being investigated as of this writing. So putting an apostrophe in the box will find no matches in “Name”, and has not been tested for in the “ID”, “DOB” and “SSN” where they should never exist anyway, but will find them in the “lname” field if either “Filter” or “Any” is chosen. That may be fixed before you read this.

Starting from version 3.3, “Filter” search will actually display the “Demographics”, and will change each field you select to yellow (for those who are colorblind, this can be changed to another color which works for you in the globals.php settings) from the original white, as that is believed to be easier to manage than the checkbox list in earlier versions. And versions prior to 3.1 did not include the “Any” nor “Filter” choices.

Once the list is shown, you simply click on the desired patient and their demographics will display. If you leave the “Find: by:” box blank, ALL patients will be listed alphabetically according to last name.

Calendar Search

As you can see, selecting to search within the calendar looks completely different, and acts that way also. You must set the search criteria in each of the fields. Note that the “Keywords” allows you to type words separated by a space, while the drop-down “AND “ or “OR” selection will effectively place that between the words when searching. That search will be made on the records within the calendar, which can result in some funny “finds”. For example, entering an apostrophe and a “c” separated by a space with the “OR” selection will find names which contain neither, but if the provider or the visit category include them, will also be found and listed. Note that your choices in the drop-downs are limited to ALL or a single one. The display order is the appointment time, first to last of the group, and clicking will bring you to the “Edit Event” window for it.

Calendar Add Search

The Add Search operates differently again. Clicking the Add button brings the “Edit Event” window, where the only search function can be on the “Patient:” field. Clicking there brings another window, where your choices at this writing are limited to only one of the fields listed. Type the character(s) to match. “Name” is actually only last name, and it also has the search problem with an apostrophe. Currently being considered is making the choices equal to those in the Left Frame. This may have changed by the time you read this.

Superbill (Admin – Services in Tree View) Search

This is one of the most severely limited searches in OpenEMR. It ONLY allows entry of the CODE to match and its type, and not even its description, so you can at best get the short list of similar codes. When the Superbill screen first comes up, it is the same result as you would get by selecting “ALL” and typing nothing in the search box, followed by pressing the Search button. You can select to “Delete” or to “Edit” one from the list, or create a new one using the fields at the top. This listing is the group which will be available in the next search section below. These lists can also be populated using the PLX files described elsewhere.

Encounter – Add Issue Search

The only field which results in a search is “Diagnosis:” which looks at the Superbill list, but looks at the description, giving the result as only a code. The default is ICD9, but you can type the other kinds in the left box as CPT4 and HCPCS. Note that this is surprisingly NOT a dropdown, so mis-typing is prone to errors. And many users have ICD10 codes in place, whereas the “ICD9” finds them because it looks for a code match. Typing into the search field “depr” for example, will find all codes of the type which have the string “..depr..” anywhere within them. Selecting one will bring to the “Add Issue – Diagnosis:” line its code type a colon and its code (eg. “ICD9:296.33”). Smartest use for this is to use the Problem blocks at the top, which are filled using the ../custom/clickoptions.txt file as described in the Fee Sheet Instructions, also found in the Wiki, to populate the Title: field, which carries over to the Issues List with its date added for all subsequent encounters. You can see why the advantages to the combined code and description, vs the normally displayed code only.

Patient – Management – Add/New (New Pt in Radio Buttons) Search

Similar to the “Find: by:” process described above, but limited to the fields in which you enter data (these will change color to augment your awareness from Ver 3.3), this will list all those whose fields match all the data entered after you press the Search button, except they still cannot find a special character like apostrophe unless that has been fixed before you read this. Fields left blank or unchanged from initial display will not be used in the search. The general purpose for this is to allow users to prevent duplicate patient record creation by first checking to see if the patient exists already, before adding one.

Like all searches, it is best to enter only a few (four is best usually) characters which occur in a name, etc. That will generally provide for the nearest matches. You should think about human errors, though. Someone walking in calling themself “Wallace” might be incorrectly entered as any of “Wollise, Wallise, Wolice, Walice, etc.”. And a name like “Utah” could start with U, Eu, You, etc. So it is a good idea for an administrator to periodically do a critical review of data to try to minimize problems. If they are found, you may have to move data between patients, before you delete any existing duplicate. And note that deletion does not remove records of that PID from the system.

Fee Sheet Search

The Fee Sheet uses dropdown listings for Services (CPT or HCPCS), created using Categories from the Admin – Services list or Options from the Admin – Lists – Fee Sheet list, which are used to manually select for the desired Service, or can be searched for using the search box in the center of the Fee Sheet. See the Fee Sheet instructions for details on creating the Fee Sheet page. The search defaults to ICD, but you can select either of the others as well. Enter a few characters from the description, as per above, and press the Search button, to have a dropdown list display in the greyed out bar immediately above the search box, labeled “Search Results”. Either will cause the service or problem code to populate a new line beneath the search box, which has details you can change for each. If you have created multiple Price Levels in the Admin – Services (Superbill in Radio View), you MUST select the Price Level from the dropdown at bottom BEFORE selecting the service.

EOB and Reports Searches

The process for handling the EOBs requires you to manually enter selection criteria into one or more of the boxes within the shaded area. Note that dates are entered in the mm/dd/yyyy format, unlike most dates used elsewhere, and they do not have the selectable calendar block also familiar elsewhere. That may have changed by the time you read this. “Name” is the patient last name, “Chart ID” is the “pubpid” noted above, “Encounter” is the encounter (visit) number, which for most users is unknown unless they have come from one of the reports, and is better found generally by using the service dates range. Clicking on the Search button causes a listing of all patients, listed in alphabetic order, and their encounters within that time frame. The code shown under “Invoice” is the “pid dot encounter_number”. By default, any in the list which have not yet been billed will have a checkmark in the boxes at far right. The “Prv” is the number of times it has previously been billed to any payers, with a minus. That will increase by minus one with either selection to “Print” or (new with ver 3.2) to “Download” at bottom, if the “Without Update” is not checked first. Note that the “print” requires setting the specific printer in the ../interface/globals.php file, as well as configuring the LPR port if you are using Windows, so can be frustrating. Instead, Windows users will want to use the “download” which produces a .TXT file which contains a formatted stream which can be used to print patient statements using the Notepad in Windows, and adjust the ../custom/statements.inc.php file to achieve that. Contact Joe Holzer on the forum (using the link below) for a working example of that adjusted file which works perfectly to produce a single page per patient, which folds to show through a standard #10 window envelope.

A similar search can occur in Reports. For example, Collections Report has similar boxes to enter, but there the dates can be selected with the calendar blocks. However, in some others (the Reports – Visits – Superbill comes to mind, especially since its name conflicts with the Superbill noted above, and it has a different date format again), the appearance and usage vary widely. The OpenEMR team are working to get better uniformity of process and appearance throughout. But since OpenEMR is by a host of volunteer contributors, each of whom was trying to accomplish a specific objective while there was no central “authority”, such things take time. We appreciate your patience, and please let us know using the bug tracker link below when you find such issues (please check the tracker list before entering a new one to be sure it is not already there ;-)

Other OpenEMR Searches

There can be other searches which will generally follow one of the rules sets above. But some may still have unique behaviors, like displaying “\’” in a field after you entered an apostrophe. Generally, the latest version or patch update will correct those, but if you find a new one, please bring it to our attention in the forums at

 https://sourceforge.net/tracker/?group_id=60081&atid=493001  

Good Luck with your searches in OpenEMR. And if you need specialty search setups (or other special functions) for your practice, either contact the mailing list (and wait an appropriately long time for volunteer help), or commercial assistance can be provided for a fee by one of the commercial vendors listed at:

 OpenEMR_Commercial_Help