Skip to content

Repository files navigation

Catalyst Crew SmartPHC: AI-Driven PHC Inventory Management

Catalyst Crew SmartPHC is an intelligent, facility-level platform developed by Catalyst Crew, designed to enhance operational efficiency at Primary Health Care (PHC) centers. It combines data synthesis, predictive modeling, database management, interactive dashboards, and a multilingual AI chatbot to enable data-driven decision-making and streamline inventory management.


Table of Contents


Overview

SmartPHC addresses PHC inventory management challenges by:

  1. Synthesizing realistic inventory and patient flow data (~10,000 rows, ~27 years).
  2. Predicting drug stock levels 7 days in advance using an LSTM model.
  3. Loading and managing data in a relational database.
  4. Providing an interactive inventory form for daily data submission.
  5. Displaying insights through an embedded Power BI dashboard.
  6. Offering a multilingual AI chatbot fine-tuned for medical and operational queries.

Key Features

1. Data Synthesis

Generates PHC inventory data including:

  • date
  • Total_Patients
  • OutPatients
  • InPatients
  • Medical_Staff
  • Total_Beds
  • Beds_Occupied
  • Beds_Available
  • Malaria_Drugs_In_Stock
  • Typhoid_Drugs_In_Stock
  • Cough_Drugs_In_Stock
  • Cold_Drugs_In_Stock
  • Paracetamol_Drugs_In_Stock

2. Time Series Forecasting (LSTM)

  • Predicts drug quantities after 7 days.
  • Performs feature engineering and data transformation prior to training.
  • Supports proactive inventory management and prevents stockouts.

3. Database Management

  • Stores synthesized and user-submitted data.
  • Enables efficient querying for analytics and predictive modeling.

4. Inventory Form

  • Interactive form to submit daily PHC data.
  • Collects the same variables as the synthesized dataset.
  • Automatically stores data in the database.

5. Inventory Form Submission & Prediction

  • Retrieves the last 7 days of submitted data.
  • Generates drug stock predictions using the trained LSTM model.

6. Power BI Dashboard

  • Embedded dashboard visualizes inventory and operational trends.
  • Supports data-driven decision-making for administrators.

7. Multilingual AI Chatbot

  • Fine-tuned Gemini LLM for medical context and conversation history.
  • Understands follow-up questions for accurate responses.
  • Supports multiple languages for diverse PHC staff.

Technologies Used

  • Backend: Python, Streamlit
  • Database: MySQL
  • Machine Learning: TensorFlow, Keras, LSTM
  • Data Visualization: Power BI
  • AI & NLP: Gemini LLM fine-tuning
  • Data Processing: Pandas, NumPy
  • Others: Joblib, dotenv

Data Structure

Feature Type
date Date
Total_Patients Integer
OutPatients Integer
InPatients Integer
Medical_Staff Integer
Total_Beds Integer
Beds_Occupied Integer
Beds_Available Integer
Malaria_Drugs_In_Stock Integer
Typhoid_Drugs_In_Stock Integer
Cough_Drugs_In_Stock Integer
Cold_Drugs_In_Stock Integer
Paracetamol_Drugs_In_Stock Integer

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/Ibe-Donald/Catalyst_Crew
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Configure your gemini api_key, and database connection in .env.

  4. Load the csv data to your database:

    python loading_csv_to_database.py
    
  5. Create your PowerBI dashboard, embed your report and use embed link in PowerBI_Dashboard.py

  6. Run the Streamlit app:

    streamlit run app.py
    

Usage

  • Submit Inventory Data: Enter daily PHC inventory information using the Inventory Form.
  • Automatic Database Storage: All submitted data is securely stored in the connected database for tracking and analysis.
  • Predictive Analytics: The LSTM model forecasts future drug stock levels to prevent stockouts and ensure smooth operations.
  • Insights Dashboard: Access operational and inventory trends through the embedded Power BI Dashboard.
  • Multilingual Chatbot Support: Interact with the AI chatbot for guidance, operational support, and follow-up queries in multiple languages.

Future Enhancements

  • Expanded Predictive Models: Introduce models for patient flow, bed occupancy, and other operational metrics.
  • Real-Time Notifications: Alerts for low stock levels or critical inventory shortages.
  • Mobile Application: Offline-capable app for field staff to enter data on-the-go.
  • Enhanced Chatbot Knowledge: Broaden the chatbot’s medical knowledge base for more comprehensive support and accurate responses.

About

Catalyst Crew SmartPHC is an AI-driven, facility-level intelligence platform designed to help individual Primary Health Care (PHC) centers operate more efficiently, make data-informed decisions, and ensure continuous access to essential resources.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages