Skip to content

treejitsu/MedQT

Repository files navigation

Final Project

API Service CI ML Service CI Linting CI

MedQT

What if patients didn’t have to wait in uncertainty, and clinics could prioritize care automatically based on symptoms? That's where MedQT comes in. This platform provides AI-driven triage, real-time queue management, and personalized wait-time prediction using a distributed microservice design. With a transparent audit log and clean patient–doctor interface, it makes walk-in care faster, safer, and more efficient.


Docker Images

Service DockerHub Link

Team Members

Name GitHub
Conor Tiernan ct-04
Sean Tang plant445
Jaylon McDuffie treejitsu
Howard Appel hna2019
Sam Murshed SamMurshed

System Architecture

  • MedQT consists of 3 interconnected microservices:

API Service (FastAPI)

  • Hosts patient and doctor dashboards

  • Implements triage logic

  • Communicates with the ML predictor

  • Sends audit events to the Logger

  • Stores data in MongoDB

ML Predictor Service

  • Flask service hosting a trained regression model

  • Predicts estimated wait times

  • Used by API for patient ETA calculations

Mongo DB Service

  • Mongo DB database hosted by the droplet

Configuring and Running the System (All Platforms)

  • This project is containerised, so the simplest and recommended way to run everything (API, ML service, MongoDB, seed data) is with Docker Compose.

1. Prerequisites

  • Install:

  • Git

  • Docker

  • Windows/macOS: install Docker Desktop

  • Linux: install docker and the Compose plugin (docker compose)

  • Python 3.11+ (only needed if you want to run services without Docker)


Verify:

git --version
docker --version
docker compose version

2. Clone the Repository

3. Create the .env File

  • Sent in private chat with submission

  • Then edit .env and update any passwords or secrets as described in the section “Secret configuration files (.env and env.example)” below.

4. Run the Full System in Development

From the project root:

docker compose up --build

This will start:

  • MongoDB (with initial collections and seed data from database/init)

  • API service (FastAPI)

  • ML service (wait-time predictor)


Once the containers are healthy, visit:

Required GitHub Secrets

The following secrets must be configured in the GitHub repository:

  • DOCKERHUB_USERNAME – My DockerHub account username
  • DOCKERHUB_TOKEN – A DockerHub Personal Access Token with write permission
  • DO_SSH_KEY – The private key used by CI/CD to deploy to the droplet
  • D0_SSH_HOST – The IP address of the droplet
  • D0_SSH_USER – The SSH username (usually "root")
  • D0_SSH_PORT – Port required

These must be added under:

  • GitHub → Settings → Secrets and variables → Actions → New Repository Secret

An exercise to put to practice software development teamwork, subsystem communication, containers, deployment, and CI/CD pipelines. See instructions for details.

Development

# Navigate to the API service
cd api_service

# Install dependencies (including dev requirements)
pip install -r requirements.txt

# Format all Python code
black .

# Lint Python files using pylint
pylint app/**/*.py

# Run API service tests with coverage enforcement
pytest \
  --cov=app \
  --cov=models \
  --cov-fail-under=80
  

# Navigate to the Machine Learning service
cd ../ml_service

# Install dependencies
pip install -r requirements.txt

# Format all Python code
black .

# Lint Python files using pylint
pylint app --ignore=tests

# Run ML tests with coverage enforcement
pytest \
  --cov=. \
  --cov-report=term-missing \
  --cov-fail-under=80 \
  --import-mode=importlib \
  app

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors