Skip to content
Snippets Groups Projects
Select Git revision
  • main default
  • trung
  • huan
  • master
4 results

ccu-htm

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    muoimeo authored
    5a760b56
    History

    CCU HTM - Critical Care Unit Healthcare Task Management System

    CCU HTM is a web application for managing patients in a Critical Care Unit (CCU), focusing on nutritional monitoring, referral management, and report generation. The application is developed using Flask with an intuitive interface based on Tailwind CSS.

    Key Features

    • Patient Profile Management: Track personal information, BMI, blood type, and admission history
    • Physiological Measurements Monitoring: Record and analyze vital metrics like heart rate, blood pressure, FiO2, temperature
    • Referral System: Manage the referral process from request to completion
    • Nutritional Procedure Management: Document and track nutritional procedures for patients
    • Report Generation: Create and export reports in various formats (Excel, PDF)
    • CSV Data Upload: Batch import data from CSV files
    • Visual Dashboard: Display statistics and visualizations about patient status and unit activities
    • Alert System: Automatic notifications when abnormal metrics are detected
    • Dietitian Assignment: Assign and manage dietitians for each patient

    System Requirements

    • Python 3.8+
    • MySQL 5.7+ or MariaDB 10.2+
    • Modern web browser (Chrome, Firefox, Edge)
    • Internet connection (for CDN components)

    Installation

    1. Clone the repository:
    git clone https://gitlab.uwe.ac.uk/bvn2-minh/ccu-htm.git
    cd ccu-htm
    1. Create and activate a virtual environment:
    python -m venv venv
    # On Windows
    venv\Scripts\activate
    # On Linux/Mac
    source venv/bin/activate
    1. Install dependencies:
    pip install -r requirements.txt
    1. Configure the database: Edit instance/config.py file with the following content:
    SECRET_KEY = 'your-secret-key'
    SQLALCHEMY_DATABASE_URI = 'mysql://username:password@localhost/ccu_htm'
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    UPLOAD_FOLDER = 'uploads'
    1. Run the application using the helper menu:
    # On Windows
    run_ccu.bat

    The menu displays the following options:

    • 1. Run the application: Start the CCU HTM system
    • 2. Stamp database to latest migration: Fix synchronization issues
    • 3. Generate new migration: Create migration files after model changes
    • 4. Apply database migrations: Update the database structure
    • 5. Reset database: Delete all data and recreate the database (use with caution)
    • 6. Exit: Close the program

    For first-time setup, select option 5 to reset the database, then option 1 to run the application.

    Or run directly from the command line:

    # Reset database (deletes all data)
    python run.py --reset
    
    # Run the application
    python run.py --clean

    Usage

    1. Access the application via browser at: http://localhost:5000
    2. Log in with the default account:

    Project Structure

    ccu_htm/
    ├── app/                    # Main application directory
    │   ├── models/             # Data model definitions
    │   │   ├── patient.py      # Patient and encounter models
    │   │   ├── referral.py     # Referral model
    │   │   ├── report.py       # Report model
    │   │   ├── measurement.py  # Physiological measurement model
    │   │   ├── procedure.py    # Procedure model
    │   │   ├── dietitian.py    # Dietitian model
    │   │   └── user.py         # User model
    │   ├── routes/             # Blueprints and controllers
    │   │   ├── auth.py         # Authentication routes
    │   │   ├── dashboard.py    # Dashboard routes
    │   │   ├── patients.py     # Patient management routes
    │   │   ├── dietitians.py   # Dietitian management routes
    │   │   ├── dietitian.py    # Individual dietitian views
    │   │   ├── report.py       # Report management routes
    │   │   ├── support.py      # Support messaging system
    │   │   ├── main.py         # Main page and navigation
    │   │   ├── notifications.py # User notifications
    │   │   └── upload.py       # CSV upload handling
    │   ├── forms/              # Form definitions
    │   │   ├── dietitian_forms.py # Dietitian-related forms
    │   │   └── other form files
    │   ├── static/             # Static resources
    │   │   ├── css/            # Stylesheets
    │   │   ├── js/             # JavaScript
    │   │   └── img/            # Images
    │   ├── templates/          # HTML templates
    │   │   ├── base.html       # Base template
    │   │   ├── _macros.html    # Reusable template components
    │   │   ├── _formhelpers.html # Form rendering helpers
    │   │   ├── dashboard/      # Dashboard templates
    │   │   ├── patients/       # Patient related templates
    │   │   ├── dietitians/     # Dietitian templates
    │   │   └── reports/        # Report templates
    │   ├── utils/              # Utilities and helper functions
    │   │   ├── decorators.py   # Permission decorators
    │   │   └── report_generator.py # Report generation
    │   └── __init__.py         # Flask application initialization
    ├── migrations/             # Database migration files
    ├── instance/               # Machine-specific configuration
    │   └── config.py           # Database and app configuration
    ├── run.py                  # Application entry point
    ├── run_ccu.bat             # Windows batch file for easier execution
    └── requirements.txt        # Dependency list

    Main Functions

    Dashboard

    • Overview of patient count, referrals, and reports
    • Patient BMI distribution chart
    • Alerts for issues requiring attention
    • Timeline of recent activities

    Patient Management

    • Add, view, edit patient information
    • Track encounter history and physiological metrics
    • Create referrals for patients
    • View reports related to patients

    Dietitian Management

    • Add, view, edit dietitian information
    • Assign dietitians to patients
    • Track dietitian workload and availability
    • Monitor dietitian status (Available or Unavailable)

    Referral Management

    • Create new referral requests
    • Track referral status
    • Record feedback and results

    Reports

    • Create nutritional assessment reports
    • Generate statistical reports by day, week, month
    • Export reports as Excel or PDF

    Data Upload

    • Upload CSV files containing patient data
    • Automatic data validation and processing
    • View upload history and processing results

    Contributing and Development

    This project was developed by second-year students at the University of the West of England - Phenikaa Campus. If you want to contribute:

    1. Fork the project
    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. Create a Pull Request