Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Conversation

@rugved-bodke
Copy link

Merge Request: Build Appointment Scheduling Feature for Doctors

This merge request implements a feature to manage doctor schedules and book appointments using the SQL-based skeleton for the FastAPI project.

Key Features Added:

Doctor Management:

  • CRUD operations for doctors, including the ability to manage doctor details like id, name, locations, and weekly schedule.

Availability Management:

  • A system to model a doctor's availability by defining specific times during the week when they are free.

Appointment Management:

  • Booking an appointment for a specific doctor, location, and available time.
  • Fetching all appointments for a doctor.
  • Cancelling an appointment for a doctor.

Implementation Details:

  • Persistence Layer: The feature uses the SQL-based skeleton (SQLite) for better scalability and real-world alignment.
  • API Endpoints: Additional endpoints for appointment booking, fetching, and cancellation have been introduced.
  • Validation: Ensures appointments are booked only during available slots and avoids overlapping appointments for the same doctor.

Tests:

  • Unit tests have been written for critical flows, including creating doctors, managing availability, and booking appointments.
  • Test cases are designed using the Test-Driven Development (TDD) approach.

Future Considerations:

  • Extend the availability model to support holidays and special schedules.
  • Add support for real-world constraints like patient reminders, appointment notifications, and time zone handling.
  • Implement rate-limiting and user authentication for better security and scalability if the API is exposed externally.

Steps to Run:

  1. Update dependencies: pip install -r requirements.txt
  2. Run the server: python server.py
  3. Access the API at http://localhost:8000

Feel free to review and provide feedback!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant