Modeling and Optimization of Care Transitions