isaakhanimann / psychonautwiki-journal-android

GNU General Public License v3.0
50 stars 10 forks source link

interaction check confusing Depressant and Antidepressants #18

Closed NikkyAI closed 1 year ago

NikkyAI commented 1 year ago

Stumbled over a unsafe interaction warning between LSD and Pregabalin that should not exist at least according to their substances classes and unsafe interactions these substances should not trigger

But i think due to Pregabalin being a Depressant and LSD having unsafe interaction with Tricyclic antidepressants, it does case-insensitive string contains check and triggers the warning

https://github.com/isaakhanimann/psychonautwiki-journal-android/blob/fe746dd62a8bedb6b5b792a21142877589228624/app/src/main/java/com/isaakhanimann/journal/ui/tabs/journal/addingestion/interactions/InteractionChecker.kt#L104

maybe make this a regex check like \b${category.lowerCase()}\b or such to only catch whole words ?

isaakhanimann commented 1 year ago

Fixed for both iOS and Android. Thank you.