Uploaded image for project: 'FHIR Module v2'
  1. FHIR Module v2
  2. FM2-234

Ensure search returns unique results

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • Should
    • Resolution: Fixed
    • FM2 1.0.0
    • FM2 1.0.0
    • None
    • Medium

    Description

      Currently, the same resource might be returned more than once from a search query, it the criteria match more than once. Ideally, each resource would be returned only once.

      This can (hopefully) be accomplished by using the UUID of the base object to group results, probably by changing createCriteria in BaseFhirDao to something like this:

      protected Criteria createCriteria(SearchParameterMap theParams) {
      	Criteria criteria = sessionFactory.getCurrentSession().createCriteria(typeToken.getRawType());
      	setupSearchParams(criteria, theParams);
      	handleSort(criteria, theParams.getSortSpec());
      	criteria.setProjection(Projections.groupProperty("uuid"));
      	return criteria;
      }
      

      We should add tests to ensure that ordering is in some sense consistent across pages when doing this and to ensure that all existing tests either pass or fail because of an expected breakage. We should also add tests to ensure that only unique results are returned for each resource.

      Gliffy Diagrams

        Attachments

          Activity

            People

              varung31 Varun Gupta
              ibacher Ian Bacher
              Ian Bacher Ian Bacher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: