Design and implement a REST API using C# and .NET, focusing on clean architecture, scalability, and extensibility. This challenge will assess your technical decision making skills, engineering ability, and approach to higher-level system design.
Youโre tasked with building an Appointment Scheduling API for a medical clinic. The system will manage patient appointments, doctor availability, and appointment statuses.
Note: Ensure that some sample data is added to demonstrate API functionality.
-
Implement the API including a database with the following endpoints and entities.
- Patient: ID, Name, Date of Birth, Phone number, email address
- Doctor: ID, Name, Specialty, Available Time Slots
- Appointment: ID, Patient ID, Doctor ID, Scheduled Time, Status (Scheduled, Completed, Cancelled)
- Create, update, and cancel an appointment
- Get available time slots for a specific doctor in a given specific date.
- Retrieve a patientโs appointment history
- Get a daily schedule of appointments for a doctor
- Generate a summary report of appointments by status (e.g., total scheduled, completed, cancelled) for a given time period
-
Include a postman collection with the submission to enable easy testing and evaluation of the API.
- Implement simple authentication.
- Add pagination and sorting for appointment and patient queries.
- Include an additional endpoint for doctor availability across multiple days.
- Language & Frameworks: Use C# and .NET 6 or later. You are free to use any third party packages where appropriate.
- Architecture: Structure your solution using clean architecture principles.
- Tests Include appropriate unit tests.
- Documentation: Document any design decisions and assumptions.
- Error Handling: Implement meaningful error messages and proper HTTP status codes.
Note: These are some conversation points that may be covered in a final interview.
-
Scalability: How would the system handle a high volume of appointment bookings and queries?
-
Extensibility: How would you design this API to support future features like telehealth appointments, reminders, or recurring appointments?
-
Data Storage: How would you model the data to avoid performance bottlenecks and maintain consistency?
- Provide any additional setup instructions
- Include comments explaining complex logic
- Advise our talent acquisition team once you have completed the assessment so that our team can begin their evaluation.
4-6 hours.
- Code quality and organisation.
- System design and scalability considerations.
- Clarity of documentation and communication.
- Testing approach.
- Thoughtfulness around extensibility and future needs.
If you have any questions or require any clarifications, please reach out to your hiring manager or our talent acquisition team.