Congratulations on a valuable experience. You have learned a ton and summarized it wisely. This is all worth a lot more than 40k!
Although the typical SF startup drum is about changing the world, it takes a lot more than just a good product to do it, as you've found out, and especially in healthcare, where the barrier to entry is extremely high.
Also, your doctors forgot to mention that Pharma companies actually pay them (indirectly) for prescribing a certain drug. Your software was not just not useful to them, it was actually telling many a story they did not want to hear. Sure, Tylenol might actually be #3 of the list, but their sales rep is a real friendly one, and next time they go out for dinner, it would be a shame to have prescribed something else...
Anyway, now you know. Isn't that an amazing feeling that you've learned so much that others would never dare, and it had only cost you $40k? Keep going, good lessons are worth it!
p.s. Just because your original iteration of the product was not needed by doctor and not valuable enough to be paid by the consumer, it doesn't make it useless.
Perhaps if you made it the #1 on Google, consumers would notice, and use it, then you could use it as a lead-gen for other products, and sell that space/time/data.. whatever.
The funny thing about startup ideas, your first iteration is probably almost always wrong.