PlusDelta Technologies' PharmTrac system has a robust search feature for finding patient-specific medication deliveries, whether in progress or historical. As we scaled, searching became relatively slow, so I reworked the search system to significantly improve performance:
- Changed queries to use InnoDB's full-text search for searches that involved the medication name
- Added a "starts with/contains" search option that could take advantage of indices, as opposed to always using LIKE %keyword%.
- Added a message to users that updates with each filter selection, helping them understand exactly how the search will be conducted