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

PatientSearchCriteria doesn't load all the identifiers for the matched patients

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • TBD
    • Resolution: Won't Fix
    • None
    • None
    • None
    • Medium

    Description

      Methods in the HibernatePatientDAO that use the PatientSearchCriteria to search for patients by only identifier or both identifier and name don't load the complete list of the identifiers for the matched patients, this is because the query performs a left join to the patient_identifiers table. For example, if in the DB there's a patient with 2 patient identifiers 101 and ABC, when you call any of the PatientService methods that delegate to a DAO method that uses PatientSearchCriteria and pass in 101 as the query String, you get back the correct patient but when you call patient.getIdentifiers(), there is only one identifier in the list instead of 2, ABC won't be in the list.

      This issue seems to have been introduced by this commit, unfortunately the ticket number was not included in the commit but from github this seems to have been introduced in 1.11.0 therefore this bug is in all 1.11.x and 1.12.x releases. We need to confirm that this doesn't happen in versions where we introduced lucene based patient searches.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: