Investment Plans workspace
Open raw ↗

# HAD Digital — MVP Build Plan

Document status: Draft v0.1 — for review by Dr Kais Aldabbagh and Zaid Al Dabbag Date: 5 September 2026 Prepared under: AI Project Governance Standard v3.9 Specification precedence: HAD_Digital_Specifications.docx (Cahier des Charges) governs all decisions below


1. Problem Framing (GOV-B2)

1.1 Purpose

Home-hospitalization oncology patients and their care teams need a single, structured platform to detect treatment toxicity early, coordinate care in real time, and reduce avoidable emergency admissions — currently hindered by fragmented phone/PDF-based workflows.

1.2 Problem Statement

Current StateDesired StateGap
Toxicity monitoring via unstructured phone calls and paper formsStructured CTCAE-based digital capture and auto-gradingNo standardized digital tooling
Hospital oncologist, HAD nurse, community nurse, GP see different information at different timesShared real-time care-coordination timelineFragmented information silos
Manual transcription of symptom reports into medical recordsAuto-generated toxicity summaries and exportsSignificant clinician admin burden
Delayed detection of grade 1-2 toxicity until escalationTiered alerts (routine/urgent/emergency) triggered automaticallyAvoidable ED visits and re-hospitalizations

1.3 Objectives

#ObjectiveMOEMOP
O1Enable structured CTCAE-based toxicity capture% of toxicity reports using structured input vs free-text>=90% structured reports in pilot
O2Auto-grade and alert on toxicity severityMedian time from report to care-team acknowledgment<=15 min for urgent; <=5 min for emergency
O3Provide shared care-coordination workspace% of care-team members actively using the platform>=80% weekly active users in pilot
O4Reduce avoidable ED visits / re-hospitalizationsChange in unplanned re-hospitalization rate vs baseline>=20% reduction
O5Reduce clinician admin burdenSelf-reported time saved on documentation>=30% reduction in pilot

1.4 Stakeholders

ActorRoleDecision AuthorityEvidence They Accept
Dr Kais AldabbaghConcept originator, clinical authorityFinal approval on clinical logic, escalation protocolsClinical accuracy of grading, protocol adherence
Hospital oncologistPrescribes treatment, defines toxicity thresholdsClinical configuration, alert protocol validationGrading accuracy, alert routing correctness
HAD coordinating nurseDaily coordination, triageWorkflow validationTimeline usability, alert response time
Community / HAD nurseHome visits, clinical observationsField usability feedbackOffline capability, form completion speed
General practitionerInformed of patient statusRead-access validationVisibility of relevant patient data
Hospital pharmacistMedication reviewMedication plan view validationTreatment plan accuracy
Patient / CaregiverSymptom reporting, guidance consumptionUsability acceptanceForm simplicity, guidance clarity
Zaid Al DabbagProject owner, governance authorityAll project decisions per GOV-A1.5Full governance compliance

1.5 Intended Use

1.6 Constraints

ConstraintSource
Must run as standalone .exe (no external server dependency for MVP demo)User instruction
Must comply with AI Project Governance Standard v3.9Governance framework
Health data hosting must use HDS-certified provider (post-MVP; MVP uses local/development storage)French regulation
GDPR and CNIL compliance for health dataEU/French law
Pure Python stdlib preference for reference pattern (GOV-B7.4)Governance standard
MVP scope limited to S4.1 of specificationSpecification

1.7 Out of Scope (per Spec S4.2)

1.8 Measures


2. Requirements (GOV-B3)

Requirements will be registered in the Requirements Register (01_System/Requirements_Register.md at Stage 3). Below is the initial set derived from the specification.

System-Level Requirements

IDStatementRationaleSourceAcceptance CriteriaVerificationPriority
REQ-SYS-01The system shall provide structured patient/caregiver toxicity self-reporting via mobile-friendly questionnaires mapped to CTCAE v5.0 domainsCore clinical function per Spec FR-1Spec FR-1Patient can complete a structured toxicity report on mobile; report captures >=5 CTCAE domainsTestMust
REQ-SYS-02The system shall provide structured clinician/home-nurse observation entry for clinical findings and vital signsCore clinical function per Spec FR-2Spec FR-2Clinician can enter observations; form includes vital signs, clinical signs, skin/wound findingsTestMust
REQ-SYS-03The system shall automatically grade reported symptoms to CTCAE v5.0 grades 1-5 using configurable rule logicClinical safety core per Spec FR-3Spec FR-3, S7.3Given structured inputs, engine returns correct CTCAE grade; all grades >=2 flagged provisional until clinician confirmedTestMust
REQ-SYS-04The system shall trigger tiered clinical alerts (routine/urgent/emergency) based on grade, AE type, and physician-defined escalation protocolPatient safety per Spec FR-4Spec FR-4, S7.4Emergency alert triggers within 5 seconds; urgent notification within defined delay; routine visible on timelineTestMust
REQ-SYS-05The system shall provide a shared care-coordination timeline showing reports, observations, alerts, decisions, and messages for a patient episodeCare coordination per Spec FR-5Spec FR-5Timeline displays chronological events; role-filtered; all event types representedTestMust
REQ-SYS-06The system shall provide secure care-team messaging attachable to alerts or timeline eventsCommunication per Spec FR-6Spec FR-6Messages between any two care-team members; can link to alert/timeline event; audit trailTestShould
REQ-SYS-07The system shall display a read-facing treatment plan and medication scheduleReference view per Spec FR-7Spec FR-7Treatment protocol, cycle schedule, supportive-care prescriptions visible to authorized rolesTestMust
REQ-SYS-08The system shall generate structured toxicity summaries on demand for patient record insertion and follow-up lettersDocumentation per Spec FR-8Spec FR-8Summary export includes per-symptom grades, timeline, alert history; format suitable for clinical recordTestShould
REQ-SYS-09The system shall enforce role-based access control per Spec S5 stakeholder rolesSecurity per Spec FR-9Spec FR-9Each role sees only authorized data/functions; patient cannot see other patients; GP sees only assigned patientsTestMust
REQ-SYS-10The system shall display context-aware patient/caregiver guidance based on reported symptomsPatient support per Spec FR-10Spec FR-10After symptom report, patient sees guidance (self-care vs contact team); guidance is physician-validatedTestShould
REQ-SYS-11The system shall maintain an immutable audit log of all clinically relevant actionsCompliance per Spec FR-11Spec FR-11Every report/grade/alert/acknowledgment/override is timestamped, attributed, and immutableTestMust
REQ-SYS-12The system shall run as a standalone Windows executable (.exe) with no external server dependency for MVP demonstrationUser requirementUser instructionDouble-click .exe launches application; all functions accessible via local browser or native windowTestMust
REQ-SYS-13The system shall include a deploy-anywhere web application with named-user login and pluggable AI-engine connectorGovernance mandatory function (GOV-B7.1)GOV-B7.1Login page served; passwords hashed at rest; adapter round-trip completes; no key in client filesTestMust
REQ-SYS-14The system shall support role-based users: oncologist, HAD coordinating nurse, community nurse, GP, pharmacist, patient, caregiverStakeholder coverage per Spec S5Spec S5Each role type can log in; permissions match Spec S5 tableTestMust
REQ-SYS-15The system shall encrypt health data at rest and in transitNon-functional per Spec S8Spec S8HTTPS for transit; database encryption at rest; audit of accessInspectionMust (MVP: transit only; at rest deferred to HDS deployment)
REQ-SYS-16The system shall run without requiring Python, pip, Docker, or any external runtime to be installed on the host machineZero-dependency deploymentUser instructionDouble-click .exe on a clean Windows 10/11 machine with no Python installed; application starts successfullyTestMust
REQ-SYS-17The system shall support drop-in patching by overwriting application files without losing user data or configurationSimple maintenance for non-technical usersUser instructionOverwrite .exe and static/ files; restart application; database and config.json preserved; schema migrations run automaticallyTestMust
REQ-SYS-18The system shall be fully portable — copyable to a USB stick or network share and runnable from any locationPortable deploymentUser instructionCopy folder to USB; run .exe from USB on a different machine; application functions correctlyTestMust
REQ-SYS-19The system shall write all persistent data (database, logs, config) to paths relative to the application folder, not to system directoriesPortability and no-admin requirementUser instructionApplication folder can be moved; all data moves with it; no writes to Program Files or Windows directoriesTestMust

Constraints

IDStatementSource
REQ-CON-01MVP must be deliverable as a standalone .exe fileUser instruction
REQ-CON-02Must comply with AI Project Governance Standard v3.9Governance framework
REQ-CON-03Health data hosting must be HDS-certified for production (MVP exempts for demo/dev)French regulation
REQ-CON-04API keys must never appear in client-served files (GOV-B7.3, INV-5)Governance SA3, B7.3
REQ-CON-05CTCAE grading logic is proprietary; mapping rules not detailed in public artifactsSpec S7.3, S17
REQ-CON-06Zero runtime dependencies — no pip, no Docker, no external services; Python stdlib onlyUser instruction; GOV-B7.4
REQ-CON-07All persistent data (DB, logs, config) must be relative to application folderPortability requirement
REQ-CON-08Database schema migrations must be automatic and forward-only (additive)Simple patching requirement

