Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-425

Use Hibernate Search with Apache Lucene for Patient Searches

    Details

    • Complexity:
      Medium
    • Sprint:
      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

      1. Existing behaviors for searching for a patient are preserved
        1. Searching by exact patient identifier finds the patient (and no others)
        2. Searching by a single name component finds patients, sorted in an intelligent order
        3. Searching by multiple name component finds patients, sorted in an intelligent order
        4. (To Do: are there more?)
      2. Typing the value of a person attribute whose type is searchable (see docs) finds the patient.
      3. Searching by a name fragment and a searchable person attribute returns patients who match both criteria
      4. Searching for a patient by String uses hibernate-search, instead of plain hibernate queries
      5. Searching for a person by String uses hibernate-search, instead of plain hibernate queries
      6. The PatientSearchCriteria class is deprecated
      7. 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

        Attachments

        1. 2274.patch
          61 kB
          Burke Mamlin
        2. lib.tar.2.gz
          6.34 MB
          Burke Mamlin
        3. lib.tar.gz
          8.59 MB
          Burke Mamlin
        4. openmrs-2274.patch
          5 kB
          Burke Mamlin

          Issue Links

            Activity

              People

              • Assignee:
                raff Rafal Korytkowski
                Reporter:
                aravindm Aravind Madishetty [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day
                  1w 1d