Skip to content

ktawiah/StrokeSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Neurologist Consultation System

A modern, Django-based system for managing neurological consultations and patient care. Built for neurologists and healthcare providers.

πŸ“Š Dashboard Preview

Dashboard Preview

🌟 Features

  • πŸ‘¨β€βš•οΈ 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

πŸš€ Getting Started

Prerequisites

  • Python 3.8+
  • Poetry (Python dependency management)

Installation

  1. Clone the repository:
git clone https://github.com/ktawiah/neurologist-consultation-system.git
cd neurologist-consultation-system
  1. Install dependencies using Poetry:
poetry install
  1. Activate the virtual environment:
poetry shell
  1. Apply migrations:
python manage.py migrate
  1. Create a superuser:
python manage.py createsuperuser
  1. Load sample data (optional):
# Load sample patients
python manage.py load_sample_patients

# Generate sample medical data
python manage.py generate_sample_data
  1. Run the development server:
python manage.py runserver

Visit http://127.0.0.1:8000/ to access the application! πŸŽ‰

πŸ—οΈ Project Structure

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

πŸ§ͺ Testing

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_medical

Test Coverage

The test suite includes:

  1. Model Tests

    • User model validation and relationships
    • Patient model with age calculation
    • Medical models (VitalSign, LabResult, ImagingStudy)
    • Notification model with alert tracking
  2. Serializer Tests

    • User serializer with password validation
    • Patient serializer with age calculation and validation
    • Medical serializers with value validation
    • Notification serializer with alert status
  3. Form Tests

    • User creation and update forms
    • Patient forms with validation
    • Medical forms with value constraints

πŸ”’ Environment Variables

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-here

Make sure to:

  • Use a strong, randomly generated secret key
  • Never commit your actual credentials to version control
  • Keep your .env file in .gitignore

πŸ“ API Documentation

The system provides a RESTful API with the following endpoints:

User Management

  • POST /api/users/ - Create a new user
  • GET /api/users/{id}/ - Get user details
  • PUT /api/users/{id}/ - Update user information
  • DELETE /api/users/{id}/ - Delete a user

Patient Management

  • POST /api/patients/ - Create a new patient
  • GET /api/patients/ - List all patients
  • GET /api/patients/{id}/ - Get patient details
  • PUT /api/patients/{id}/ - Update patient information
  • DELETE /api/patients/{id}/ - Delete a patient

Medical Records

  • POST /api/vital-signs/ - Record vital signs
  • POST /api/lab-results/ - Upload lab results
  • POST /api/imaging-studies/ - Add imaging studies
  • GET /api/patients/{id}/medical-history/ - Get patient's medical history

Notifications

  • GET /api/notifications/ - List all notifications
  • PUT /api/notifications/{id}/acknowledge/ - Acknowledge a notification

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Django community for the amazing framework
  • All contributors who help improve this system
  • Healthcare providers for their valuable feedback

πŸ“ž Support

Having trouble? πŸ€”


Made with 🧠 and ❀️ by Walker

About

A stroke unit and neurologist consultation system

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •