Necessary evil: yes, to some extent. I didn't say "get rid of all patents", just that they can cause market failures.
I could imagine some models to make them less evil, for example by having a scheme that forces companies to grant fairly priced licenses to their competitors. Or, for drugs whose availability is in society's general interest, a government reimbursing the development costs. For both of these one would need a fair way of determining development costs, but as far as I understand pharma research already has a detailed paper trail to make sure their patent applications are bullet-proof.
I could imagine some models to make them less evil, for example by having a scheme that forces companies to grant fairly priced licenses to their competitors. Or, for drugs whose availability is in society's general interest, a government reimbursing the development costs. For both of these one would need a fair way of determining development costs, but as far as I understand pharma research already has a detailed paper trail to make sure their patent applications are bullet-proof.