A new study tallies up the toll taken by poor quality medical care.