Optimizing care delivery using healthcare data