Skip to content

elviswangari/OTZ_MRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

OTZ_MRS - Operation Triple Zero Management Reporting System

OTZ_MRS is a comprehensive management and reporting system designed for the Operation Triple Zero (OTZ) initiative, focusing on Children and Adolescents Living with HIV (CALHIV). The system streamlines patient tracking, clinical workflows, and reporting for healthcare workers (HCW) and patients (ROC - Retention of Care).

πŸ—οΈ Architecture Overview

The project is built using a modern full-stack architecture:

  • Backend: Node.js/Express with an MVC (Model-View-Controller) pattern.
    • Services Layer: All database operations are abstracted into service classes in backend/utils/db.js to ensure consistency and reusability.
    • Database: MongoDB (via Mongoose) for persistent storage.
    • Caching: Redis for session management and token blacklisting.
    • Authentication: JWT-based authentication with role-based access control (HCW vs. ROC).
  • Frontend: React 19 powered by Vite.
    • UI Framework: Tailwind CSS with Radix UI/shadcn components.
    • State Management: React hooks and custom hooks for data fetching.
    • Authentication: Integrated with react-auth-kit for secure route protection.

πŸš€ Features

🩺 Healthcare Worker (HCW) Dashboard

  • Patient Management: Comprehensive registration and profile updates for Children and Adolescents Living with HIV (CALHIV).
  • Clinical Workflows:
    • Triage: Record and track vitals (Weight, Height, Blood Pressure).
    • Lab Orders: Manage Viral Load (VL) results and historical data.
    • Pharmacy: Track ART regimens, start dates, and regimen lines.
    • Appointments: Schedule and monitor follow-up visits to ensure retention in care.
  • Automated Reporting: Generate complex, facility-ready Excel reports with a single click:
    • OTZ Monthly Report: Comprehensive monthly statistics.
    • STF (Suspected Treatment Failure) Report: Track patients with high viral loads.
    • Viral Load Summary: Detailed VL tracking across the facility.
  • Content Management: Create, update, and manage educational modules for patients.
  • User Management: Administer HCW accounts and roles.

πŸ‘€ Patient (ROC - Recipient of Care) Dashboard

  • Personal Health Record: Secure access to personal clinical data.
  • Vitals Tracking: View historical weight, height, and BP trends.
  • Lab Results: Access Viral Load results and dates.
  • Treatment History: Monitor current ART regimens and pharmacy history.
  • Appointment Reminders: View upcoming clinic dates to improve adherence.

πŸ›‘οΈ System Capabilities

  • Role-Based Access Control (RBAC): Strict separation between HCW and ROC functionalities.
  • Secure Authentication: JWT-based auth with Redis-backed token management for enhanced security.
  • Data Visualization: Interactive charts and progress indicators for clinical metrics.
  • Responsive Design: Fully responsive UI built with Tailwind CSS and Radix UI components, optimized for both desktop and mobile use.
  • Excel Integration: High-fidelity Excel export using exceljs for official reporting.
  • System Health Monitoring: Built-in status checks for Database and Redis connectivity.

πŸ› οΈ Tech Stack

Component Technology
Frontend React 19, Vite, Tailwind CSS, Radix UI, Chart.js
Backend Node.js, Express, Mongoose, Redis, JWT
Testing Mocha, Chai, Sinon
Reporting ExcelJS
Auth React Auth Kit, Bcrypt

πŸ“‚ Project Structure

OTZ_MRS/
β”œβ”€β”€ backend/                # Express Server
β”‚   β”œβ”€β”€ controllers/        # Request handlers
β”‚   β”œβ”€β”€ middleware/         # Auth & validation middleware
β”‚   β”œβ”€β”€ model/              # Mongoose schemas
β”‚   β”œβ”€β”€ routes/             # API route definitions
β”‚   β”œβ”€β”€ utils/              # Services (db.js), Redis, Errors
β”‚   └── server.js           # Entry point
β”œβ”€β”€ frontend/               # React Client
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # UI & Role-specific components
β”‚   β”‚   β”œβ”€β”€ lib/            # Utilities
β”‚   β”‚   β”œβ”€β”€ Axios.js        # API client wrapper
β”‚   β”‚   └── visitData.js    # Custom data fetching hooks
β”‚   └── vite.config.js      # Vite configuration
└── .github/                # Copilot instructions & CI

🚦 Getting Started

Prerequisites

  • Node.js (v18+)
  • MongoDB
  • Redis Server

Installation

  1. Clone the repository:

    git clone https://github.com/elviswangari/OTZ_MRS.git
    cd OTZ_MRS
  2. Setup Backend:

    cd backend
    npm install

    Create a .env file in backend/:

    PORT=3001
    DB_URL=mongodb://localhost:27017/otz_mrs
    SECRET_KEY=your_jwt_secret
  3. Setup Frontend:

    cd ../frontend
    npm install

Running the Application

  • Start Backend (Dev):
    cd backend
    npm run dev
  • Start Frontend (Dev):
    cd frontend
    npm run dev

πŸ§ͺ Testing

Backend tests are written using Mocha and Chai.

cd backend
npm test

🀝 Contributing

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

πŸ“§ Contact

Elvis Wangari - elviswangari@gmail.com

Project Link: https://github.com/elviswangari/OTZ_MRS

About

OTZ MRS: πŸš€ A powerful solution for efficiently managing data of Children and Adolescents Living with HIV (CALHIV). Built with Express, Node.js, MongoDB, and Redis, featuring a React frontend. Follows an MVC structure for a scalable backend. Simplify CALHIV data handling with real-time updates and user-friendly interfaces. πŸŒπŸ“Š

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors