Automation of Patient–Therapist Matching
This project digitalizes and simplifies the process for patients seeking a fitting and available psychotherapist after receiving a prescription. By matching patients against professional criteria, availability, and individual needs, it reduces waiting times, increases transparency, and provides therapists with a clear digital interface to efficiently accept or decline new patients.
- Team Chocolat-Express
- Introduction
- Goal and Vision
- Technologies Used
- AS-IS Process
- TO-BE Process
- BPMN Process Overview
- Videos of the Process
- Technologies & Modules
- Decision Model & Matching Logic
- Process Improvements
- Operational Efficiency & Costs
- Future Steps and Opportunities
| Name | |
|---|---|
| Jana Stojanovic | jana.stojanovic@students.fhnw.ch |
| Christine Remy | christine.remy@students.fhnw.ch |
| Daniel Fuhst | daniel.fuhst@students.fhnw.ch |
- Andreas Martin
- Charuta Pande
- Devid Montecchiari
Finding an available and suitable psychotherapist is often a long and frustrating process for patients. Current workflows rely heavily on manual coordination, phone calls, and fragmented information across institutions and practitioners. This project addresses these issues by introducing a digitized, rule-based matching process that supports decision-making while keeping human oversight in place.
The system focuses on efficiency, transparency, and fairness, ensuring that patients receive suitable therapist suggestions while therapists retain control over their capacity and case acceptance. With this we ultimately aim for earlier clinical interventions for patients with mental health diseases. But this system and the respective workflow can also be expanded to other clinical indications such as e.g specialized orthopedic surgeons.
Goal
To optimize the patient–psychotherapist matching process by implementing a digitized, rule-based workflow that supports faster and more reliable matching.
Vision
To provide patients with an easy-to-use platform delivering confident and transparent therapist suggestions, while enabling therapists to manage requests digitally and efficiently.
| Component | Purpose |
|---|---|
| Camunda 7 | Business process orchestration |
| BPMN 2.0 | Process modeling language |
| DMN 1.3 | Decision modeling notation |
| Deepnote | API integration & ML experimentation |
| Flask | REST API server |
| Python | Backend processing & ML model |
| scikit-learn | Machine learning (Logistic Regression) |
The current (AS-IS) process is largely manual and fragmented. Patients typically contact multiple therapists individually, often without knowing availability or specialization fit in advance.
Detailed Challenges of the Current Process:
- High administrative burden for patients and providers
- Manual and repetitive data handling
- Limited transparency regarding therapist availability
- Long waiting times and inefficient follow-ups
- No standardized decision logic for matching
Our initial step was to define relevant matching dimensions (medical, logistical, and personal preferences) and implement them in a structured, automated decision-support tool. In the real world setting the matching dimensions are not clearly defined across therapists adding to the patients search burden.
Internal
- Administrative staff
- Coordination services
External
- Patients seeking therapy
- Licensed psychotherapists
| Step | Description | Comments | Lane |
|---|---|---|---|
| 1 | Start: Request | Patient initiates search for therapy | Patient |
| 2 | Form Filling / Phone Call/plenty of E-mails | Information provided manually | Patient |
| 3 | Manual Matching | Staff checks therapist fit and availability | Admin |
| 4 | Feedback Loop | Calls/emails until a therapist responds | All |
The TO-BE process introduces automation and structured decision logic while maintaining transparency and control for all parties.
- Digital intake via form or service hotline
- Rule-based decision table for therapist matching
- Automated communication via APIs
- Clear acceptance/decline workflow for therapists
- Reduced administrative workload
The BPMN model includes:
- Start Event: Patient Request
- User Tasks: Form Input, Patient Confirmation, Therapist Decision
- Business Rule Tasks: Decision Tables (DMN)
- Service Tasks: API Communication with Deepnote
- Gateways: Decision points for confirmation/rejection
- End Events: Match confirmed or Re-run matching
- Patient submits preferences via form
- Data is validated and preprocessed
- Decision tables evaluate matching criteria
- System suggests best-matching therapist
- Patient confirms or declines suggestion
- Therapist accepts or rejects request
- Process ends with confirmation or loops back for new match
| Module | Purpose | Description |
|---|---|---|
| Camunda Form | Feature Input | User Form to provide preferences |
| HTTP Connector | Deepnote Integration | Sends data to Deepnote via REST-API with GET, POST gateways |
| Deepnote | API Gateways | Providing API-Gateways for GET, POST-Routes for client and therapist |
Camunda REST Endpoint
/engine-rest/process-definition/key/Process_0ad1ggy/tenant-id/mi25chocolat/start
Deepnote Notebooks
- API Server Notebook - Flask REST API for appointment scheduling
- ML Matcher Notebook - ML-based external service task worker
The matching system uses a multi-layered decision model that normalizes patient preferences and therapist attributes into discrete categories, enabling deterministic and transparent matching logic.
- Input Variables: Patient preferences (therapy setting, disease category, weekday, daytime, gender, waiting time)
- Normalization: All variables are mapped to integer-based categories
- Decision Layers: Multiple focused decisions produce intermediate variables
- Final Selection: Rule-based decision table selects the most suitable therapist
- Hit Policy:
COLLECT (MAX)for deterministic, explainable results
- Full transparency for stakeholders
- Easy validation by domain experts
- Legally and ethically explainable
- Low data requirement
- Migration path to ML models (Logistic Regression → XGBoost)
For detailed information about the decision model, matching logic, input/output variables, and decision layers, see:
📄 Decision Table Documentation 📄 Camunda Decision Table
| Challenge | Solution |
|---|---|
| Manual data collection | Google Forms with automated triggers |
| Fragmented communication | Centralized BPMN process |
| Slow matching decisions | Decision tables with rule-based logic |
| Lack of transparency | Structured process & digital tracking |
The improved process significantly reduces delays, errors, and manual workload while improving the overall user experience.
- Reduced administrative effort
- Faster patient placement
- Better utilization of therapist capacity
- Scalable integration with existing IT infrastructures
- Direct therapist self-service portal for availability updates
- Automated synchronization of vacation and capacity data
- Patient and therapist feedback loops
With increasing data availability, the rule-based decision table could be replaced or augmented by machine learning model:
- Logistic Regression (transparent, small data friendly)
The system could generate a Top-3 matching score instead of a single result: note that the Deepnote-code is only running in deepnote and is not connected to a possible future process. You´ll see matching results directly in the notebook terminal.
The example of the possible process-step is deployed in the tenant-id mi25chocolat.


