Menu

How We Built a Brand-to-Generic Name Lookup Table for a Medicine Store
📰

How We Built a Brand-to-Generic Name Lookup Table for a Medicine Store

DEV Community: html·RX PILL TAB·about 13 hours ago
#AmP2h6a7
#devto2#devto#dev#table#brand
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.