One past employer was looking to do such a thing. They handled electronic prescriptions, lab results and insurance claim filings. The premise was that pharmaceutical companies would be interested in long term longitudinal studies of patients.
I identified the highest risk to be the anonymizer system. I called it "sausagizer" because it is easy to turn cows into sausages, but hard/impossible to turn sausages back into cows.
One problem is that data entry isn't consistent or repeatable. So what might be entered as "John Doe" one day, might be "J Doe" or "Doe John" some other days. This is called "patient matching" and has been an area of interest for several decades. One paper discussing it is:
http://www.cecs.csulb.edu/~monge/research/thesis.pdf
Most researchers in similar areas ended up getting lured into "bioinformatics" for the Human Genome Project. More prestige, more money and gene matching is suprisingly similar to string matching.
Sadly, most of the research in the area of patient matching "went dark" after 911. By "going dark" I mean a combination of researchers who used to publish, now no longer do; and companies that used to publish even white papers have disappeared from the market. One such was NORA from SRD. IBM ended up buying the company, and shortly afterwards, all web pages, white papers and even the whole website of SRD vanished (even from archive.org).
http://www.pcworld.com/article/103692/tracking_terrorists_th...
http://jeffjonas.typepad.com/jeff_jonas/2006/02/what_do_you_...