Bright Smile Dental Systems is a comprehensive patient and provider management platform for dental clinics. This system allows administrative employees to efficiently manage clinics, doctors, patients, and appointments across multiple locations.
Its a platform where Bright Smile Dental Systems administrative “Users” can efficiently manage these entities and related tasks, such as scheduling appointments and tracking visits.
DEMO VIDEO : Bright Smile Care Demo Video
- Features
- Code Structure
- UI/UX Design Choices
- Database Design
- Technical Stack
- Prerequisites
- Installation
- Running the Application
- Using the Platform
- API Endpoints
- Assumptions and Configurations
- Future Improvements
- User authentication and authorization
- Management of clinics, doctors, and patients
- Appointment scheduling and tracking
- Visit history and procedure tracking
- REST APIs for external system integration
The project follows a modular structure, with separate Django apps for different functionalities:
clinics/
: Manages clinic-related models and viewsdoctors/
: Handles doctor-related functionalitypatients/
: Manages patient information and recordsappointments/
: Deals with appointment scheduling and managementprocedures/
: Manages dental procedures
This modular approach ensures separation of concerns and makes the codebase easier to maintain and extend.
The user interface is designed with simplicity and efficiency in mind:
- JS, Bootstrap is used for responsive design, ensuring compatibility across devices
- Intuitive navigation with a clear menu structure
- Form validation provides immediate feedback to users
- Consistent color scheme and layout across pages for a cohesive experience
- Modal dialogs for quick actions without leaving the current page
The database is designed to efficiently represent the relationships between entities:
- Clinics, Doctors, and Patients are the core entities
- Many-to-many relationships (e.g., doctors to clinics) are represented using junction tables
- Appointments and Visits are separate entities to distinguish between scheduled and completed events
- Procedures are linked to both doctors and clinics to represent capabilities and offerings
For a detailed database schema, refer to the Database Specification document.
- Backend: Django 4.2
- Frontend: HTML, Bootstrap 4, and JavaScript - Fetch API, DataTable
- Database: PostgreSQL 12
- API: Django REST Framework
- Python 3.8 or higher
- PostgreSQL 12 or higher
- pip (Python package manager)
- virtualenv
-
Clone the repository:
git clone https://github.com/absaw/Bright-Smile-Dental-Systems.git cd bright-smile-dental-systems
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
-
Update the database configuration in
bright_smile/settings.py
:DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'bright_smile_dental', 'USER': 'your_postgres_username', 'PASSWORD': 'your_postgres_password', 'HOST': 'localhost', 'PORT': '5432', } }
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Populating the Database
After setting up your database schema, you can populate it with sample data using the provided script. Follow these steps:
-
Ensure you've completed the database setup steps mentioned earlier.
-
Run the population script using the Django shell:
python manage.py shell < populate_database.py
This script will create:
- 5 clinics in the New Brunswick, NJ area
- 10 doctors with valid NPIs
- 10 patients
- 5 dental procedures
- Sample appointments and visits
The data is consistent across all models and provides a good starting point for testing the application.
Chekout the database-specifiation.md for more details
-
Collecting static files
python manage.py collectstatic --noinput
-
Start the development server:
python manage.py runserver --insecure
- Open a web browser and navigate to
http://localhost:8000
- Log in using the superuser credentials you created earlier.
-
Clinics Management:
- View and manage clinics from the Clinics tab
- Add new clinics or edit existing ones
- View doctors and patients affiliated with each clinic
- Add doctor affiliations to the clinic
- Edit doctor notes and working schedule
-
Doctors Management:
- View and manage doctors from the Doctors tab
- Add new doctors or edit existing ones
- Manage doctor specialties and clinic affiliations
-
Patients Management:
- View and manage patients from the Patients tab
- Add new patients or edit existing ones
- View patient visit history and schedule appointments
- Appointments:
- Schedule new appointments for patients, based on procedure, clinic and doctor preference and available time slots
- View and manage existing appointments
- Visits:
- Record new visits for patients
- View and manage visit history
You will need an authorization token with a username and password to use the API endpoints.
You can use POSTMAN to make a POST request after an account is created to get your authorization token, which you can later use for making HTTP requests to the endpoints; Exact steps:-
a. Get an authentication token:
- Open Postman
- Create a new POST request
- URL:
http://localhost:8000/api/get-token/
- In the "Body" tab, select "x-www-form-urlencoded"
- Add two key-value pairs:
- Key:
username
, Value: (your user's username) - Key:
password
, Value: (your user's password)
- Key:
- Send the request
- You should receive a response with a token
b. Use the token to access a protected endpoint:
- Create a new GET request
- URL:
http://localhost:8000/clinics/api/clinics/
- In the "Authorization" tab:
- Type: Choose "Bearer Token"
- Token: Paste the token you received from the previous request
- Send the request
- You should now receive the JSON data from your clinics endpoint
The following REST API endpoints are available:
-
Add Patient:
POST /patients/api/patients/
- Add a new patient to the system.
-
Add Doctor:
POST /doctors/api/doctors/
- Add a new doctor to the system.
-
Get Clinics:
GET /clinics/api/clinics/
- Retrieve a list of all clinics.
-
Get Clinic Information:
GET /clinics/api/clinics/<clinic_id>/
- Retrieve detailed information about a specific clinic.
-
Update Clinic:
PUT /clinics/api/clinics/<clinic_id>/update/
- Update information for a specific clinic.
-
Get Available Doctors:
GET /clinics/api/doctors/available/
- Retrieve a list of available doctors.
-
Add Doctor Affiliation:
POST /clinics/api/doctors/add-affiliation/
- Add a new affiliation between a doctor and a clinic.
-
Update Doctor Affiliation:
PUT /clinics/api/doctors/<doctor_id>/update-affiliation/
- Update the affiliation details for a specific doctor.
-
Get Clinics by Procedure:
GET /clinics/api/clinics/by-procedure/<procedure_id>/
- Retrieve a list of clinics that offer a specific procedure.
-
Get Available Time Slots:
GET /appointments/api/available-time-slots/
- Retrieve available time slots for appointments.
-
Book Appointment:
POST /appointments/api/book/
- Book a new appointment.
-
Get Patients:
GET /patients/api/patients/
- Retrieve a list of all patients.
-
Get Patient Detail:
GET /patients/api/patients/<patient_id>/
- Retrieve detailed information about a specific patient.
-
Update Patient:
PUT /patients/api/patients/<patient_id>/update/
- Update information for a specific patient.
-
Add Visit:
POST /patients/api/visits/add/
- Add a new visit record for a patient.
- The system assumes a single time zone (UTC) for all operations. Adjust the
TIME_ZONE
setting insettings.py
if needed. - Appointments are scheduled in 1-hour slots.
- The system uses Django's built-in authentication system.
- Static files are served using Django's
staticfiles
app in development. For production, configure a proper static file serving solution.
- Installing Postgres locally
- Creating BrightSmile database on Postgres
- Designing database according to requirement
- Database specification document
- Entity Relationsihip Diagram
- Creating Django Project
- Defining and creating django apps for clinics, doctors, patients
- Defining database tables in django app models files
- Makemigrations and Migrate to create tables in existing brightsmile database
Video :
/Bright Smile Dental Care Site Demo.mp4
- Implement a more granular time control for appointments
- Add support for multiple languages
- Integrate a calendar view for appointment management
- Implement real-time notifications for new appointments
- Add dark mode
This project is licensed under the MIT License.