Added CoreData support for patients