3. Architecture (GOV-B4)

3.1 Component Decomposition

ComponentResponsibilityKey REQs
C1 — Desktop ShellStandalone .exe wrapper; launches embedded web server; opens browser/native windowREQ-SYS-12
C2 — Web ServerHTTP server serving the application; session management; API routingREQ-SYS-12, 13
C3 — Auth and Access ControlUser authentication, session tokens, role-based authorizationREQ-SYS-09, 14
C4 — Toxicity Reader EngineCTCAE v5.0 grading logic; rule-based mapping from structured inputs to gradesREQ-SYS-03
C5 — Alert EngineTiered alert routing (routine/urgent/emergency) based on grade + protocolREQ-SYS-04
C6 — Patient Self-Report ModuleStructured questionnaire UI for patients/caregivers; CTCAE domain mappingREQ-SYS-01
C7 — Clinician Entry ModuleStructured observation entry form for home-nurse/clinicianREQ-SYS-02
C8 — Care Coordination TimelineShared chronological feed of all events per episodeREQ-SYS-05
C9 — Messaging ServiceSecure care-team messaging, linkable to alerts/eventsREQ-SYS-06
C10 — Treatment Plan ViewRead-facing treatment protocol and schedule displayREQ-SYS-07
C11 — Summary and ExportToxicity summary generation and exportREQ-SYS-08
C12 — Guidance EnginePatient-facing symptom-based guidance contentREQ-SYS-10
C13 — Audit LoggerImmutable action logging with timestamps and attributionREQ-SYS-11
C14 — Data StorePersistent storage for all entities (SQLite for MVP; HDS-ready schema)All
C15 — AI Engine ConnectorPluggable adapter for AI engines (GLM, Kimi, Gemini, Claude, GPT)REQ-SYS-13, GOV-B7
C16 — Frontend (Patient)Mobile-first PWA for patient/caregiver self-reporting and guidanceREQ-SYS-01, 10
C17 — Frontend (Clinician)Desktop-oriented dashboard with timeline, alerts, entry formsREQ-SYS-02, 05, 06, 07, 08
C18 — Schema Migration RunnerAutomatic database schema migration on startup; forward-only; additive changesREQ-SYS-17, REQ-CON-08
C19 — Config ManagerReads/writes config.json; preserves user settings across patches; documents new keysREQ-SYS-17, REQ-CON-07
C20 — Build & Packaging ScriptPyInstaller build script producing Mode A/B/C outputs; smoke test; version stampingREQ-SYS-16, 18

3.2 Interface Register (IF)

IFFrom -> ToDirectionItem ExchangedFormatTriggerOwner
IF-01C1 -> C2BidirectionalHTTP requests/responsesHTTP/JSONUser actionC1
IF-02C2 -> C3Request/ResponseAuth validationJSONLogin/API callC3
IF-03C6/C7 -> C4Request/ResponseStructured symptom dataJSONReport submissionC4
IF-04C4 -> C5EventToxicity grade + AE typeJSONGrading completeC5
IF-05C5 -> C8EventAlert recordJSONAlert triggeredC8
IF-06C5 -> C9NotificationAlert notificationJSONUrgent/EmergencyC9
IF-07C2 -> C14CRUDAll entitiesSQL/ORMAny writeC14
IF-08C8 -> C16/C17DataTimeline eventsJSONView loadC8
IF-09C11 -> C17DataToxicity summaryJSON/PDFExport requestC11
IF-10C2 -> C15Request/ResponseAI chat messagesHTTP/JSONChat actionC15
IF-11C12 -> C16DataGuidance contentJSONPost-reportC12
IF-12All -> C13EventAudit entriesJSONAny actionC13

3.3 Technology Choices (MVP)

