A modern, Django-based system for managing neurological consultations and patient care. Built for neurologists and healthcare providers.
-
π¨ββοΈ Patient Management
- Comprehensive patient profiles
- Medical history tracking
- Appointment scheduling
- Age calculation
- Critical alerts tracking
-
π₯ Consultation Management
- Detailed Consultation Records
- Treatment Plan
- Progress Notes
- Follow-Up Scheduling
-
π Lab Results & Imaging
- Upload and track lab results
- Manage imaging studies
- Historical data visualization
- Vital signs monitoring
- Lab result validation
-
β‘ Real-time Alerts
- Critical result notifications
- Appointment reminders
- Treatment milestones
- Pending consultation tracking
-
π± Modern UI/UX
- Responsive design
- Intuitive navigation
- Mobile-friendly interface
The system features a modern, intuitive dashboard that provides:
-
Key Metrics at a Glance:
- Total number of patients under care
- Average NIHSS (National Institutes of Health Stroke Scale) scores
- Number of pending consultations
- Count of critical alerts requiring attention
-
Recent Patients Table:
- Patient name and age
- Current NIHSS score
- Latest vital signs
- Patient status (Critical/Pending)
- Quick actions (View/Consult)
-
Critical Alerts Section:
- Real-time alert monitoring
- Alert type classification
- Time-based tracking
- Acknowledgment status
- Quick acknowledgment actions
- Python 3.8+
- Poetry (Python dependency management)
- Clone the repository:
git clone https://github.com/ktawiah/neurologist-consultation-system.git
cd neurologist-consultation-system- Install dependencies using Poetry:
poetry install- Activate the virtual environment:
poetry shell- Apply migrations:
python manage.py migrate- Create a superuser:
python manage.py createsuperuser- Load sample data (optional):
# Load sample patients
python manage.py load_sample_patients
# Generate sample medical data
python manage.py generate_sample_data- Run the development server:
python manage.py runserverVisit http://127.0.0.1:8000/ to access the application! π
neurologist-consultation-system/
βββ config/ # Project configuration
β βββ settings/ # Settings for different environments
βββ core/ # Main application
β βββ api/ # REST API endpoints
β βββ models/ # Database models
β β βββ user.py # User model
β β βββ patient.py # Patient model
β β βββ medical.py # Medical models
β β βββ notification.py # Notification model
β βββ serializers/ # API serializers
β β βββ user.py # User serializer
β β βββ patient.py # Patient serializer
β β βββ medical.py # Medical serializers
β β βββ notification.py # Notification serializer
β βββ tests/ # Test suite
β β βββ models/ # Model tests
β β βββ serializers/ # Serializer tests
β β βββ forms/ # Form tests
β βββ templates/ # HTML templates
β βββ views.py # View logic
βββ static/ # Static files (CSS, JS, images)
βββ pyproject.toml # Poetry project configuration
βββ manage.py # Django management script
The application includes comprehensive test coverage for models, serializers, and forms. To run the tests:
# Run all tests
poetry run python manage.py test
# Run specific test modules
poetry run python manage.py test core.tests.models
poetry run python manage.py test core.tests.serializers
poetry run python manage.py test core.tests.forms
# Run specific test classes
poetry run python manage.py test core.tests.serializers.test_user
poetry run python manage.py test core.tests.serializers.test_patient
poetry run python manage.py test core.tests.serializers.test_medicalThe test suite includes:
-
Model Tests
- User model validation and relationships
- Patient model with age calculation
- Medical models (VitalSign, LabResult, ImagingStudy)
- Notification model with alert tracking
-
Serializer Tests
- User serializer with password validation
- Patient serializer with age calculation and validation
- Medical serializers with value validation
- Notification serializer with alert status
-
Form Tests
- User creation and update forms
- Patient forms with validation
- Medical forms with value constraints
Create a .env file in the root directory with the following variables:
DEBUG=True
SECRET_KEY=your-secret-key-here
DATABASE_URL=your-database-url-hereMake sure to:
- Use a strong, randomly generated secret key
- Never commit your actual credentials to version control
- Keep your
.envfile in.gitignore
The system provides a RESTful API with the following endpoints:
POST /api/users/- Create a new userGET /api/users/{id}/- Get user detailsPUT /api/users/{id}/- Update user informationDELETE /api/users/{id}/- Delete a user
POST /api/patients/- Create a new patientGET /api/patients/- List all patientsGET /api/patients/{id}/- Get patient detailsPUT /api/patients/{id}/- Update patient informationDELETE /api/patients/{id}/- Delete a patient
POST /api/vital-signs/- Record vital signsPOST /api/lab-results/- Upload lab resultsPOST /api/imaging-studies/- Add imaging studiesGET /api/patients/{id}/medical-history/- Get patient's medical history
GET /api/notifications/- List all notificationsPUT /api/notifications/{id}/acknowledge/- Acknowledge a notification
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Django community for the amazing framework
- All contributors who help improve this system
- Healthcare providers for their valuable feedback
Having trouble? π€
- Check out our documentation
- Create an issue
- Contact us at support@example.com
Made with π§ and β€οΈ by Walker
