bugGNU Health - Bugs: bug #45786, Party search doesn't work when a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #45786: Party search doesn't work when a last name is the same of another party's name

Submitter:  Luis González <luisg123v>
Submitted:  Mon 17 Aug 2015 10:42:07 PM UTC
   
 
Category:  Functionality Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  meanmicio
Open/Closed:  Closed Release:  2.9.0
Module:  health Component:  None

Fri 21 Aug 2015 11:42:33 AM UTC, comment #2: 

Fixed at http://hg.savannah.gnu.org/hgweb/health/rev/4802fd983c71

We still need to check if it scales well on large number of records.


Luis Falcon <meanmicio>
Group administrator
Fri 21 Aug 2015 11:28:34 AM UTC, comment #1: 

Hi Luis

Thanks for the feedback and suggestion !

Yes. Today generic search will stop at the first match, so it is quite fast. However, you have a good point, since it would miss other subsequent entries.

I will implement the functionality for 3.0. We would have to check that it does not affect performance.

For the current 2.8 , you can include the OR operator in the search entry field. It does field name auto-completion, so it would be fast.

In your example, you would put on the filter field :

"Last Name": Luis or Name: Luis

This will bring back all the records containing "Luis" either in name or lastname

Best,

Luis Falcon <meanmicio>
Group administrator
Mon 17 Aug 2015 10:42:07 PM UTC, original submission:  

When a party is searched, it looks for matches in fields like name, last name, PUID, etc. However, if it finds a matching party using one of those fields, the search stops automaticly. That would lead to not finding a matching result.

For instance, if we are looking for a party whose last name is "Luis", and there is another party whose name is also "Luis"; the search will find a match using the field name, and then it will stop; causing the party not being found.

The simplest solution I can think of, is to replace the method "search_rec_name" (class PartyPatient, health.py) with the following code:
______________________________________
result = ['OR']
for field in ('name', 'lastname', 'ref', 'alternative_ids.code'):
    result.append([(field,) + tuple(clause[1:])])
return result
______________________________________

That will return a clause containing a logic OR operator, that will take into account all possible matching fields.

Also, if that is not possible, I think it would be convenient to at least prioritize the field PUID, i.e. locate it at the beginning of the tuple.

Luis González <luisg123v>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by meanmicio (Posted a comment)
  • -email is unavailable- added by luisg123v (Submitted the item)
  • -email is unavailable- added by luisg123v (This is the bug we've been experimenting with your name and last name)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-21 meanmicio StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-08-21 meanmicio StatusNone Confirmed
        Assigned toNone meanmicio
        ReleaseNone 2.9.0
    2015-08-17 luisg123v Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code