Appointment planning and scheduling in primary care