Unfortunately, there's no single database which really connects all the dots. So from the fda site on off patent drugs, you'll need to find a way of looping through the names with drugs.com and wikipedia to know everything they can be used for.
I'm very busy with a new genealogy site, but it does sound like something very useful for the public.
On the other hand, it would cost Big Pharma so much money that they would almost certainly prosecute any website that disseminates this very useful info.
They'd probably claim it's "practicing medicine" or something like that.
patrick.net
An Antidote to Corporate Media
1,249,395 comments by 14,901 users - DhammaStep, Misc, RWSGFY online now