Investment Plans workspace
Open raw ↗

# System Breakdown

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


System Overview

HAD Digital is a coordinated digital platform for Hospitalisation a Domicile (HAD) in oncology. It provides structured toxicity monitoring, clinical alerting, and care coordination for home-care cancer patients.


Subsystems

1. Frontend Subsystem

ComponentDescriptionFiles
HTML InterfaceMain web pagestatic/index.html
CSS StylesResponsive designstatic/app.css
JavaScript LogicApplication logicstatic/app.js

Dependencies: None (self-contained)

Interfaces:


2. Backend Subsystem

ComponentDescriptionFiles
HTTP ServerMain serverapp.py
ConfigurationConfig managementconfig_manager.py
DatabaseData persistencedatabase.py
AuthenticationUser authuser_store.py
CTCAE EngineToxicity gradingctcae_engine.py
Alert EngineAlert routingalert_engine.py
Audit LoggerAudit trailaudit_logger.py
Demo DataDemo seederseed_demo.py

Dependencies: Frontend Subsystem, Database Subsystem

Interfaces:


3. Database Subsystem

ComponentDescriptionFiles
SQLite DatabaseData storagedata/had.db
CTCAE RulesGrading rulesdata/ctcae_rules.json
Guidance ContentPatient guidanceguidance/guidance.json

Dependencies: None (self-contained)

Interfaces:


4. AI Adapter Subsystem

ComponentDescriptionFiles
Base AdapterInterfaceadapters/base.py
Stub AdapterOffline demoadapters/stub.py
GLM AdapterOnline AIadapters/glm.py

Dependencies: Backend Subsystem

Interfaces:


Data Flow

Patient/Clinician
       │
       ▼
   Frontend (HTML/CSS/JS)
       │
       ▼
   HTTP Server (app.py)
       │
       ├──► CTCAE Engine (ctcae_engine.py)
       │         │
       │         ▼
       │    Alert Engine (alert_engine.py)
       │
       ├──► Database (database.py)
       │         │
       │         ▼
       │    SQLite (had.db)
       │
       ├──► Audit Logger (audit_logger.py)
       │
       └──► AI Adapter (adapters/)

Integration Points

FromToInterfaceProtocol
FrontendHTTP ServerIF-03HTTP/JSON
HTTP ServerDatabaseIF-04SQL
HTTP ServerCTCAE EngineIF-05Python
HTTP ServerAlert EngineIF-06Python
HTTP ServerAI AdapterIF-07HTTP/JSON
HTTP ServerAudit LoggerIF-09Python

Dependencies

External Dependencies

None (pure Python standard library)

Internal Dependencies

ComponentDepends On
app.pyconfig_manager, database, user_store, ctcae_engine, alert_engine, audit_logger, seed_demo, adapters
database.pyconfig_manager
user_store.pydatabase
ctcae_engine.pydatabase
alert_engine.pydatabase
audit_logger.pydatabase
seed_demo.pydatabase