A comprehensive dental clinic management system with multi-role support and integrated modules.
dentacare/
├── clinic/ # Main Django application
│ ├── models/ # Database models
│ │ ├── employees.py # HR management models
│ │ ├── patients.py # Patient records
│ │ └── inventory.py # Drug inventory system
│ │
│ ├── views/ # Business logic
│ ├── templates/ # Frontend components
│ └── tests/ # Unit tests
│
├── clinic_app/ # Core Django project
│ ├── settings/ # Configuration
│ ├── urls.py # Routing
│ └── wsgi.py # Deployment
│
├── requirements.txt # Dependencies
└── manage.py # Django CLI
- Medical Staff
- Patient treatment history tracking
- Dental charting visualization
- Appointment scheduling
- HR Management
- Employee onboarding workflows
- Leave management system
- Performance evaluation templates
- Administration
- Drug inventory alerts (low stock/expiry)
- Payroll integration with tax calculations
- Audit trails for record changes
Module | Technology Stack | Key Functionality |
---|---|---|
Patient Records | Django ORM + PostgreSQL | Medical history, X-ray storage, Allergy alerts |
Payroll System | Python Decimal + Cronjobs | Automatic deductions, Payslip generation |
Drug Inventory | Django REST Framework | Batch tracking, Supplier management, Expiry alerts |
Appointment System | Celery + Redis | SMS reminders, Calendar sync, Conflict detection |
- Create virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables (create
.env
):
SECRET_KEY=your_django_secret
DEBUG=True
DB_NAME=dentacare_db
DB_USER=postgres_user
DB_PASSWORD=secure_password
- Run migrations:
python manage.py makemigrations
python manage.py migrate
- Create superuser:
python manage.py createsuperuser
Update settings.py
:
INSTALLED_APPS = [
...
'clinic.apps.ClinicConfig',
'rest_framework',
'crispy_forms',
]
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'clinic/static')]
- API Docs - Endpoint specifications
- User Manual - Role-specific workflows
- Database Schema - ER diagram
Run test suite:
pytest --cov=clinic tests/
# Dockerfile
FROM python:3.10
RUN pip install gunicorn
COPY . /app
WORKDIR /app
# docker-compose.yml
services:
web:
build: .
command: gunicorn clinic_app.wsgi:application --bind 0.0.0.0:8000
ports:
- "8000:8000"
- Fork the repository
- Create feature branch:
git checkout -b feature/new-module
- Commit changes
- Push to branch
- Open pull request
- Django Software Foundation
- PostgreSQL Global Development Group
- Medical Data Working Group standards