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

Fix EncounterService.getEncounters(String, Integer, Integer, Boolean)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Ready for Work
    • Priority: Could
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Medium

      Description

      EncounterService.getEncounters(String, Integer, Integer, Boolean) returns less than expected results if any of the patients the encounters belong to happens to have more than one person name where each name matches the search string. The query returns encounters matching on each of the person names which results in duplicates, this will pose no problem if you add no limit to the result set size but if you do, then the encounters for any patients coming after this patient(alphabetically basing on names) will get left out depending on the limit size.

      The solution is to upgrade to hiberanate 3.2.6+ since the current hibernate version we are using has a bug when detached criteria and subqueries are used together, see HHH-957. Then use a detached criteria and subquery when joining to the patient table

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              wyclif Wyclif Luyima
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: