Modeling of appointments for doctors and patients