Skip to content

peterhaupt/psychotherapy-matching-frontend

Repository files navigation

Psychotherapy Matching Platform

Frontend: React-based administrative interface for managing patient-therapist matching workflows.


IMPORTANT DISCLAIMERS AND WARNINGS

Medical and Mental Health Disclaimer

THIS SOFTWARE IS NOT INTENDED FOR MEDICAL OR MENTAL HEALTH TREATMENT

  • This platform is a demonstration project and portfolio piece showing technical capabilities
  • DO NOT USE this software to diagnose, treat, cure, or prevent any disease or medical condition
  • DO NOT USE this software as a substitute for professional medical advice, diagnosis, or treatment
  • This software is not designed to provide emergency services or crisis intervention
  • Always seek the advice of qualified health providers with any questions regarding medical or mental health conditions
  • If you are experiencing a mental health emergency, contact emergency services immediately

Legal and Regulatory Compliance

USERS ARE SOLELY RESPONSIBLE FOR LEGAL COMPLIANCE

  • Healthcare regulations vary significantly by country, region, and jurisdiction
  • Users of this software must ensure full compliance with all applicable laws and regulations, including but not limited to:
    • Medical device regulations (e.g., EU MDR, FDA regulations)
    • Health data protection laws (e.g., GDPR, HIPAA, national data protection laws)
    • Healthcare provider licensing requirements
    • Patient consent and privacy requirements
    • Professional liability and insurance requirements
  • This software is provided as a technical demonstration only
  • The authors and contributors make no representations regarding regulatory compliance
  • It is your responsibility to obtain all necessary legal approvals, certifications, and licenses before deploying this system

Data Protection and Privacy

  • This system processes sensitive personal health information
  • You must implement appropriate security measures and data protection safeguards
  • You are responsible for conducting privacy impact assessments and data protection compliance reviews
  • Never deploy this system with real patient data without proper legal authorization and security measures

No Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. See the LICENSE file for full details.


πŸš€ Quick Start

# Clone the repository
git clone https://github.com/peterhaupt/psychotherapy-matching-frontend.git
cd psychotherapy-matching-frontend

# Install dependencies
npm install

# Start development server
npm start

The application runs at http://localhost:3000

🎯 Overview

This React-based administrative interface demonstrates a comprehensive patient-therapist matching workflow system. Built as a portfolio project to showcase full-stack development capabilities with modern React patterns and microservices integration.

Key Features

  • Patient Management - Register and track patients seeking therapy
  • Therapist Management - Manage therapist profiles and availability
  • Matching System - Connect patients with compatible therapists using automatic and manual matching algorithms
  • Communication System - Send emails and schedule phone calls with therapists
  • Dashboard - Real-time overview of system status and quick access to common tasks

Backend Integration

This frontend connects to the Psychotherapy Matching Backend microservices architecture.

πŸ› οΈ Technology Stack

Technology Version Purpose
React 19.1.0 UI Framework
React Router 7.6.1 Client-side routing
Bootstrap 5.3.6 UI components and styling
Axios 1.9.0 HTTP client
PropTypes 15.8.1 Runtime type checking

Key Decision: JavaScript (not TypeScript) for faster development iteration.

πŸ“Š Current Status (May 2025)

βœ… Completed

  • Infrastructure: API clients, state management, routing
  • Patient Management: Full CRUD operations with contact history
  • Therapist Management: Full CRUD with availability and status control
  • Matching System: Placement requests, automatic matching, and manual match management
  • Communication System: Email templates, email sending, phone call scheduling
  • Dashboard: Real-time statistics, activity feed, urgent requests, quick actions
  • Mock Data: Realistic German test data for all services

πŸ“‹ Not Started

  • Authentication: User login and authorization
  • Advanced Analytics: Detailed reporting views

πŸ—οΈ Architecture

The application follows a microservices architecture pattern:

Frontend (React SPA)
    ↓
API Clients (with Mock/Real switching)
    ↓
Backend Microservices:
- Patient Service (Port 8001)
- Therapist Service (Port 8002)  
- Matching Service (Port 8003)
- Communication Service (Port 8004)

πŸ”§ Development

Environment Configuration

Create a .env file in the root directory:

# API Endpoints
REACT_APP_PATIENT_API=http://localhost:8001/api
REACT_APP_THERAPIST_API=http://localhost:8002/api
REACT_APP_MATCHING_API=http://localhost:8003/api
REACT_APP_COMMUNICATION_API=http://localhost:8004/api

# Development Settings
REACT_APP_USE_MOCK_DATA=true

Available Scripts

npm start    # Start development server
npm test     # Run tests
npm build    # Build for production

Mock Data Mode

When REACT_APP_USE_MOCK_DATA=true, the app uses in-memory mock data:

Test Patients:

  • Anna MΓΌller (Berlin) - Searching for therapy
  • Thomas Schmidt (MΓΌnchen) - Open status
  • Julia Wagner (Hamburg) - In therapy

Test Therapists:

  • Dr. Maria Weber - Behavioral therapy, available
  • Michael Becker - Psychodynamic therapy, waiting list
  • Dr. Sandra Fischer - Family therapy, available
  • Klaus Hoffmann - Currently blocked

Test Placement Requests:

  • Open request for Anna MΓΌller (high urgency)
  • In-progress request for Thomas Schmidt
  • Matched request for Julia Wagner

Test Email Templates:

  • Anfrage Therapieplatz - Request for therapy place
  • Erinnerung Therapieplatz - Reminder for therapy request
  • BestΓ€tigung Therapiebeginn - Confirmation of therapy start

πŸ” Key Features

Dashboard

  • Real-time Statistics: Live counts of patients, therapists, requests, and calls
  • Activity Feed: Recent activities across all services
  • Urgent Requests: Highlighted requests requiring immediate attention
  • Today's Calls: Scheduled calls with overdue alerts
  • Quick Actions: One-click access to common tasks
  • Performance Metrics: Success rates and KPIs with visual indicators
  • Auto-refresh: Configurable 30-second automatic data refresh

Matching System

  • Create placement requests for patients
  • Run automatic matching algorithm
  • View compatibility scores and criteria
  • Manually create matches
  • Track match status (suggested β†’ contacted β†’ accepted/rejected)
  • Filter by status, urgency, and patient

Patient Management

  • Complete patient profiles with personal data
  • Therapy preferences (type, gender preference, distance)
  • Contact history tracking
  • Status management (open, searching, in therapy)

Therapist Management

  • Therapist profiles with specializations
  • Availability management
  • Status control (active, blocked, inactive)
  • Contact history tracking

Communication System

  • Email Templates: Create and manage reusable email templates with variables
  • Email Sending: Send personalized emails using templates
  • Email History: Track all sent emails with status
  • Phone Calls: Schedule and manage phone calls
  • Status Tracking: Monitor communication outcomes

πŸ“ Project Structure

src/
β”œβ”€β”€ api/              # API clients and mock implementations
β”œβ”€β”€ components/       # React components
β”‚   β”œβ”€β”€ common/      # Reusable UI components
β”‚   β”œβ”€β”€ patient/     # Patient management
β”‚   β”œβ”€β”€ therapist/   # Therapist management
β”‚   β”œβ”€β”€ matching/    # Matching system components
β”‚   β”œβ”€β”€ communication/ # Email and phone call components
β”‚   └── dashboard/   # Dashboard widgets
β”œβ”€β”€ context/         # React Context for state
β”œβ”€β”€ pages/           # Page-level components
└── App.js           # Main application component

πŸ“š Documentation

Technical Documentation

Document Description
Environment Setup Development environment configuration
Architecture System design and technical decisions
API Specifications Backend API endpoints and formats
Data Models Core data structures
Project Status Detailed implementation progress
Common Errors Error solutions and prevention

Archive

Document Description
Original Requirements Initial project requirements

🌐 Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Edge (latest)
  • Safari (latest)

🀝 Contributing

  1. Create a feature branch from main
  2. Follow existing code patterns
  3. Ensure all text is in German
  4. Add PropTypes to new components
  5. Test with mock data before backend integration
  6. Check Common Errors to avoid known issues

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“ž Support

For questions or issues, please open an issue on GitHub.

About

Administrative web interface for patient-therapist matching workflows. React-based frontend for the Psychotherapy Matching Platform. Portfolio/demonstration project - NOT for medical use.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages