So you have master key from which unique baby public keys are created. Then someone registers their master-key in your system and, from then on, people can check how many times a related public key has been submitted before.
Right?
Now riddle me this:
1) what the hell does this have to do with bitcoin or any other cryptocurrency? It's just a centralized service that uses basic cryptography. Why would people trust your service? it can be hacked, your internal database modified, etc.
2) Are you seriously expecting people to print (and scan!) QR codes on individual pills? Really?
3) Finally, what is stopping some asshole from taking a pill from a bottle and replacing it with another pill with the same code?
Like, I don't want to be mean, but this is among the dumbest ideas I've ever heard.