Schedule and query
Input
h = Hospital(); h.add_patient(Patient('Alice', 30)); h.add_doctor(Doctor('Dr. Smith', 'Cardiology')); id = h.schedule_appointment('Alice','Dr. Smith','09:00'); h.get_appointments_by_doctor('Dr. Smith')
Output
[('Alice', '09:00')]
After adding a patient and doctor, scheduling an appointment returns an id and querying the doctor's appointments returns a list with one tuple for Alice at 09:00.