﻿# HAD Digital - Help Hub

**Project:** HAD Digital  
**Version:** 1.0.0  
**Date:** 2026-09-05  
**Owner:** Dr Kais Aldabbagh

---

## Getting Started

### Running the Application

**Option 1: Run the .exe (Recommended)**
1. Navigate to:  5_Outputs/HAD Digital/
2. Double-click: HAD Digital.exe
3. Open browser: http://127.0.0.1:8080
4. Login: dmin / dmin123

**Option 2: Run from Source**
1. Open terminal
2. Navigate to: MVP/
3. Run: python app.py
4. Open browser: http://127.0.0.1:8080
5. Login: dmin / dmin123

---

## User Guides

### For Patients

1. **Login** with your credentials
2. **Report Symptoms** - Click "Report Symptoms" and answer questions
3. **View Timeline** - See your care history
4. **View Treatment Plan** - See your current treatment
5. **Send Messages** - Communicate with your care team

### For Clinicians

1. **Login** with your credentials
2. **View Dashboard** - See active patients and alerts
3. **Submit Observations** - Record clinical findings
4. **Manage Alerts** - Acknowledge and escalate alerts
5. **Export Summaries** - Generate toxicity reports

### For Administrators

1. **Login** with admin credentials
2. **View All Patients** - See all patient data
3. **Manage Users** - Create and manage accounts
4. **View Audit Log** - Track all actions
5. **Export Data** - Generate reports

---

## Troubleshooting

### Application Won't Start

**Problem:** Double-clicking .exe does nothing
**Solution:** 
1. Check if port 8080 is in use
2. Run as administrator
3. Check Windows Defender settings

### Login Fails

**Problem:** "Invalid credentials or account locked"
**Solution:**
1. Check username and password
2. Wait 30 minutes if account is locked
3. Use admin account to reset

### Database Errors

**Problem:** "Database not found"
**Solution:**
1. Check if data/had.db exists
2. Delete had.db to recreate
3. Restart application

---

## API Documentation

See [01_System/API_Contract.md](01_System/API_Contract.md) for full API documentation.

### Key Endpoints

| Endpoint | Method | Description |
|----------|--------|-------------|
| /api/login | POST | Login with credentials |
| /api/logout | POST | Logout |
| /api/whoami | GET | Get current user |
| /api/patients | GET | List patients |
| /api/reports | POST/GET | Submit/list reports |
| /api/alerts | GET | List alerts |
| /api/timeline | GET | Get timeline |
| /api/messages | POST/GET | Send/list messages |

---

## Support

For questions or issues:
1. Check this help hub
2. Review the documentation in 01_System/
3. Contact Dr Kais Aldabbagh

---
