Pain Management Support Group (PMSG) Platform

Version: 1.0
Launch Target: January 2026
Status: Development Phase


๐Ÿ“‹ Project Overview

The PMSG Platform is a comprehensive, data-driven system for delivering peer-supported chronic pain management education. This 8-week, in-person program combines:

  • Evidence-based education on pain neuroscience, medications, and alternatives
  • Peer support through structured group sessions
  • Movement practices (Tai Chi, Qigong, Yoga)
  • Data collection (BPI, ODI, PHQ-8, PCS, PAM-10)
  • Machine learning analysis for program optimization

Program Format: - 4 sessions/week ร— 2.5 hours ร— 8 weeks = 80 contact hours - 12-16 participants per cohort - In-person delivery


๐Ÿ—๏ธ Architecture

pmsg-platform/
โ”œโ”€โ”€ backend/          # FastAPI Python backend
โ”œโ”€โ”€ frontend/         # React web application
โ”œโ”€โ”€ database/         # PostgreSQL schemas and migrations
โ”œโ”€โ”€ curriculum/       # 8-week educational content
โ”œโ”€โ”€ research/         # Evidence base and literature
โ”œโ”€โ”€ assessments/      # BPI, ODI, PHQ-8, PCS, PAM-10
โ”œโ”€โ”€ data-analysis/    # Python/R ML pipelines
โ”œโ”€โ”€ infrastructure/   # Docker, GCP, CI/CD
โ””โ”€โ”€ documentation/    # API docs, user guides

Tech Stack

Component Technology
Frontend React 18, Material-UI/Tailwind, Recharts
Backend FastAPI (Python 3.10+), SQLAlchemy, Pydantic
Database PostgreSQL 15+
Vector Stores ChromaDB + Pinecone (comparative eval)
RAG LangChain, OpenAI embeddings
ML/Analytics scikit-learn, pandas, R (tidyverse, caret)
Cloud Google Cloud Platform (primary), Azure (eval)
Containers Docker, Docker Compose
CI/CD GitHub Actions

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL 15+
  • Docker & Docker Compose
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/your-org/pmsg-platform.git
cd pmsg-platform
  1. Set up the backend:
cd backend
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Set up the database:
# Create PostgreSQL database
createdb pmsg_db

# Run schema
psql -d pmsg_db -f ../database/schemas/pmsg_schema.sql
  1. Set up the frontend:
cd ../frontend
npm install
  1. Configure environment variables:
# Backend
cp backend/.env.example backend/.env
# Edit backend/.env with your database credentials

# Frontend
cp frontend/.env.example frontend/.env
  1. Run the application:
# Backend (from backend/)
uvicorn main:app --reload --host 0.0.0.0 --port 8000

# Frontend (from frontend/)
npm start

Access the application at: - Frontend: http://localhost:3000 - Backend API: http://localhost:8000 - API Docs: http://localhost:8000/docs


๐Ÿ“š Documentation


๐ŸŽ“ Curriculum Overview

Week Topic Movement
1 Pain Fundamentals & Orientation Gentle Movement
2 Nervous System & Pain Pathways Tai Chi
3 Medications - Benefits & Risks Qigong
4 Alternative Therapies Yoga
5 Nutrition & Anti-Inflammatory Diet Tai Chi
6 Musculoskeletal Health & Exercise Mixed
7 Psychological Aspects of Pain Qigong
8 Integration & Moving Forward Participant Choice

๐Ÿ“Š Assessments

Primary Outcomes: - BPI (Brief Pain Inventory): Pain severity and interference - ODI (Oswestry Disability Index): Functional disability

Secondary Outcomes: - PHQ-8: Depression screening - PCS: Pain Catastrophizing Scale - PAM-10: Patient Activation Measure

Timepoints: - Baseline (Week 0) - Weekly (Weeks 1-8) - Post-program (Week 8) - Follow-up (3, 6, 12 months)


๐Ÿค– Machine Learning Analysis

Objectives: 1. Predict program completion 2. Identify responder phenotypes 3. Optimize curriculum components 4. Forecast long-term outcomes

Methods: - Linear Regression - Random Forest - K-Means Clustering - Time Series Analysis

Tools: - Python: scikit-learn, pandas, matplotlib - R: tidyverse, caret, randomForest, ggplot2 - Jupyter Notebooks / R Markdown


๐Ÿ” Security & Compliance

HIPAA Compliance

  • โœ… Encryption at rest (PostgreSQL, files)
  • โœ… Encryption in transit (HTTPS/TLS)
  • โœ… Access controls (role-based)
  • โœ… Audit logs (all PHI access)
  • โœ… Secure authentication (JWT)
  • โœ… Regular backups (encrypted)

Data Privacy

  • Informed consent required
  • Minimum necessary access
  • De-identification for research
  • Right to withdraw

๐Ÿงช Testing

# Backend unit tests
cd backend
pytest tests/ -v --cov=.

# Frontend tests
cd frontend
npm test

# End-to-end tests
npm run test:e2e

๐Ÿšข Deployment

Docker Deployment

# Build and run all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

GCP Deployment

# Authenticate
gcloud auth login

# Deploy backend to Cloud Run
gcloud run deploy pmsg-backend --source ./backend

# Deploy frontend to Cloud Storage + Cloud CDN
npm run build
gsutil -m rsync -r -d ./frontend/build gs://pmsg-frontend

๐Ÿ“ˆ Project Timeline

Phase Duration Status
Phase 1: Foundation Weeks 1-2 (Nov-Dec 2025) ๐ŸŸข In Progress
- Research & content development โœ… Complete
- Database schema design โœ… Complete
- Directory structure โœ… Complete
Phase 2: Core Development Weeks 3-6 (Dec 2025) ๐ŸŸก Planned
- Backend API ๐Ÿ”ต Not Started
- Frontend UI ๐Ÿ”ต Not Started
- Curriculum content ๐Ÿ”ต Not Started
Phase 3: Integration & Testing Weeks 7-8 (Late Dec 2025) ๐Ÿ”ต Not Started
Phase 4: Deployment & Pilot Weeks 9-10 (Early Jan 2026) ๐Ÿ”ต Not Started
Phase 5: Program Launch Mid-January 2026 ๐Ÿ”ต Not Started

๐Ÿค Contributing

This project is developed for a specific pilot program. For questions or collaboration:

  • Project Lead: Darrell (a.k.a Tadrrel) Hall
  • Email: [] @example.com]
  • GitHub Issues: dah512/pmsg-platform/issues

๐Ÿ“ License

[license - MIT]


๐Ÿ™ Acknowledgments

Research & Evidence Base: - U.S. Pain Foundation - American Chronic Pain Association - UK NHS Pain Management Programmes - Stanford Chronic Pain Self-Management Program

Clinical Advisory: - [List clinical advisors]

Funding: - [List funding sources]


๐Ÿ“ž Support

For technical support: - Email: - Documentation: https://docs.pmsg-platform.org - Issue Tracker: https://github.com/your-org/pmsg-platform/issues

For participant support: - Phone: 419-460-5695 - Email:


๐Ÿ“š References

  1. Farr M, et al.ย (2021). Experiences of Patient-Led Chronic Pain Peer Support Groups After Pain Management Programs. Pain Medicine, 22(12), 2884-2895.

  2. Bhadhuri A, et al.ย (2022). Evaluation of a Peer Led Chronic Pain Self-Management Program in a Rural Population. Frontiers in Pain Research.

  3. [Additional references in Research Synthesis document]


Last Updated: November 21, 2025
Version: 1.0
Status: Active Development