On a store that sells generic prescription medicines, one question comes up again and again: "My doctor said Cialis. Which of these is that?" Product names like Tadacip 20 or Ciasel 20 mean nothing to someone that has only ever heard the brand. So we built a brand-to-generic lookup table. Here is how it works, and what we learned about making a simple data table accessible and useful for search.
The problem
Each medicine has three names that people use interchangeably:
the original brand (Viagra, Cialis, Propecia, Arimidex)
the active ingredient (sildenafil, tadalafil, finasteride, anastrozole)
the generic product name chosen by each maker (Fildena 100, Tadacip 20, Finpecia 1 mg, Armotraz 1)
Customers search by any of the three. The table has to connect all of them in one row, plus the strength, because a name match with the wrong strength is worse than no match at all.
Start with the data, not the markup
We kept the source of truth as a small JSON file and generated the HTML from it.…