I am currently working on an EHR-similar project with my database being realtime database on Firebase. I have important data such as patient information encrypted before pushing it into the database, but then I have a page where the doctor will search through patients, it’s ofcourse a massive mistake to pull all patients, decrypt them, and then search through then with my code. I have found some solution such as Acra search and more, but I’m not sure if there’s a best-practice approach for what I’m looking for (p.s. I need to search in between records, for example if I search by name and the patient is John, I want it to show John if I just type “hn”, and to also be able to search by a variety of data, phone/email/name/..etc)
Asked
Active
Viewed 24 times
0
-
I think the dupe target is wrong, this is not a duplicate of that question. – President James K. Polk Jan 13 '23 at 12:56
-
If you want to search the encrypted data, you will have to encrypt the search term and pass that to the API call. Aside from that, there is no way to do "contains" like searches on Firebase, which only supports prefix searches (so you can find John by searching for "Jo", but not by searching for "hn"). – Frank van Puffelen Jan 13 '23 at 15:03