LayerChoiceRationale
RuntimePython 3.11 (embedded by PyInstaller)Zero external deps; stdlib only; follows GOV-B7.4 pattern
Web serverPython stdlib http.serverNo pip install; matches governance reference exactly
DatabaseSQLite via stdlib sqlite3Zero-config; file-based; portable; schema migrates to PostgreSQL
FrontendHTML5 + CSS3 + vanilla JavaScriptNo build step; no npm; no framework; runs in any browser
CTCAE EnginePure Python + JSON rule definitionsNo external libs; rules updatable by replacing JSON file
Authhashlib.scrypt (stdlib)No bcrypt/passlib pip install needed
HTTP clienturllib.request (stdlib)For AI adapter; no requests/httpx pip install
PackagingPyInstaller 6.x (build-time only)Single .exe or folder bundle; Python runtime embedded
PatchingDrop-in file overwrite + auto DB migrationNo installer; no admin rights; non-technical user can do it

4. MVP Scope — What Gets Built

4.1 Core Features (Must-Have for MVP Demo)

#FeatureSpec ReferenceDescription
F1Login and Role SelectionFR-9, S5Named-user login with role-based landing (oncologist, nurse, patient, etc.)
F2Patient Toxicity Self-ReportFR-1, S7.2Structured questionnaire covering GI, hematologic, dermatologic, neurologic, constitutional CTCAE domains
F3Clinician Observation EntryFR-2Form for home-visit findings, vital signs, observed toxicity signs
F4CTCAE Grading EngineFR-3, S7.3Rule-based mapping from structured inputs to CTCAE grade 1-5 per AE term
F5Tiered AlertingFR-4, S7.4Routine/urgent/emergency alerts based on grade and protocol
F6Care Coordination TimelineFR-5Chronological feed of reports, observations, alerts, messages per episode
F7Treatment Plan ViewFR-7Display of current regimen, cycle schedule, supportive-care prescriptions
F8Toxicity Summary ExportFR-8On-demand structured summary for clinical record
F9Patient GuidanceFR-10Context-aware guidance after symptom report (self-care vs contact team)
F10Audit TrailFR-11Immutable log of all actions
F11Standalone .exe—Single executable that launches the full application
F12Web App FunctionGOV-B7Login, AI connector slot, deploy-anywhere pattern

4.2 Deferred to V2 (per Spec S4.2)


5. Project Classification (GOV-A1.8)

Classification: STANDARD

CriterionAssessment
Multiple componentsYes — 17 components identified
Interfaces crossedYes — 12 interfaces defined
Deliverable someone else will useYes — clinical users, patients
Safety/regulatory exposureYes — health data, clinical decision support
ConsequenceMedium — pilot scope, single site

At STANDARD class: all rules apply; agent roles may be merged into 3 (Builder / Verifier / Master Brain) provided C3.2 separation holds.


6. Build Approach — Standalone .exe

6.1 Packaging Strategy

The MVP will be packaged as a single Windows executable using PyInstaller:

HAD Digital.exe +-- Embedded Python runtime +-- Flask/http.server web server +-- SQLite database (created on first run) +-- Static assets (HTML/CSS/JS) +-- CTCAE reference data +-- Demo data (sample patients, treatments) +-- AI engine adapter (GLM default; stub for demo)

Launch behavior:

  1. User double-clicks HAD Digital.exe
  1. Embedded web server starts on localhost:8080
  1. Default browser opens to the login page
  1. Application is fully functional locally

Alternative (if PyWebView is preferred):

6.2 Development Stack

ComponentImplementation
BackendPython 3.11+ with Flask (or stdlib http.server per governance pattern)
DatabaseSQLite via Python's built-in sqlite3 module
FrontendHTML5 + CSS3 + vanilla JavaScript (mobile-first responsive)
CTCAE EnginePython rule engine with JSON-based rule definitions
AuthPassword hashing with hashlib.scrypt (stdlib)
PackagingPyInstaller 6.x

6.3 Demo Data (for MVP demonstration)


7. Project Plan — Stages (GOV-C1.5)

StageGateKey ActivitiesDeliverables
0 — IntakeEntry: Project charter existsClassify project; register all requirements; set up registersMaster Brain state; Requirements Register
1 — DiscoveryEntry: Stage 0 completeCTCAE term prioritization with clinical input; user story decomposition; UI wireframesUser stories; wireframes; CTCAE term subset
2 — AnalysisEntry: Stage 1 completeDetailed design; database schema; API contract; interface definitionsSystem design document; DB schema; API spec
3 — Change ControlEntry: Stage 2 baselinedBaseline all artifacts; establish change processBaselined artifacts; CR log initialized
4 — BuildEntry: Stage 3 completeImplement all components; unit tests; integration testsWorking code; test results
5 — IntegrationEntry: Stage 4 components verifiedAssemble components; interface testing; end-to-end testingIntegrated system; integration test results
6 — Verification and ValidationEntry: Stage 5 integratedIndependent verification against all REQs; clinical validation; Part I auditV&V report; audit results
7 — PublishEntry: Stage 6 passedPackage as .exe; documentation; Help HubHAD Digital.exe; docs; Help Hub
8 — ImprovementsEntry: Stage 7 deliveredLessons learned; improvement proposalsKnowledge harvest; improvement proposals

