Details
-
New Feature
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
-
Medium
-
2016-11-29 Platform 2.1.0
Description
Background
Currently, OpenMRS searches for patients by running some complex hibernate queries against our relational data model. We can get better performance (e.g. like mentioned here) and better functionality (such as searching by more fields) by changing our implementation to be based on hibernate-search.
As part of TRUNK-2999 we integrated hibernate-search into the platform, and started using it for concept searches. The purpose of this ticket is to do similar work, and start using hibernate-search in our patient and person searches.
Tech Notes
Make sure you review the changes that were made as part of TRUNK-2999. The changes in this ticket will be similar.
Acceptance Criteria
- Existing behaviors for searching for a patient are preserved
- Searching by exact patient identifier finds the patient (and no others)
- Searching by a single name component finds patients, sorted in an intelligent order
- Searching by multiple name component finds patients, sorted in an intelligent order
- (To Do: are there more?)
- Typing the value of a person attribute whose type is searchable (see docs) finds the patient.
- Searching by a name fragment and a searchable person attribute returns patients who match both criteria
- Searching for a patient by String uses hibernate-search, instead of plain hibernate queries
- Searching for a person by String uses hibernate-search, instead of plain hibernate queries
- The PatientSearchCriteria class is deprecated
- Searching against a demo database with 100000 patients is measurably faster
Scope
This ticket is about making backwards-compatible changes to openmrs-core's patient/person search APIs. We should make sure that any downstream changes have tickets created for them, but they are out of scope for this ticket.
For example:
- the registrationcore module can have improved similar patient matching algorithms after this ticket is done
- the namephonetics module may need to be refactored after this ticket is done
- HibernatePersonDAO.getSimilarPeople() should be refactored after this ticket is done
- TODO: more
Gliffy Diagrams
Attachments
Issue Links
- caused
-
TRUNK-5231 Lucene support for partial patient identifier searches
-
- Closed
-
- is related to
-
TRUNK-3780 Searching for patient with patient name/new feature
-
- Closed
-
-
TRUNK-2999 Investigate replacing concept word with full text search
-
- Closed
-
- relates to
-
TRUNK-5741 Out of date Lucene index causes pt search failure if pt deleted
-
- Ready for Work
-
- links to
- mentioned in
-
Page Loading...