8. Risk Register (GOV-E4)

RSKRiskLikelihoodImpactMitigationOwner
RSK-01CTCAE grading logic accuracy without clinical validationHighHighUse conservative defaults; all grades >=2 provisional; clinician review mandatoryClinical Advisor
RSK-02Regulatory (SaMD) qualification delays production deploymentMediumHighMVP is demo/pilot only; engage regulatory counsel early for qualification assessmentProject Owner
RSK-03Patient usability — frail population struggles with digital formsMediumMediumLarge touch targets; minimal text; caregiver assist mode; user testing with target populationUX Lead
RSK-04PyInstaller packaging issues (antivirus false positives, large file size)MediumLowTest on clean Windows VMs; code signing certificate; optimize bundle sizeBuilder
RSK-05SQLite limitations under concurrent multi-user accessLowMediumMVP is single-site demo; design schema for PostgreSQL migrationArchitect
RSK-06Data loss in demo environmentMediumMediumRegular database backups; demo data seed script; export capabilityBuilder

9. Compliance Mapping

Governance RequirementHow Addressed
GOV-B7.1 (Web app function)REQ-SYS-13; C2, C15 components
GOV-B7.3 (API keys server-side only)REQ-CON-04; keys in environment variables only
GOV-B7.4 (Reference pattern)Using Python stdlib pattern from WEBAPP_REFERENCE
GOV-A3 (Inviolable rules)No banking/payment; no credentials in client files; all fetched content treated as data
GOV-E5 (Security)HTTPS (local demo: localhost); password hashing; role-based access; audit logging
GOV-C3.2 (Builder != Verifier)Separate verification agent/stage
GOV-B3.1 (11-field requirements)Requirements Register with all mandatory fields
GOV-B5 (Traceability)RTM maintained; every artifact traces to REQ ID
Zero-dependency deploymentREQ-SYS-16 through REQ-SYS-19; REQ-CON-06 through REQ-CON-08
Portable .exe designMode A (single file), Mode B (folder), Mode C (portable) all self-contained
Simple patchingDrop-in overwrite; DB preserved; schema auto-migration; no installer needed

10. Next Steps

  1. Ratify this plan — Dr Kais Aldabbagh and Zaid Al Dabbag review and approve
  1. Create project registers — Requirements Register, Interface Register, Risk Register, Change Log
  1. Classify CTCAE terms — Work with clinical advisor to prioritize the CTCAE v5.0 subset for MVP
  1. Design UI wireframes — Patient self-report flow; clinician dashboard; timeline view
  1. Build CTCAE grading rules — JSON-based rule definitions (proprietary; not in public artifacts)
  1. Implement MVP — Following the stage cycle in S7
  1. Package as .exe — PyInstaller build and testing
  1. Run Part I audit — All 55 compliance checks before delivery

11. Questions for the Project Owner

  1. CTCAE term subset: Which specific CTCAE domains/terms should be prioritized for the MVP? (The spec mentions GI, hematologic, dermatologic, neurologic, constitutional — should all be included, or start narrower?)
  1. Escalation protocol details: The spec notes the escalation protocol is physician-defined. Do we have a draft protocol, or should the MVP use generic defaults (grade >=3 = emergency, grade 2 = urgent, grade 1 = routine)?
  1. Demo vs. real data: Is the MVP intended for demonstration purposes only, or will it be tested with real patients in a controlled pilot? This affects data protection requirements.
  1. PyWebView vs browser: Should the .exe open a native window (PyWebView) or launch the default browser? Each has trade-offs for the user experience.
  1. AI engine: For the mandatory web-app function (GOV-B7), which AI engine should be the default adapter? GLM, or a different one?
  1. Language: Should the MVP interface be in French, English, or both?
  1. Branding: Any specific branding requirements (logo, color scheme, app name) for the MVP?
  1. Distribution channel: How will patches be distributed? (Email, internal file server, shared network drive, USB handoff?)
  1. PyWebView vs browser: Should the .exe open a native window (PyWebView) or launch the default browser? PyWebView adds ~15MB to the bundle but gives a more application-like feel; browser mode is lighter and more familiar to clinical users.