Skip to content

Product Requirements Document (PRD) - Cadence Clinical Platform ​

WARNING

Status: pre-kernel baseline, not a validated release. The requirement IDs (PRD-…) remain in use for traceability and the RTM. Product scope is being re-framed by the kernel specification v0.2 (§12 capability map). Current system: ARCHITECTURE.md.

1. Document Control & Regulatory Alignment ​

1.1 Document Metadata ​

  • Document ID: CAD-PRD-001
  • Version: 1.0.0-RELEASE
  • Effective Date: 2026-07-22
  • Classification: GxP Confined / Highly Confidential
  • Authors: Frederick de Ruiter (Lead Solutions Architect), Frederick de Ruiter (Lead Architect)
  • Standards Alignment:
    • ISO/IEC/IEEE 29148:2018: Systems and software engineering — Life cycle processes — Requirements engineering
    • ISO 14155:2020: Clinical investigation of medical devices for human subjects — Good clinical practice (GCP)
    • 21 CFR Part 11 / EU Annex 11: Electronic Records and Electronic Signatures
    • CDISC USDM v3.0/v4.0: Unified Study Definition Model

1.2 Revision History ​

VersionDateDescription of ChangeAuthor(s)Reviewer(s) / Approver(s)
0.1.0-DRAFT2026-06-01Initial skeleton and placeholder generationF. de RuiterSDLC Steering Group
1.0.0-RELEASE2026-07-22Comprehensive expansion of all clinical modules, field-level validation, clinical state machines, unblinding protocols, and query lifecycles. Conforms to ISO 29148.F. de RuiterF. de Ruiter, QA Directorate
1.1.0-DRAFT2026-09-30Added platform edge, startup configuration and gateway resilience requirements (PRD-SYS-189 to PRD-SYS-191).F. de RuiterF. de Ruiter

1.3 Signature & Approval Matrix ​

By signing below, the representatives from clinical development, software engineering, and regulatory affairs authorize this document as the definitive functional baseline for the Cadence Clinical Platform.

Clinical Product Lead:     ___________________________   Date: _______________
QA & Validation Director:  ___________________________   Date: _______________
Chief Technology Officer:  ___________________________   Date: _______________

2. Executive Summary & System Objectives ​

2.1 Scope of the Platform ​

The Cadence Clinical Platform is a unified, cloud-native clinical trial system that eliminates the classic chasm between upstream Protocol Design (Metadata Repository / MDR) and downstream Clinical Trial Execution (Electronic Data Capture / EDC).

Traditionally, clinical research metadata is isolated in static text documents and converted manually into data collection screens, leading to translation errors, compliance failures, and long timelines. Cadence Clinical integrates both environments via a single, digital data flow (DDF) utilizing the CDISC USDM standard. This system is designed for high-concurrency, GxP-compliant execution in multi-site global trials.

+---------------------------------------------------------------------------------+
|                                CADENCE CLINICAL                                 |
+-------------------------------------------------+-------------------------------+
|             DESIGNER SERVICE (MDR)              |    EXECUTION ENGINE (EDC)     |
|   - CDISC USDM Graph Model (Neo4j)              |    - Transactional (PostgreSQL)  |
|   - Biomedical Concepts & Trial Configurations   |    - Subject State Tracking   |
|   - Immutable Versioning & Path Branching       |    - Form Capture & Parsing   |
+-------------------------------------------------+-------------------------------+
|                                  AUTH GATEWAY                                   |
|   - Keycloak OIDC, Role-Based Access Control, Masking/PII Obfuscation           |
+---------------------------------------------------------------------------------+

2.2 Functional Hierarchy & Bidirectional Traceability ​

To ensure complete software validation under GxP, requirements in this document are categorized with unique alphanumeric identifiers mapped to the Quality Assurance (QA) & Validation Plan (CAD-QAP-006) and the Technical Design Document (CAD-TDD-002).

  • PRD-SYS-XXX: System Baseline, Authentication, and Audit Ledger Rules
  • PRD-MDR-XXX: Study Design, Biomedical Concepts, and MDR Specifications
  • PRD-EDC-XXX: Electronic Data Capture, parsing, skipping, and offline synchronization
  • PRD-SUB-XXX: Subject Lifecycle, Randomization, and State Transition Machines
  • PRD-QRY-XXX: Query Lifecycle, Data Review, Verification, and Medical Monitoring
  • PRD-QLT-XXX: Clinical Quality Management System (eQMS), CAPA, RBQM, and Audits

2.3 Regulatory Compliance Mandates (21 CFR Part 11 / EU Annex 11) ​

The system satisfies all relevant mandates for electronic records and signatures:

  1. Validation of Systems (§ 11.10(a)): Reproducible system state configurations captured chronologically.
  2. Protection of Records (§ 11.10(c)): Multi-AZ replication with Point-in-Time Recovery (PITR).
  3. Audit Trails (§ 11.10(e)): Complete logging of all changes, deletions, and updates without allowing modification of the logs themselves.
  4. Authority Checks (§ 11.10(g)): Explicit, role-based authorization for all write/edit operations.
  5. Electronic Signature Validation (§ 11.50): Multi-factor re-authentication for clinical signs-offs.

3. System Baseline & Global Inheritance Model ​

3.1 Universal Data Entity Capabilities ​

Every clinical and structural entity created within the Cadence Clinical Platform (e.g., protocol elements, subjects, eCRF forms, medical terms, queries) inherits a set of core database fields, validation behaviors, and audit controls. This guarantees that developers do not have to write custom compliance overrides per module.

+----------------------------------------------------------------------------+
|                          UNIVERSAL INHERITED MODEL                         |
+----------------------------------------------------------------------------+
|  Fields:                                                                   |
|   - UUID (v4)                 - created_at (UTC Timestamp)                 |
|   - created_by (OIDC Sub)     - reason_for_change (Varchar(1000))          |
|   - version_index (INT >= 1)  - is_deleted (Boolean, default FALSE)        |
+----------------------------------------------------------------------------+
|  Behaviors:                                                                |
|   - soft_delete() logic intercepts SQL DELETE queries.                     |
|   - auto_increment(version_index) triggered upon any entity modification.  |
|   - audit_trail_trigger() copies pre/post state to shadow schema tables.    |
+----------------------------------------------------------------------------+

PRD-SYS-001: Standard Audit Logging (21 CFR Part 11 § 11.10(e)) ​

Evidence: PostgreSQL (audit fields are filled by the database on commit, so only a PostgreSQL test can prove it).

The platform must enforce the presence of exactly four audit fields on every database table representing clinical execution or metadata state:

  • created_at: Datetime in ISO 8601 UTC format (YYYY-MM-DDTHH:MM:SS.mmmmmmZ) generated by the database server upon commit.
  • created_by: Globally unique OIDC user identifier string (sub) of the authenticated user performing the write.
  • reason_for_change: A mandatory string of minimum 10 characters and maximum 1000 characters. If the mutation is system-generated, this must store a system-code reference.
  • version_index: An integer representing the version sequence of the record, beginning at 1 and auto-incrementing sequentially by 1 with every update.

PRD-SYS-002: Soft-Delete Enforcement and Shadow Schema Preservation ​

No transactional clinical data or metadata may be physically purged from the persistent storage engine (PostgreSQL or Neo4j) via standard user operations.

  • When a deletion is triggered, the system must set the is_deleted attribute to TRUE, update the version_index by 1, log the reason_for_change and the executing user created_by.
  • Direct DELETE statements executed at the database layer must be intercepted by database-level triggers (BEFORE DELETE) which automatically cancel the operation and direct the transaction to insert the delta with an active state of deleted into a secure, isolated shadow schema.

PRD-SYS-003: Cryptographic Ledger Hashing & Chain Validation ​

  • Every audit log event block generated within the system must be cryptographically hashed using SHA-256.
  • Each block must chain itself to the preceding block using the formula: $$\text{Block_Hash}_n = \text{SHA256}(\text{Block_Data}n \parallel \text{Block_Hash})$$
  • A background verification service must run every 60 seconds. If any block's recalculated hash does not match its stored hash, or if a block in the chain is missing, the system must transition to a read-only GxP-Lock state and generate high-priority security alerts.

3.2 Role-Based Access Control (RBAC) Matrix ​

The system governs all resource mutations via strict Role-Based Access Control (RBAC).

RoleAccess LevelPermitted ActionsRestrictions
Sponsor Clinical DesignerDesigner Read/WriteCreate/Edit Biomedical Concepts, Protocols, Forms, ArmsCannot view Subject Data, cannot perform Randomization unblinding
Site Principal Investigator (PI)Execution Read/WriteScreen, Enroll, and Sign Subject eCRFs, Raise Manual QueriesCannot modify Study Protocol configurations, Restricted to own site
Clinical Research Associate (CRA)Execution Read/WritePerform SDV, Raise/Close Manual Queries, View Screening LogsCannot modify data entries, cannot perform Electronic Signatures
Data Manager (DM)Execution Read/WritePerform Medical Review, Raise Queries, Import Coding DictionariesCannot perform PI signatures, cannot modify source subject entries
Unblinded StatisticianExecution Unblinded ReadView treatment allocation codes, run interim analysis reportsCannot perform data entry, completely isolated from site operations
System AuditorRead-OnlyView Audit Ledger, raw database logs, and configuration graphsComplete read-only block across all services

PRD-SYS-004: Universal Site Isolation Constraint ​

Site users (PIs, Study Coordinators) must be mathematically restricted to subject data belonging specifically to their assigned site_uuid. Any API call attempting to read or write to a subject belonging to another site must return a 403 Forbidden error and write a security alert containing the user's UUID and IP address to the audit log.

PRD-SYS-102: Centralized Database-level Background Loop Coordination ​

The system must coordinate all recurring background processing loops (such as audit sealing, daily unresolved query escalations, and outbox event dispatching) across multiple application server instances. This coordination must utilize database-level advisory locking (specifically transaction-level advisory locks under PostgreSQL) with distinct advisory lock IDs to guarantee that exactly one worker instance can execute any given background cycle.

PRD-SYS-103: Asynchronous and Non-blocking Cryptographic Integrity Verification ​

To protect system responsiveness and prevent blocking user-facing HTTP request lifecycles, heavy cryptographic and ledger verification tasks (such as validation of GxP clinical execution ledger integrity) must run asynchronously as background tasks (specifically within FastAPI background tasks). The system must expose the status of the last executed verification task in a non-blocking query endpoint.

PRD-SYS-189: Hardened HTTP Edge ​

Every service must trust X-Forwarded-For and X-Forwarded-Proto only from configured proxy addresses or ranges (CADENCE_TRUSTED_PROXIES), fail at startup on a malformed entry, send Strict-Transport-Security on HTTPS responses outside Development, and omit the Server header. The gateway must limit requests per authenticated caller (or per client address before sign-in), answer 429 with Retry-After over the limit, and never limit health probes.

PRD-SYS-190: Fail-Fast Validation of Required Settings ​

A service must refuse to start when a setting it needs to handle clinical data or authenticate callers is missing or malformed (for example the gateway secret, the demographics encryption key, or a downstream service address outside Development), naming the setting in the error. No required setting may have a default or fallback value.

PRD-SYS-191: Gateway Routing and Resilience ​

Every gateway route must resolve to a real endpoint of its downstream service. The gateway must bound each proxied call with a timeout, answer 504 when a downstream service does not respond in time, and answer 503 without forwarding while a downstream service's readiness check fails.

PRD-SYS-192: Authority Checks on Every Route ​

Every API route must declare who may call it (21 CFR 11.10(d), (g)). A route admits only callers whose signed roles hold its resource:action permission, or, where the route authorizes each object itself (the kernel's grants), any signed-in caller for a stated reason; health, status and development API documents are the only anonymous routes. A route that declares nothing must be denied to every caller. A route that names a study must admit only callers assigned to that study, and must deny a caller with no assignment. A caller without the permission must be refused (403) before the operation runs, so nothing is read or written.

PRD-EDL-001: Data-Driven Expected Document Lists (EDLs) & Completeness Tracking ​

The system must implement a data-driven Expected Document List (EDL) reference data model and endpoints (/api/v1/etmf/edl and /api/v1/etmf/completeness) to track required study-scope and site-scope documents against clinical milestones. This replaces hardcoded milestone mappings with a data-driven configuration. Each ExpectedDocument record must include the four standard Part 11 audit fields as defined in PRD-SYS-001 (specifically created_at, created_by, reason_for_change, and version_index).

PRD-TMF-001: TMF Taxonomy Catalog Hierarchy, Authoritative Inventory, and Extension Policy ​

The system must support loading different versions of the versioned DIA TMF Reference Model in memory from the tmf_reference_model taxonomy package.

  • Authoritative Catalog: The system designates "v3.2.0-complete" as the authoritative catalog containing the complete standard DIA Reference Model v3.2.0 artifacts, while legacy representative "v3.2.0" remains frozen for historical reproducibility.
  • Extension Policy: Non-standard custom or proprietary extensions (e.g., 05.02.99 and 10.01.99) must be isolated from the standard DIA Reference Model components. All standard artifacts are registered with is_extension=False (under standard catalog "v3.2.0-complete"), whereas custom or proprietary extensions are registered with is_extension=True (under extended catalog "v3.2.0-extended"). eISF-to-eTMF mappings propagate standard CV, delegation logs, and financial disclosures to standard complete catalog artifacts, whereas medical licenses map cleanly to extension codes (05.02.98) inside the extended version to prevent taxonomy drift.

PRD-TMF-002: Strict Taxonomy Validation, Ingestion Rejection, and Cutover Qualification ​

  • Strict Validation: During document ingestion or modification, the eTMF engine must perform strict hierarchical verification against the explicitly provided payload.taxonomy_version if supplied, falling back to the active default catalog version when omitted. If the provided zone_code, section_code, or artifact_code are unknown or create an invalid/mismatched combination, the transaction must be aborted and rejected with an HTTP 422 error.
  • Cutover Qualification: The platform's active catalog version must be formally qualified to cut over to the "v3.2.0-complete" version as default. The ingestion API must qualify this cutover by correctly accepting standard complete artifacts from "v3.2.0-complete" by default and extension artifacts with explicit taxonomy selection, while rejecting invalid structures with HTTP 422.

PRD-TMF-003: Taxonomy Version and Artifact Persistence ​

Every ingested document successfully validated against the selected catalog version (the explicitly specified payload.taxonomy_version, otherwise falling back to the active default catalog version when omitted) must persist the exact taxonomy_version and canonical artifact_code alongside standard metadata fields inside the relational eTMF database, providing permanent, version-specific traceability of the classification.

PRD-TMF-004: Catalog-Driven Completeness and Milestone Alignment ​

Completeness audits and expected document list seeding must dynamically query mandatory artifacts per milestone directly from the catalog's public APIs (e.g., get_mandatory_artifacts), matching exact canonical artifact_code identities across study and site scopes. For custom or site-specific expectations that cannot be resolved in the standard catalog, the completeness check falls back to case-insensitive name matching.

PRD-TMF-005: Automated and Manual Document Redaction & Integrity Verification ​

The system must support server-side automated and manual redaction of personally identifiable information (PII) and protected health information (PHI) within clinical documents. It must apply de-identification profiles (e.g. HIPAA, GDPR, EU_CTR) and custom terms to redact and shift dates/ages deterministically without changing the original source document. A signed, tamper-evident manifest must be generated for each redaction operation, and signature validation must fail upon any manifest modification. Raw matched values must never be returned or stored in manifest summaries, and unauthorized/read-only roles (such as inspectors and auditors) must be blocked from performing redaction or accessing unredacted original files. (Traced to SRS Trace-12; cross-referenced with ADR-2349 (formerly ADR-065) and ADR-098).

PRD-TMF-006: Multimodal eTMF/eISF Document Intelligence and DIA Reference Model Classifier ​

The system must provide an automated, multi-signal document intelligence pipeline combining optical character recognition (OCR) and layout parsing, regulatory metadata extraction (protocol number, site ID, investigator name, effective/expiration dates), signature completeness and digital manifestation verification, and DIA TMF Reference Model v3.2.0 taxonomy classification. High-confidence artifacts (>= 0.85) must generate recommended auto-classifications, while medium-to-low confidence or discrepancy-bearing documents must be staged into a DRAFT_AI or TECHNICAL_QC Quality Control queue for human Clinical Research Associate (CRA) review and electronic signature verification under 21 CFR Part 11 dual-attribution standards. In addition, site-level regulatory documents uploaded to eISF must automatically cross-map to corresponding Sponsor eTMF DIA taxonomy zones and artifacts.

PRD-DOC-001: Object Storage Adapter & Metadata Envelope Pattern ​

The system must decouple binary file payload storage from relational transaction state using a generic StoragePort[T] abstraction supporting MinIO and S3-compatible backends. All binary blobs (eTMF artifacts, eISF binders, site files, and multimedia attachments) must be stored under tenant-isolated paths (/{tenant_id}/{study_id}/{doc_id}). Document regulatory metadata, taxonomy classifications, version indices, and access control policies must reside in PostgreSQL. Pre-signed upload and download URLs must be generated only after validating caller authentication and permissions.

PRD-DOC-002: Cryptographic File Integrity & SHA-256 Checksum Verification ​

Every binary upload workflow must allocate a draft document envelope in PostgreSQL prior to issuing pre-signed upload URLs. Upon upload completion, the system must verify the file's SHA-256 checksum and mime-type against the committed database record before transitioning the document status to COMMITTED. Any payload failing checksum verification or virus scanning must be quarantined and marked as REJECTED.

The system must provide 21 CFR Part 11 compliant digital signing of binary documents requiring multi-factor re-authentication (username, password, and signing intent reason). Signed document manifests must bind the cryptographic SHA-256 hash of the binary file to the signer identity and timestamp. The system must also enforce Legal Retention Holds that programmatically prevent document soft-deletion, version pruning, or physical purging while an active hold is flagged.

PRD-SYS-050: Multi-Persona Context Switching & End-to-End Golden Path Verification ​

The platform web client and automated testing harness must support deterministic Persona Context Switching across all supported clinical roles (super_admin, sponsor_designer, site_crc, cra_monitor, data_manager, auditor). Context switching must seamlessly adjust active auth headers, tenant scopes, role-based UI gate visibility, and de-identification filters, allowing complete automated validation of the end-to-end golden path workflow from study authoring to audit inspection.

PRD-SYS-051: Governed AI Agent Runtime with Human-Approved Proposals and Dual Attribution ​

The platform must run every AI agent in one in-process Intelligence module of the composition host (ADR-2610, ADR-2630), behind a provider-neutral model port with per-tenant budgets, a kill switch and a local-only switch. An agent acts for one requesting person and reads only through that person's grants. Its only write into clinical data is a kernel Proposal (ADR-2489) that cites the records it read and names its model and qualified task configuration version; outbound free text is scrubbed and IdentityVault data is never sent to a model. A Proposal changes nothing until a person other than the proposer approves it with a 21 CFR Part 11 attestation over its content hash, and the resulting change records both the agent and the approving person. Regulated records carry no AI draft state.

PRD-SYS-052: Generative Pharmacovigilance Safety Narratives with 21 CFR Part 11 Electronic Signature ​

The safety microservice (apps/safety) must deploy an automated regulatory narrative drafting pipeline that compiles chronological de-identified clinical event streams from apps/execution (Demographics, Medical History, Study Drug Administration, Concomitant Medications, Adverse Events, Diagnostic Laboratory Results, Hospitalizations, and Dechallenge/Rechallenge) into FDA MedWatch 3500A and CIOMS-I compliant Serious Adverse Event (SAE) narrative summaries. Narratives must be generated using Frontier Reasoning models (ModelTier.TIER_3_FRONTIER) adhering strictly to ICH E2B(R3) section structure, contain grounded claim cross-references linking narrative sentences directly to underlying eCRF clinical records, and enforce mandatory 21 CFR Part 11 cryptographic electronic signature gating by a qualified Safety Physician or Medical Monitor before entering APPROVED status or exporting to ICH E2B(R3) ICSR XML format.

PRD-SYS-053: Antigravity GxP Lifecycle Hooks & AI Coding Guardrails ​

The development environment and agent runtime must implement native Google Antigravity lifecycle hooks (.agents/hooks.json) executing deterministic guardrails from the native Cadence CLI (cadence hook pre-tool|post-write|pre-invocation|stop) across all agent interaction phases (PreToolUse, PostToolUse, PreInvocation, Stop). The lifecycle hooks must enforce GxP-critical safety boundaries: blocking destructive git and shell commands, preventing unauthorized manual edits to generated GxP compliance artifacts (such as the Requirements Traceability Matrix and IQ/OQ/PQ execution reports), validating post-edit C# code for boolean query predicates compared with == true/== false instead of strongly typed predicates, injecting in-flight 21 CFR Part 11 compliance context before model invocation, and verifying test and compliance document synchronization prior to session termination.

PRD-SYS-054: Domain-Specific MCP Tool Extensions, Graph Introspection & Autonomous Agent Sidecars ​

The developer tooling framework and Model Context Protocol (MCP) server (packages/cli/mcp/server.py) must expose typed domain-level clinical tools for autonomous coding agents and human developers: CDISC USDM v3/v4 protocol graph introspection (usdm_graph_inspect), eCRF-to-SDTM domain mapping validation against CDISC Conformance Rules (sdtm_pipeline_validate), reactive transactional outbox clinical event querying and test replay (clinical_event_stream), and GxP-compliant synthetic clinical participant generation (synthetic_patient_generate). All domain tools must encapsulate progressive disclosure zoom envelopes (zoom_token), enforce strict Pydantic typing, guarantee bitwise deterministic mock fallback during offline testing, and prevent Protected Health Information (PHI) leakage.

PRD-SYS-125: Immutable Point-in-Time Regulatory Dataset Snapshots & Executive Electronic Signatures ​

The platform must generate deterministic, SHA-256 Merkle root canonical digests sealing point-in-time clinical trial datasets corresponding to periodic reporting windows (e.g. Development International Birth Date DIBD anniversaries). Dataset snapshots must guarantee 100% bitwise reproducibility and provide cryptographic verification endpoints to detect post-lock data mutation or tampering. Periodic regulatory safety reports compiled from snapshots must enforce 21 CFR Part 11 role-gated electronic signature workflows by the Qualified Person for Pharmacovigilance (QPPV) or authorized Safety Physician before regulatory submission export.

PRD-SYS-126: Medical Device & In-Vitro Diagnostic (IVD) Investigation Suite ​

The platform must provide a unified Medical Device & In-Vitro Diagnostic (IVD) Clinical Investigation module compliant with ISO 14155:2020, EU MDR 2017/745, EU IVDR 2017/746, and FDA 21 CFR Part 812. The architecture must integrate serialized UDI inventory accountability in RTSM (apps/execution), structured eCRF capture of device deficiencies, malfunctions, usability errors, and labeling inadequacies, automated Adverse Device Effect (ADE / SADE / USADE) safety investigation gating in apps/safety, immediate programmatic RTSM device and lot quarantine with dispensation blocking, and regulatory incident export compilation (EU MDR/IVDR Manufacturer Incident Reports and CDISC SDTM DD/DO domains) in apps/interop.


4. Study Design & Clinical Metadata Repository (MDR) ​

4.1 Biomedical Concepts (BCs) and Value-Level Metadata (VLM) ​

Biomedical Concepts (BCs) represent the core, standardized data variables defined by the organization (e.g., Systolic Blood Pressure, Alanine Aminotransferase). Value-Level Metadata (VLM) defines the constraints, ranges, and data types governing these concepts.

+-------------------------------------------------------------------------------+
|                        BIOMEDICAL CONCEPT (BC) STRUCTURE                      |
+-------------------------------------------------------------------------------+
|  Concept Code: BC-VIT-001 (Systolic Blood Pressure)                           |
+-------------------------------------------------------------------------------+
|  VLM Constraints:                                                             |
|   - Data Type: Integer                                                        |
|   - Valid Range: 50 mmHg to 250 mmHg                                          |
|   - Soft-Warning Limit: < 90 mmHg or > 140 mmHg (triggers investigator alert)  |
|   - CDASH Mapping: VS.VSSPB                                                    |
+-------------------------------------------------------------------------------+

PRD-MDR-001: Value-Level Metadata Constraint Propagation ​

  • When a study designer links a BC to an eCRF data field, the associated VLM rules (data type, range limits, unit lists) must automatically generate the corresponding JSON Schema or OpenRosa validation logic.
  • Range validation must support three tiers:
    1. Strict Rejection Range: Submissions containing values outside these boundaries are blocked immediately at the UI level.
    2. Soft-Warning Range: Submissions are accepted, but require the user to input an immediate reason_for_change explaining the clinical outlier before saving the form.
    3. Normal Range: Standard clinical values needing no warning.

PRD-MDR-002: Biomedical Concept Lock State during Active Studies ​

  • A Biomedical Concept that is currently referenced by an active, recruiting clinical trial protocol (defined as study status Active-Recruiting) is locked against modifications.
  • Any attempt to update, rename, or delete a locked BC must throw a 409 Conflict error.
  • To modify a locked BC, the study designer must initiate a formal Protocol Amendment workflow. This spawns a new branched version of the metadata graph (e.g., Version 2.0.0-AMENDMENT), leaving the active Version 1.0.0-RELEASE untouched.

4.2 Complex Trial Designs (Adaptive, Basket, Umbrella, Platform) ​

The Cadence Clinical MDR supports next-generation trial frameworks where study components can be dynamically shifted, added, or removed based on interim analysis results.

+-------------------------------------------------------------------------------+
|                      COMPLEX TRIAL ARMS DESIGN ENGINE                         |
+-------------------------------------------------------------------------------+
|  1. Umbrella Trial Flow:                                                      |
|     Subject Screened ---> Biomarker A+ ---> Arm A (Cohort 1)                   |
|                      ---> Biomarker B+ ---> Arm B (Cohort 2)                   |
|                                                                               |
|  2. Adaptive Minimization:                                                     |
|     Interim Analysis (Day 30) ---> Checks Efficacy Threshold                  |
|                               ---> Success: Open Arm C                        |
|                               ---> Futility: Close Arm A (Failsafe Reroute)   |
+-------------------------------------------------------------------------------+

PRD-MDR-003: Dynamic Cohort Opening & Closing Rules ​

  • The Designer Service must track trial arms and cohorts as versioned nodes in the Neo4j graph database.
  • An external statistician or system API can trigger a status change for a cohort node (e.g., Cohort_A.status = CLOSED_FOR_FUTILITY).
  • Upon receiving this mutation, the Execution Engine must automatically:
    1. Deactivate the randomization allocation path for Cohort A within 100 milliseconds.
    2. Route all future subjects satisfying the biomarker criteria to the alternative pre-configured cohort (Cohort B) or transition them to a Screen Failed status.

PRD-MDR-004: Crossover Timeline Mapping & Arm Interventions ​

  • The MDR must support multi-period crossover trials. The trial design must model sequential periods (e.g., Period 1: Treatment A, Washout: 14 days, Period 2: Treatment B).
  • Chronological sequence logic must enforce that a subject cannot enter Period 2 until the system confirms the absolute completion of Period 1 and the exact expiration of the 14-day washout period (calculated using UTC timestamps from the final Period 1 visit).

4.3 Blinding and Masking Rules ​

Blinding is critical to clinical trial integrity. Cadence Clinical maintains a cryptographically secure separation of treatment allocation metadata.

PRD-MDR-005: Dual-Key Blinding Security ​

  • Treatment allocation tables matching subject_uuid to treatment_group (e.g., Drug vs. Placebo) must be encrypted using AES-256 with a unique salt.
  • The decryption key must be split into two separate cryptographic shares using Shamir's Secret Sharing Scheme.
  • Share A is held by the Lead Unblinded Statistician, and Share B is held by the Independent Data Monitoring Committee (IDMC).
  • No system administrator, site investigator, or clinical monitor can access the plain-text mapping without both shares being cryptographically combined via the gateway API.

PRD-MDR-006: Blinding Constraints on UI Data Rendering ​

  • For double-blinded studies, any API endpoint returning subject records or visit logs to site investigator roles, clinical monitors, or sponsor study managers must dynamically redact the fields: treatment_group, randomization_seed, and investigational_product_id.
  • The system must return a masked placeholder (e.g., ******). Any attempt to inspect the HTTP network payload in the browser must reveal only the encrypted ciphertext of these parameters.

4.4 Inclusion & Exclusion (I/E) Criteria Governance ​

I/E criteria represent the gating rules that determine whether a subject is permitted to participate in the clinical trial.

+-------------------------------------------------------------------------------+
|                          INCLUSION / EXCLUSION ENGINE                         |
+-------------------------------------------------------------------------------+
|  Inclusion Rules:                                                             |
|   - INC-001: Informed Consent signed? [MUST BE 'YES']                         |
|   - INC-002: Age >= 18?                 [MUST BE 'YES']                       |
|                                                                               |
|  Exclusion Rules:                                                             |
|   - EXC-001: History of renal disease?  [MUST BE 'NO']                        |
|                                                                               |
|  Outcome:                                                                     |
|   - Any single failure immediately locks subject state to SCREEN_FAILED.      |
+-------------------------------------------------------------------------------+

PRD-MDR-007: Logical Mapping of I/E Criteria to eCRF Fields ​

  • Every I/E criterion node in the MDR must contain a strict logical mapping expression referencing one or more specific eCRF field identifiers.
  • Example Expression: eCRF.DM.AGE >= 18 && eCRF.IC.SIGN_STATUS == 'SIGNED'
  • During the Screening Visit data entry, the EDC execution engine must execute these expressions in real-time. If any expression evaluates to FALSE, the subject state must immediately transition to Screen Failed and the user must be blocked from randomized treatment allocation.

PRD-DDF-001: AI-Native USDM Protocol Digitization & Automated eCRF/SoA Synthesis Engine ​

  • The platform must provide an end-to-end automated Digital Data Flow (DDF) pipeline that parses unstructured clinical protocol documents (PDF/DOCX) using structured clinical LLM schemas (Pydantic v2).
  • Extracted parameters must compile directly into CDISC USDM v4.0 graph models in Neo4j (Study, StudyProtocolVersion, StudyArm, StudyEpoch, Encounter, Activity, EligibilityCriterion, BiomedicalConcept).
  • The system must automatically synthesize CDASH-compliant eCRF forms (VS, EG, LB, QS, PE, AE, DM), VAS sliders, 74-zone SNOMED CT body maps, and XPath/AST skip-logic validation rules in under 60 seconds with static circular dependency checks.
  • Changes committed to the graph must enforce 21 CFR Part 11 audit attribution and user change reason justifications.

5. Electronic Data Capture (EDC) & eCRF Engine ​

5.1 Spreadsheet Parsing & Sheet-to-Form Mapping ​

The Cadence Clinical platform ingests clinical metadata directly from standardized Excel spreadsheets, converting them into GxP-compliant OpenRosa/Enketo-compatible XForm schemas.

Spreadsheet (.xlsx) ──► Ingestion Parser (Brotli compression) ──► JSON Schema / XForm AST ──► SQLite/IndexedDB Storage

PRD-EDC-001: Spreadsheet Ingestion Sheet Structure ​

The spreadsheet parsing engine must expect an Excel file containing exactly three sheets with fixed, case-sensitive names:

  1. FORMS: Defines the overall form headers, layout rules, and standard CDASH classifications.
  2. GROUPS: Defines repeating and non-repeating section containers within each form.
  3. ITEMS: Defines individual question fields, data types, units, choices, and skip patterns.

PRD-EDC-002: Field-Level Ingestion Validations ​

During the upload of an eCRF design spreadsheet, the parser must execute strict programmatic checks. The upload must fail with a detailed JSON diagnostic report listing sheet name, row number, and error type if any of the following occur:

  • Duplicate Field Names: Multiple records in the ITEMS sheet share the same item_id.
  • Invalid Data Types: An item specifies a data type other than text, integer, decimal, date, datetime, boolean, choice_single, choice_multiple, or file.
  • Missing References: A field references a non-existent parent group in the GROUPS sheet, or a non-existent form in the FORMS sheet.
  • Circular Dependencies: Skip logic or calculation expressions create an infinite loop between two or more fields (e.g., Field A relevant if Field B > 10, and Field B relevant if Field A is populated).

5.2 Dynamic Field Behaviors & Skip Logic ​

eCRFs must display fields dynamically depending on previous inputs to minimize user cognitive load and prevent incorrect data entries.

+-------------------------------------------------------------------------------+
|                       CONDITIONAL RENDERING FLOW CHART                        |
+-------------------------------------------------------------------------------+
|   Question: [Is the subject pregnant?]  (Field ID: PREG_STATUS)               |
|                                                                               |
|             +-------- Yes -------> Render: [Expected Due Date]                 |
|             |                              (Field ID: DUE_DATE, Required=True) |
|             |                                                                 |
|             +-------- No  -------> [Expected Due Date] remains HIDDEN.        |
|                                                                               |
|   Edge Case Safe-Nullification:                                               |
|   If user changes answer from 'Yes' to 'No':                                  |
|   DUE_DATE must be immediately nullified and wiped from database block.       |
+-------------------------------------------------------------------------------+

PRD-EDC-003: Dynamic Skip Logic Evaluation ​

  • Fields with a conditional visibility constraint (defined via XPath or logical string, e.g., relevant = "/data/PREG_STATUS = 'YES'") must be hidden by default in the UI layer.
  • The frontend execution engine must re-evaluate all relevant expressions on any field state modification in less than 5 milliseconds.

PRD-EDC-004: Cascading Dependent Nullification (Orphan Data Safeguard) ​

  • Rule: If a user modifies a parent field (e.g., changes PREG_STATUS from YES to NO) causing a currently visible child field (DUE_DATE) to become hidden, the system must immediately and completely purge any previously entered data in the child field from both the frontend memory state and the database payload.
  • Audit Trail Action: The automatic nullification of the child field must be logged in the audit ledger with the system-generated reason: "System-initiated purge of inactive child variable due to parent value mutation".

5.3 Repeating Groups & Advanced Grid Behaviors ​

Repeating groups represent logs where multiple entries can be made dynamically (e.g., Concomitant Medications, Adverse Events).

+-------------------------------------------------------------------------------+
|                            REPEATING GRID LOG SHEET                           |
+-------------------------------------------------------------------------------+
| Row # | Medication Name | Daily Dose | Unit | Route  | Start Date  | Actions  |
+-------+-----------------+------------+------+--------+-------------+----------+
|   1   | Paracetamol     |   1000     | mg   | Oral   | 2026-07-01  | [Delete] |
|   2   | Aspirin         |    325     | mg   | Oral   | 2026-07-05  | [Delete] |
|   3   | [Click to Add]  |            |      |        |             |          |
+-------------------------------------------------------------------------------+

PRD-EDC-005: Real-Time Row Ingestion and Index Tracking ​

  • Within repeating groups, each row must be uniquely tracked using a 1-based index (e.g., CM[1], CM[2]).
  • The system must permit dynamic insertion, re-ordering, and deletion of rows.
  • If a row is deleted (e.g., row 2 of 3), the system must soft-delete row 2, and preserve row indices without compacting them in the historical database schema to prevent breaking longitudinal edit checks referencing specific indices (e.g., referencing CM[3]).

PRD-EDC-006: Advanced Inputs (VAS and Interactive Body Maps) ​

  • Visual Analog Scale (VAS): The system must support VAS inputs rendered as a continuous sliding scale from 0 to 100. The output must be stored as a precise floating-point number (decimal) accurate to two decimal places (e.g., 87.34).
  • Interactive Body Maps: The system must support body map widgets where users tap/click specific physical zones (e.g., Right Knee, Left Shoulder). The captured payload must store an array of standard anatomical codes mapped to LOINC/SNOMED CT identifiers (e.g., ["SNOMED-27268008", "SNOMED-12794005"]).

5.4 Offline Data Capture & Synchronization Engine ​

Global clinical trials are frequently conducted in remote sites with intermittent internet connectivity. Cadence Clinical ensures zero data loss via an offline-first browser architecture.

[Offline Browser Session] ──► Write to Local IndexedDB ──► Network Restored ──► Sync Engine ──► Conflict Evaluation ──► PostgreSQL Commit

PRD-EDC-007: Local IndexedDB Security & State Preservation ​

  • When internet connectivity is lost, the EDC app must transition seamlessly into Offline Capture Mode. The UI must display a distinct yellow banner: "Working Offline - Local Storage Enabled".
  • All data entry, validation checks, and skip-logic evaluations must run locally using client-side JavaScript.
  • Data must be encrypted locally in IndexedDB using AES-GCM with a temporary key derived from the user's active session token.

PRD-EDC-008: Conflict Resolution and Sync Reconciliation ​

Upon restoration of network connectivity, the system must trigger a background reconciliation process following these strict rules:

  1. Non-Conflicting Fields: Modifications to independent forms or fields must be merged immediately.
  2. Conflicting Fields (Last-Write-Wins Rule): If the same specific field in an eCRF (e.g., Subject_101.Demographics.Weight) was modified both offline and online during the disconnected window, the sync engine must compare the client-side modification UTC timestamp with the database server timestamp. The record with the more recent timestamp must win.
  3. Audit Preservation: The overwritten record must not be deleted. It must be written directly to the shadow audit schema, logging both inputs, and marking the defeated entry with the status: "Defeated by online-merge conflict resolution".

5.5 Advanced Field-Level Validation & Interactive Controls ​

We define precise mathematical bounds, UI representations, and JSON payload structures for advanced input widgets to eliminate ambiguity during implementation.

PRD-EDC-009: Visual Analog Scale (VAS) Slider Specifications ​

  • UI Controls: The slider must represent a continuous scale from 0 (Left: "No Pain") to 100 (Right: "Worst Imaginable Pain"). Keyboard increments of arrow keys must alter the value by exactly 1.00 unit.
  • Database Format: Decimal(5,2) in PostgreSQL, validated between 0.00 and 100.00.
  • Dynamic Warning Flags: If a slider value registers $> 80.00$, the UI must render an inline alert asking the user to confirm if this represents a Serious Adverse Event (SAE) condition.

PRD-EDC-010: Interactive Body Map Coordinates and Schema Mapping ​

  • SVG Mapping Layer: The body map widget renders a multi-layered vector SVG comprising 74 distinct anatomical zones. Each zone holds an immutable attribute data-snomed-id containing its SNOMED CT clinical code.
  • Selection State: Tapping an SVG zone toggles the selected class and appends the SNOMED CT code to the form state.
  • JSON Schema Payload: The target field must serialize selections as a JSON list:
json
{
  "field_id": "BODY_MAP_PAIN_LOCATIONS",
  "value_type": "snomed_codes",
  "selections": [
    { "code": "SNOMED-27268008", "term": "Right Knee Joint" },
    { "code": "SNOMED-12794005", "term": "Left Shoulder Joint" }
  ]
}

5.6 CRF Builder Engine & Compliance Integrity ​

The CRF Builder provides interactive authoring of Case Report Forms (CRFs), allowing sponsors to compile digital protocols into standardized layouts while enforcing rigid GxP and 21 CFR Part 11 electronic data controls.

PRD-CRF-001: CRF Authoring & Global Library Instantiation ​

The system must support graphical CRF layout design and template authoring in the apps/designer microservice. Users must be able to load, reference, and instantiate version-controlled templates (including Forms, Visits, Arms, and Data Elements) directly from the Global Library. All instantiations must preserve a strict, non-destructive trace link (INSTANTIATED_FROM relationship) to the source template's global library ID and version index without modifying the source template itself.

PRD-CRF-002: Real-time Contextual Preview ​

The apps/designer workspace must provide a real-time, high-fidelity contextual preview of CRF layouts, simulating exact web rendering grids and input controls (e.g., VAS sliders, repeating tables, body maps) directly within the authoring canvas.

PRD-CRF-003: Collaborative Workspace Review Workflow ​

The platform must support structured peer review and sign-off status controls (DRAFT, IN_REVIEW, APPROVED, PUBLISHED, ARCHIVED) for CRF drafts within apps/designer. The system must gate layout modifications when a draft is in locked/frozen review states and require dual-signature authorization prior to formal publication.

PRD-CRF-004: Declarative Rule Generation & Multi-Layer Edit Checks ​

The CRF Builder must programmatically output declarative, CDISC USDM-aligned rule structures covering:

  • Skip Logic: Dynamic field rendering based on preceding question states.
  • Field Constraints: Complex range, data type, and logical constraints.
  • Cross-Form Validation: Edit checks comparing clinical values across different forms or repeat visits. These declarations must be fully compiled into open-standard XPath expressions by compilers in apps/designer.

PRD-CRF-005: Simulation and Dry-Run Cycle Detection ​

Before study activation, apps/designer must provide a dry-run execution environment. This environment must automatically scan compiled rules and transition graphs, executing cycle-detection algorithms to detect infinite skip-logic loops or circular dependencies (e.g., Field A dependent on Field B, which depends on Field A) and abort publication on detection.

PRD-CRF-006: CDASH, USDM, and CSV Mapping Fidelity ​

The spreadsheet ingestion and mapping pipeline inside apps/designer must maintain 100% data fidelity when parsing CDASH variables, USDM schema structures, or tabular CSV specifications, ensuring that CDASH data structures are fully mapped to target SQLModel schemas without data truncation.

PRD-CRF-007: FHIR eSource Readiness & CDASH Pre-fill ​

The apps/interop service must support ingestion of HL7 FHIR resources, mapping FHIR demographics and clinical variables (e.g., Vital Signs, Labs) into CDASH/SDTM-conformant CRF fields to enable automated form pre-fill capabilities.

PRD-CRF-008: Regulatory & Protocol Document Export ​

The clinical protocol rendering module in apps/designer must support the compilation and PDF/DOCX generation of completed protocols, study layouts, and annotated eCRFs. This operation must offload CPU-heavy rendering to separate thread pools to preserve event-loop performance.

PRD-CRF-009: Role-Based Authorization Gates ​

To comply with FDA 21 CFR Part 11, the platform must restrict CRF creation, draft modification, rules configuration, and publication to authorized roles (e.g., sponsor_designer, sponsor_dm, sponsor_admin, or sysadmin) while blocking auditor, investigator, or regulatory inspector roles from accessing mutation endpoints. This control is satisfied by reusing RBAC checks in packages/security.

PRD-CRF-010: GxP Change-Reason Justification ​

Every save, update, state transition, or soft deletion of a CRF layout, clinical rule, or template mapping must capture a mandatory, user-supplied change justification string (X-Change-Reason or reason_for_change) of at least 10 characters to satisfy 21 CFR Part 11 audit trail requirements.

PRD-CRF-011: Immutable Audit Attribution ​

All modifications to the CRF designs or clinical rules must write transaction-bound, append-only log entries containing the UTC timestamp, user ID, version index, and change justification to the immutable audit database ledger. This control is satisfied by reusing audit logging structures in packages/security.

PRD-CRF-012: Version Pinning and Lock Enforcement ​

Evidence: PostgreSQL (approved versions are frozen by a database trigger, so only a PostgreSQL test can prove it).

Once a CRF design or rule-set is marked as APPROVED or PUBLISHED, the specific version index must be pinned. Any subsequent update must require incrementing the version index by 1 and creating a new draft version, preventing retroactive modifications to active study-arm parameters.

PRD-CRF-013: Site & Tenant Data Isolation ​

Evidence: PostgreSQL (isolation is enforced by row-level security, so only a PostgreSQL test can prove it).

Sponsor metadata partitions and multi-tenant namespaces must be strictly isolated. Users belonging to Sponsor A must be restricted from reading, listing, or cloning CRF templates and drafts belonging to Sponsor B, rejecting unauthorized cross-sponsor queries with a 403 Forbidden response.

PRD-CRF-014: Failure Recovery & High Availability ​

The local storage sync engine (apps/subject-portal and apps/interop sync) must preserve CRF drafts and unsynced submissions in client-side IndexedDB caches during network disconnects. Upon reconnect, the system must support safe, transactional batch flushes with deterministic conflict resolution to prevent silent data loss.

PRD-CRF-015: In-Memory Accessibility Auditing ​

The frontend rendering canvas must support automated, in-memory WCAG 2.1 accessibility scans to verify structural layout contrast ratios, element labeling, and keyboard focus routing during form design time.


6. Subject Operations & Randomization Workflows ​

6.1 Subject Lifecycle State Machine ​

A subject's progress through a clinical trial is highly regulated. Subject states must undergo rigid, state-controlled transitions to prevent clinical protocol deviations.

                                  +-------------------+
                                  |    Screening      |
                                  +---------+---------+
                                            |
                         +------------------+------------------+
                         |                                     |
               [I/E Fail / Drop]                             [Pass]
                         |                                     |
                         v                                     v
              +-------------------+                  +-------------------+
              |   Screen Failed   |                  |     Enrolled      |
              +-------------------+                  +---------+---------+
                                                               |
                                                       [Randomization]
                                                               |
                                                               v
                                                     +-------------------+
                                                     |    Randomized     |
                                                     +---------+---------+
                                                               |
                                                          [First Visit]
                                                               |
                                                               v
                                                     +-------------------+
                                                     |      Active       |
                                                     +----+---------+----+
                                                          |         |
                                               [Complete] |         | [Withdrawal]
                                                          v         v
                                        +-------------------+     +-------------------+
                                        |     Completed     |     |     Withdrawn     |
                                        +-------------------+     +-------------------+

PRD-SUB-001: State Transition Matrix & Enforcements ​

The system must enforce that a subject's state can only mutate according to the strict transition rules defined below. Any attempt to bypass these paths via direct API updates must throw a 422 Unprocessable Entity error.

Initial StateEvent TriggerValid Target StateForbidden Target StatesBusiness Logic Constraint
NoneInitiated ScreeningScreeningAll except ScreeningRequires input of unique screening ID.
ScreeningInclusion/Exclusion FailScreen FailedEnrolled, Randomized, ActiveTriggered automatically by any I/E criteria failure.
ScreeningInclusion/Exclusion PassEnrolledScreen Failed, RandomizedAll I/E rules must evaluate to TRUE.
EnrolledExecuted RandomizationRandomizedActive, Completed, WithdrawnEnforces verification that Informed Consent remains active.
RandomizedAdministered Dose / First VisitActiveScreening, EnrolledSubject cannot go back to screening once randomized.
ActiveCompleted Last Protocol VisitCompletedScreening, Enrolled, RandomizedRequires completion of all mandatory eCRFs.
Active / RandomizedSubject Withdraws ConsentWithdrawnAll except WithdrawnIrreversible state. Immediately restricts future clinical data entry.

The kernel enrollment state machine (kernel specification §7.4, ADR-2453) refines this table: Enrolled → Active is allowed for non-randomized studies, withdrawal is allowed from any active state (Screening, Enrolled, Randomized, Active) through a dedicated command that names a Withdrawn attestation, and an illegal move is refused with 409 Conflict (K.Execution.InvalidTransition).

PRD-SUB-002: Partial Visit Query Capability on Withdrawn Subjects ​

  • When a subject transitions to the Withdrawn state, the EDC engine must instantly lock all upcoming scheduling visits (e.g., future visits cannot be initialized).
  • Exception Rule: Investigators and Clinical Monitors must retain full write access to answer, modify, and close outstanding data queries on visits that were already completed prior to the withdrawal date.

6.2 Randomization Rules & Minimization Algorithms ​

Randomization prevents selection bias. Cadence Clinical supports multiple automated randomization methods.

+-------------------------------------------------------------------------------+
|                         RANDOMIZATION ENGINE METRICS                          |
+-------------------------------------------------------------------------------+
|  Minimization Formula (Total Imbalance):                                      |
|                                                                               |
|  For each candidate arm (T):                                                   |
|  D_T = sum_{f in Factors} [ Count(Site(f)) + Count(Age(f)) + Count(Gender(f)) ]|
|                                                                               |
|  Select Arm T that minimizes D_T.                                             |
|  If D_A == D_B, apply a random probability seed (e.g., p=0.8 for balance).    |
+-------------------------------------------------------------------------------+

PRD-SUB-003: Stratified Block Randomization ​

  • The system must support Stratified Block Randomization, where subjects are grouped into strata based on baseline covariates (e.g., Site ID, Age Group <50 vs. \ge 50).
  • Within each stratum, randomization allocation must execute according to a pre-defined block sequence configuration (e.g., block sizes of 4 containing two A and two B allocations).
  • Block configurations must be encrypted at rest. The active block index must be updated within a thread-safe transaction lock to prevent race conditions during concurrent multi-site enrollments.

PRD-SUB-004: Dynamic Minimization Algorithm ​

  • To handle small sample sizes or large numbers of prognostic factors, the system must support dynamic Pocock-Simon Minimization.
  • When a subject is randomized, the algorithm must calculate the total covariate imbalance across all treatment arms that would result from assigning the subject to each arm.
  • The subject must be assigned to the treatment arm that minimizes the resulting imbalance with a default probability weight of p = 0.8. A random number generator seeded with a high-entropy hardware random source must resolve the allocation.

6.3 Emergency Unblinding Protocols ​

In emergency medical situations where knowing the treatment group is critical to subject safety, the system must support a controlled, fully audited unblinding protocol.

+-------------------------------------------------------------------------------+
|                          EMERGENCY UNBLINDING FLOW                            |
+-------------------------------------------------------------------------------+
|  PI requests Unblinding ---> Re-Authenticate (OIDC) ---> Select Reason Code    |
|                                                                |              |
|  State changes to UNBLINDED <--- System Decrypts Allocation <----+            |
|  (Restricted future entry)                                                    |
|                                                                               |
|  Immediate GxP Alert: Emails sent to Sponsor Safety Lead, CRA, and IDMC       |
+-------------------------------------------------------------------------------+

PRD-SUB-005: Triggering and Authorizing Emergency Unblinding ​

  • Emergency unblinding must be accessible only via a dedicated, secure action panel in the Subject View interface.
  • The user (Principal Investigator or Authorized ER Physician) must perform the following actions:
    1. Re-enter their active OIDC password.
    2. Select a GxP Reason Code from a pre-defined list (e.g., SAE-Life-Threatening-Event, Accidental-Overdose, Required-by-Regulatory-Authority).
    3. Enter a detailed text description of minimum 50 characters explaining the clinical necessity.
  • Once submitted, the system must immediately decrypt the treatment allocation for that specific subject and display it on screen for exactly 120 seconds.

PRD-SUB-006: Immediate Unblinding State Mutation & System Actions ​

  • Upon unblinding execution, the subject's baseline state must instantly mutate to Unblinded (represented by a global database flag is_unblinded = TRUE).
  • The system must immediately trigger the following events:
    1. Notification Dispatch: Send automated, high-priority GxP email and SMS alerts to the Sponsor Safety Lead, the assigned Lead Monitor (CRA), and the IDMC Secretariat.
    2. Data Restriction: Restrict further standard double-blinded data entry for this subject. The investigator can only complete safety/AE forms.
    3. Audit Ledger Entry: Write an immutable ledger block capturing: investigator user ID, timestamp, reason, and decryption key verification.

During a trial, amendments to the study protocol (e.g., changes to dose levels, safety risks) often require subjects to sign a new Informed Consent Form (ICF).

  • When a protocol amendment is published (e.g., Version 2.0.0), the system must permit the Study Designer to tag the amendment as "Requires Re-Consent = TRUE".
  • Once this configuration is active, the Execution Engine must block the PI from entering data into any subsequent clinical visits for existing subjects under the new protocol version until they upload a signed, dated ICF matching the exact version code of the amendment.
  • The UI must render a prominent blocking modal: "Re-Consent Required - Demographics & Visit Forms Locked".

7. Query Management & Data Review Workflows ​

7.1 Query Lifecycle & State Machine ​

Queries are discrepancy flags raised when data values are missing, inconsistent, or clinically improbable. Queries can be raised either automatically by the system (edit checks) or manually by clinical monitors or data managers.

                  +----------------------------------------------------+
                  |                    Opened                          |
                  +---------+--------------------------------+---------+
                            |                                |
                   [Investigator Answers]           [System Auto-Resolves]
                            |                                |
                            v                                v
                  +-------------------+            +-------------------+
                  |     Answered      |            |      Closed       |
                  +---------+---------+            +-------------------+
                            |
                     +------+------+
                     |             |
                [CRA Approves]  [CRA Rejects]
                     |             |
                     v             v
            +-----------------+   +-----------------+
            |     Closed      |   |    Reopened     |
            +-----------------+   +-----------------+

PRD-QRY-001: Query State Transitions and Constraints ​

The query engine must enforce transitions according to the strict state table below. Any illegal transition request must return a 400 Bad Request error.

Source StateEvent / ActorTarget StatePermitted Actions & Conditions
NoneEdit Check Fails (System)OpenedSystem automatically inserts query node; sets created_by = "SYSTEM".
NoneManual Flag (Monitor/DM)OpenedRequires associated text and field-target reference.
OpenedInvestigator Data CorrectionAnsweredInvestigator must correct data field OR provide an explanatory text answer.
OpenedData Change matches ruleClosedFor system queries: if the investigator changes data such that the edit check rule now passes, the system auto-closes the query.
AnsweredCRA/Monitor ApprovalClosedQuery is permanently resolved. Field changes are locked in active status.
AnsweredCRA/Monitor RejectionReopenedQuery is returned to investigator. Rejection reason text is required.
ReopenedInvestigator CorrectionAnsweredInvestigator provides updated correction.

PRD-QRY-002: Query Escalation Rules ​

  • If a query remains in the Opened or Reopened state for more than 14 consecutive calendar days, the system must auto-escalate the query.
  • Escalation Actions:
    1. Append a high-priority GxP flag to the query node (priority = "HIGH").
    2. Send a daily query aging digest email to the Site Principal Investigator and the Sponsor Lead CRA.

7.2 Discrepancy Notes & Cross-Form/Longitudinal Edit Checks ​

Clinical data validation frequently requires comparing data entries across different forms (cross-form) or different timepoints (longitudinal).

+-------------------------------------------------------------------------------+
|                        LONGITUDINAL EDIT CHECK EXAMPLES                       |
+-------------------------------------------------------------------------------+
|  Edit Check 1 (Temporal Constraint):                                          |
|  Is Adverse Event (AE) Start Date < Informed Consent (IC) Date?               |
|  Expression: eCRF.AE.START_DATE < eCRF.IC.SIGN_DATE                           |
|  Result: Trigger Query "AE date cannot precede consent."                      |
|                                                                               |
|  Edit Check 2 (Dose Escalation Constraint):                                   |
|  Is Dose(Visit 3) < Dose(Visit 2)?                                            |
|  Expression: eCRF.V3.DOSE < eCRF.V2.DOSE                                      |
|  Result: Trigger Query "Dose reduction detected. Clinical justification req."|
+-------------------------------------------------------------------------------+

PRD-QRY-003: Cross-Form Edit Check Execution ​

  • The Execution Engine must run a background evaluation queue that processes cross-form edit checks asynchronously upon every form submission.
  • Example Rule: The system must compare the AE.onset_date with the Informed_Consent.signed_date. If AE.onset_date < Informed_Consent.signed_date, the system must automatically raise a System Query on the AE.onset_date field within 500 milliseconds.

PRD-QRY-004: Longitudinal Validation and Repeat-Visit Logic ​

  • Edit checks must be capable of traversing historical visits.
  • The system must execute validation rules comparing values between Visit $N$ and Visit $N-1$ (e.g., Subject weight cannot decrease by more than 20% between two consecutive visits).
  • If the previous visit data is not yet entered or is in a Draft state, the edit check must pause execution and enter a Pending-Predecessor status, resuming automatically once the predecessor visit form transitions to Complete.

7.3 Source Document Verification (SDV) and Targeted SDV (tSDV) ​

Source Document Verification is the process by which a clinical research associate (CRA) verifies that the electronic data entered in the eCRF matches the patient's raw medical records at the clinic.

+-------------------------------------------------------------------------------+
|                             tSDV CONFIGURATION MATRIX                         |
+-------------------------------------------------------------------------------+
|  Trial Profile: Low-Risk Phase IV                                             |
|  tSDV Rule:                                                                   |
|   - First 3 subjects at every site: 100% SDV (Critical Safety fields)          |
|   - Subsequent subjects: 20% random selection.                                |
|                                                                               |
|  Trigger: Subject 004 Enrolled.                                               |
|  Algorithm computes random seed ---> Selected for SDV.                         |
|  Investigator form modifications drop active SDV flag ---> CRA alerted.        |
+-------------------------------------------------------------------------------+

PRD-QRY-005: Field-Level SDV Flags and Audit Retention ​

  • The system must render an interactive checkbox next to every eCRF field for users with the CRA role.
  • Checking the box marks the field as "Verified" (is_sdv_verified = TRUE), storing the CRA's UUID and the precise verification timestamp in the field's metadata.
  • SDV Verification Preservation: Once verified, the field status is locked in the active viewport.

PRD-QRY-006: Automatic Verification Drop upon Data Modification ​

  • Rule: If an investigator or coordinator updates the value of a field that is currently marked as "Verified" (is_sdv_verified == TRUE), the system must instantly and automatically drop the verification status of that field (is_sdv_verified = FALSE).
  • Audit and Alert Actions:
    1. Force the investigator to supply a mandatory GxP reason for editing verified data.
    2. Write an event log to the audit schema.
    3. Send an immediate notification flag to the assigned CRA's dashboard: "Previously verified field modified on Subject X - Visit Y".

PRD-QRY-007: Targeted SDV (tSDV) Sampling Algorithm ​

  • To reduce monitoring costs, the platform must support targeted SDV (tSDV) configurations defined in the MDR.
  • The system must support two sampling models:
    1. Subject-Based Sampling: e.g., 100% SDV for the first 3 subjects at a site, followed by a randomized 20% of subsequent subjects.
    2. Field-Based Sampling: e.g., 100% SDV on primary safety endpoints (Adverse Events, Serious Adverse Events, Key Laboratory variables), and 0% on exploratory questionnaires.
  • The selection of randomized subjects for tSDV must use a deterministic PRNG seeded with the trial's unique random seed combined with the subject_uuid, ensuring that the sampling status of a subject is stable and cannot be altered or gamed by site coordinators.

PRD-QRY-008: Asynchronous Cross-Domain eCRF Anomaly Detection and Candidate Query Staging ​

  • The execution platform must operate an asynchronous background evaluation engine and worker (CrossDomainAnomalyWorker) that evaluates submitted eCRF data across correlated clinical domains (Adverse Events AE, Concomitant Medications CM, Laboratory Diagnostics LB, Vital Signs VS, Disposition DS, and Exposure EX).
  • Core Cross-Domain Detection Rules:
    1. Adverse Events <-> Concomitant Medications (AE-CM): Detect moderate or severe Adverse Events lacking associated concomitant medications for treatment or mitigation; identify concomitant medications indicating adverse reactions without corresponding AE or Medical History records; detect inverted or inconsistent temporal spans.
    2. Adverse Events <-> Laboratory Diagnostics (AE-LB): Flag critical laboratory out-of-range observations or marked transaminitis/creatinine spikes without documented Adverse Events; detect clinical AEs with missing or non-confirmatory diagnostic laboratory test sequences.
    3. Adverse Events <-> Vital Signs (AE-VS): Identify critical vital sign extremes (hypertensive crisis SBP > 180 mmHg or DBP > 120 mmHg, tachycardia HR > 130 bpm, bradycardia HR < 40 bpm) without matching documented AEs.
    4. Disposition / Exposure <-> Adverse Events (DS/EX-AE): Detect study drug discontinuation, dose interruption, or dose reduction attributed to an "Adverse Event" where no matching AE record exists in the trial database.
    5. AI Gateway Semantic Discrepancy Reasoner: When AI_GATEWAY_URL is available, invoke apps/ai_gateway Tier 2 model with structured Pydantic schema (AnomalyDetectionResult) and 21 CFR Part 11 dual-attribution audit parameters (AIAssistedRecordMixin). If AI Gateway is unconfigured or unreachable, deterministic rules execute without disruption.
  • Candidate Query Lifecycle & Staging:
    • Inconsistencies detected by the anomaly engine must be staged as ClinicalQuery records with status = "CANDIDATE", query_type = "CROSS_DOMAIN_ANOMALY", and origin = "ANOMALY_DETECTOR" (or "AI_ASSISTED").
    • Staged candidate queries must not enter active site investigator queues until adjudicated by a human Data Manager (action = "APPROVE" -> OPEN, or action = "REJECT" -> CANCELLED with mandatory 21 CFR Part 11 justification).

7.4 Clinical Trial Management System (CTMS) and Operational Workspace ​

To coordinate and track site monitoring, CRA allocations, recruitment progression, and site operational milestones.

PRD-CTMS-001: Operational Site and Milestone Tracking ​

  • The system must track site operational milestones (e.g., SITE_SELECTION, INITIATION_VISIT, SITE_ACTIVATION, FIRST_SUBJECT_ENROLLED) with planned and actual completion dates.
  • Transitioning milestone status requires an explicit change reason to comply with 21 CFR Part 11 auditing.

PRD-CTMS-002: Monitoring Visit Reports (MVR) Correspondence Lifecycle ​

  • The system must manage a structured monitoring visit lifecycle (e.g., SCHEDULED, COMPLETED, SIGNED_OFF).
  • Scheduling a visit must automatically generate and persist a plain-text confirmation letter. Completing a visit must automatically record findings and action items, and generate a follow-up letter containing the severity and description of findings.
  • Retrieving generated letters must return the stored content directly without dynamically re-rendering to guarantee correspondence integrity.

PRD-CTMS-003: CRA Allocation and Workload Summaries ​

  • The system must manage allocations of Clinical Research Associates (CRAs) to studies and sites.
  • Active allocations must map directly to automated workload summaries. Only one active CRA can be assigned to a specific study and site combination at any time; assigning a new CRA must automatically deactivate the previous allocation.

PRD-CTMS-004: Standard GxP Site Audit trail ​

  • All CTMS view logs, milestone updates, visit creations, completions, sign-offs, and allocations must write append-only records to an immutable chronological CTMSAuditLog auditing schema.

PRD-CTMS-005: Site Regulatory Greenlight & Essential Document Gatekeeper ​

  • The system must manage country and site-level regulatory approval tracks and Essential Document Lists (EDL).
  • The automated Greenlight validation engine must verify all prerequisite approvals (Contract, IRB approval, FDA Form 1572/CTA, PI DOA sign-off, and IP readiness) before enabling site activation in EDC.

PRD-CTMS-006: Protocol Deviation Lifecycle & Quality CAPA Escalation ​

  • The system must capture, classify (Minor, Major, Critical), and manage protocol deviations with 5-Why root cause analysis (RCA).
  • Major and Critical deviations must support automated escalation to apps/quality (CAPA) and event notifications to apps/safety.

PRD-CTMS-007: Risk-Based Quality Management (RBQM) & KRI Engine ​

  • The system must dynamically compute Key Risk Indicators (KRIs) such as query velocity, SAE reporting lag, protocol deviation density, form entry lag, and SDV backlog.
  • The system must compute composite Site Risk Index scores and trigger adaptive monitoring alerts when Quality Tolerance Limits (QTLs) are breached.

PRD-CTMS-008: Procedure-Based Financials & EDC Auto-Payables ​

  • The system must support tiered investigator grant budgets with visit/procedure-based fee matrices, withholding/holdback retention rules, and passthrough expense invoices.
  • Completing EDC subject visit milestones must automatically generate pending payables and batch invoice disbursement workflows.

PRD-CTMS-009: Investigational Product (IP) Accountability & Temperature Excursions ​

  • The system must track site IP kit receipt, lot expiration, temperature excursions with quarantine disposition, subject kit dispensation reconciliation, and Certificates of Destruction.

PRD-CTMS-010: Automated DIA TMF Reference Model Synchronization ​

  • Finalized CTMS operational artifacts (Monitoring Visit Reports, DOA logs, Greenlight packages, Deviation summaries, Certificates of Destruction) must automatically bundle, sign, and push to apps/etmf mapped to DIA TMF Reference Model zones and sections.

7.5 Laboratory Reference Range & Master Catalog Management ​

To coordinate, track, and standardize laboratory reference range specifications, unit conversions, and master catalog mappings.

PRD-LAB-001: Laboratory Reference Models and Validation Runs ​

  • The system must standardize laboratory reference models and map them to their corresponding verification runs.

7.6 Clinical Quality Management System (eQMS) & Risk-Based Quality Management (RBQM) ​

To coordinate protocol deviation management, multi-methodology root cause analysis, 6-stage CAPA lifecycles with scheduled effectiveness verification, TransCelerate/ICH E6(R3) RBQM/KRI statistical scoring, study-level Quality Tolerance Limits (QTL), clinical audits, serious breach escalations, and inspection readiness.

PRD-QLT-001: Protocol Deviation Classification, Severity Grading, and Ingestion Hooks ​

  • The system must capture and classify protocol deviations across standard categories (INFORMED_CONSENT, ELIGIBILITY, PROTOCOL_PROCEDURES, IP_MANAGEMENT, SAFETY_REPORTING, LAB_SPECIMEN, VISIT_WINDOW, CONCOMITANT_MED, GCP_COMPLIANCE, OTHER) with severity grading (MINOR, MAJOR, CRITICAL, SYSTEMATIC_TREND).
  • The platform must expose an automated ingestion webhook/endpoint (/api/v1/quality/ingest/event) allowing EDC, CTMS, and eTMF microservices to post automated quality event triggers (e.g. out-of-window visits, temperature excursions, document rejections) with deduplication.

PRD-QLT-002: Multi-Methodology Root Cause Analysis (RCA) Engine ​

  • The system must provide multi-methodology RCA capabilities supporting both hierarchical 5-Whys causal trees and 6M Ishikawa/Fishbone diagrams (Man, Machine, Material, Method, Measurement, Milieu) with contributing factor tagging.
  • Major and Critical deviations must require completed RCA documentation before resolution or closure.

PRD-QLT-003: 6-Stage Gate CAPA Lifecycle with Scheduled Effectiveness Checks ​

  • The system must enforce a strict 6-stage gate lifecycle: INITIATED -> UNDER_REVIEW -> APPROVED -> IMPLEMENTATION -> IMPLEMENTATION_VERIFIED -> EFFECTIVENESS_CHECK -> CLOSED (or INEFFECTIVE / CANCELLED).
  • CAPAs must track discrete sub-action items (Corrective vs. Preventive) with individual assignees and due dates. Transition to IMPLEMENTATION_VERIFIED requires 100% action item completion.
  • Advancing past EFFECTIVENESS_CHECK requires evaluating quantifiable metrics at a scheduled post-closure interval (30/60/90 days). If deemed INEFFECTIVE, the system must auto-flag recurrence and prompt a follow-up Re-CAPA.

PRD-QLT-004: TransCelerate & ICH E6(R3) RBQM, KRI Statistical Anomaly Scoring, and Site Risk Index ​

  • The system must manage Critical to Quality (CtQ) factors and configurable Key Risk Indicators (KRIs) with dynamic Green/Amber/Red thresholds.
  • The RBQM engine must compute standardized Z-scores and population statistical distributions across sites, deriving a weighted composite Site Risk Index (SRI) and percentile ranking to drive targeted monitoring.

PRD-QLT-005: Study-Level Quality Tolerance Limits (QTLs) and CSR Summary Generation ​

  • The system must track study-level Quality Tolerance Limits (QTLs).
  • When a QTL threshold is breached, the system must record a QTLBreachEvent, trigger high-priority GxP notifications, require documented mitigation plans, and auto-generate the Clinical Study Report (CSR Section 9.6) compliance narrative.

PRD-QLT-006: Clinical Quality Audits, Finding Grading, and Direct CAPA Promotion ​

  • The system must manage Clinical Audits across multiple scopes (SITE_AUDIT, VENDOR_QUALIFICATION, PROCESS_AUDIT, TMF_AUDIT, FOR_CAUSE).
  • Audit findings must be graded (CRITICAL, MAJOR, MINOR, OBSERVATION) and support direct 1-click promotion of findings into formal CAPAs.

PRD-QLT-007: Serious Breach & Regulatory Notification Clock Management ​

  • The system must assess and track potential Serious Breaches under regulatory timelines (e.g. MHRA 7-day clock, EMA/FDA reporting).
  • The regulatory clock must calculate countdown deadlines from time of confirmation, issue escalation alerts at 48 hours remaining, and compile standardized regulatory notification dossiers.

PRD-QLT-008: 1-Click GxP Inspection Readiness Dossier Packaging ​

  • The system must compile an on-demand, cryptographically verified Inspection Readiness Dossier aggregating study deviation histories, RCA trees, CAPA effectiveness records, auditor logs, and immutable audit trail snapshots.

PRD-QLT-009: 21 CFR Part 11 Electronic Signatures & Step-Up Verification for Quality Actions ​

  • Approving CAPA plans, completing implementation verifications, closing effectiveness checks, and signing off clinical audit reports must require 21 CFR Part 11 step-up electronic signatures with cryptographic HMAC/JWT verification.

7.7 Unified Clinical Operations & Ticketing Hub ​

To coordinate cross-functional clinical trial issues, protocol deviations, site discrepancies, supply excursions, technical support requests, and GxP investigations with multi-tier SLA timers, Part 11 signatures, and cross-service context injection.

PRD-TCK-001: Unified Clinical Issue Management & Operations Taxonomy ​

  • The system must capture and classify operational issues across ICH GCP categories (PROTOCOL_DEVIATION, DATA_QUERY, SAFETY_ADVERSE_EVENT, SUPPLY_EXCURSION, SITE_OPERATIONS, MONITORING_FINDING, TECHNICAL_SYSTEM, ACCESS_CONTROL, REGULATORY_QUERY, SYSTEM_SUPPORT) with GxP severity grading (MINOR, MAJOR, CRITICAL).
  • Resolving Major or Critical issues must require documented Root Cause Analysis (5-Whys) and standardized resolution codes.

PRD-TCK-002: Multi-Tier Clinical SLA Engine & Pause States ​

  • The platform must calculate automated SLA targets based on category and severity (e.g. Critical Safety AE <= 4h, Critical Deviation <= 8h).
  • The SLA engine must support amber warning thresholds (>75% elapsed), multi-tier escalation, and pause states (WAITING_ON_SITE, WAITING_ON_SPONSOR, PENDING_REGULATORY_REVIEW) that freeze SLA countdown timers while awaiting external action.

PRD-TCK-003: Cross-Service REST Ingestion & Context Injection ​

  • The tickets service must expose internal gateway-authenticated REST endpoints (/api/v1/tickets/cross-app/events) enabling EDC, CTMS, Safety, Quality, and eTMF microservices to auto-generate tickets with typed entity linkage (SUBJECT, CRF_FORM, SAE_CASE, CAPA_ACTION, TMF_DOCUMENT, MVR_VISIT, SUPPLY_KIT) and structured JSON context payloads.

PRD-TCK-004: 21 CFR Part 11 Electronic Signatures & Audited Evidence Attachments ​

  • Ticket sign-offs on Critical/Major resolutions must support 21 CFR Part 11 compliant electronic signatures with user identity binding, re-authentication password/token verification, and immutable audit trail manifestation.
  • The platform must manage audited blob evidence attachments with SHA-256 integrity verification, DEID scrubbing flags, and dual-visibility comment streams (PUBLIC vs INTERNAL_SPONSOR).

PRD-TCK-005: Grounded Protocol Knowledge Hub & Support Ticket RAG Triage ​

  • The system must ingest study protocols and SOPs into a dense vector index in apps/knowledge preserving exact structural coordinates (protocol_version, section_number, section_title, and page_number).
  • RAG triage queries executed via apps/ai_gateway must employ Tier 2 prompt templates enforcing verbatim citation markers in the canonical format [Protocol {version}, Section {section}, Page {page}] (e.g., [Protocol v2.1, Section 7.3, Page 42]).
  • The system must compute a mathematical faithfulness score for all generated answers; if the confidence score is below 85% ($< 0.85$) or references unapproved protocol versions, the system must fail closed, suppress auto-draft generation, and immediately route the ticket to the human Data Manager queue with a 21 CFR Part 11 audit log entry.
  • The platform web client must render interactive citation badges opening a document viewer drawer positioned at the exact referenced protocol page.

7.8 Knowledge & Support Hub ​

To provide a centralized, GxP-compliant, role-aware knowledge base, standard operating procedures (SOPs) repository, and contextual in-app guidance across the clinical platform.

PRD-KNB-001: Knowledge Article Lifecycle, Working Draft Storage & Two-Tier Immutability ​

  • The system must provide a hierarchical category taxonomy with self-referential parent/child relations and persona-level visibility scoping.
  • The system must allow authors to draft knowledge articles in Markdown with JSON array keyword tags, version labels, auto-rendered HTML caching, and working draft snapshots updating in place during DRAFT status.
  • The system must enforce a two-tier data model with KnowledgeArticle managing lifecycle states (DRAFT, IN_REVIEW, APPROVED, PUBLISHED, SUPERSEDED, ARCHIVED, REJECTED) and KnowledgeArticleVersion storing frozen, immutable content snapshots.
  • Four-eyes approval controls must be enforced such that the user who authored or edited a version cannot approve or publish it.
  • Publishing a new version must automatically supersede any previously active version without physical deletion of historical content.
  • GxP audit ledger records (CREATED, DRAFT_SAVED, SUBMITTED_FOR_REVIEW, APPROVED, REJECTED, PUBLISHED, SUPERSEDED, ARCHIVED) must be emitted capturing user identity, timestamps, reason for change, and details.

PRD-KNB-002: Multi-Channel Notifications and Contextual Guidance ​

  • The system must support multi-channel notifications (In-App, Email, and Webhook) for knowledge publication and ticketing events.
  • Safety-critical notifications (CRITICAL tickets and SLA escalations) must bypass user opt-out preferences under regulatory compliance mandates.
  • In-page contextual help mappings must dynamically resolve relevant SOPs by route pattern and user persona.

8. Automated Site Financials, Investigator Grants & Payments Subsystem ​

To coordinate, track, and automate complex clinical trial site budgets, procedure-based fee matrices, split-payee disbursements, withholding reserves, and invoice generation triggered directly by EDC data capture and CRA monitoring verifications.

PRD-PAY-001: Procedure-Based Fee Matrix & Investigator Grant Contract Engine ​

  • The system must support multi-tier investigator grant contract templates associated with specific sites and institutions.
  • The grant engine must model procedure-level fee matrices (linking specific visit activities and eCRF forms to agreed reimbursement rates), fixed startup/closeout fees, IRB submission fees, patient stipends, travel reimbursements, and institutional overhead rates (percentage-based additions).
  • Contract modifications during active studies must version the budget schedule (version_index), preserving historical fee schedules for visits completed prior to amendment execution.

PRD-PAY-002: Real-Time EDC & Monitoring Trigger-to-Payable Automation ​

  • The system must operate a reactive financial evaluation listener that automatically generates pending payable line items based on configurable triggers:
    1. EDC Form Submission: Generation of visit/procedure payables upon successful completion of required eCRFs.
    2. CRA Verification Gate: Gating payables until a Clinical Research Associate (CRA) marks the visit or form as Source Data Verified (SDV).
    3. Milestone Completion: Auto-triggering site startup or enrollment milestone payments upon CTMS milestone verification.
  • Payables generated must reference the exact subject ID, visit code, form ID, contract rate, and executing trigger.

PRD-PAY-003: Multi-Party Split Payee & Withholding Holdback Governance ​

  • The system must support splitting a single earned payable across multiple recipient payees (e.g. 70% to Hospital Research Foundation, 20% to Principal Investigator Practice, 10% to Central Pharmacy).
  • The engine must enforce configurable holdback/withholding retention rules (e.g. retain 10% of all visit fees until final study closeout, database lock, and resolution of all outstanding data queries).
  • Releasing withheld funds must require formal Data Management and Quality sign-off confirming site query resolution.

PRD-PAY-004: Automated Self-Billing Invoicing & Remittance Advice Dispatch ​

  • The system must execute automated monthly or quarterly billing cycles, compiling approved payable line items into standardized self-billing invoices and remittance advice statements.
  • Remittance advice documents must be generated in PDF format, cryptographically hashed with SHA-256, and dispatched to site financial contacts via automated email notifications.
  • The system must expose REST APIs for bidirectional ERP synchronization (e.g. SAP, NetSuite, Oracle Financials) to update payment execution statuses (PENDING, APPROVED, PAID, RECONCILED).

PRD-PAY-005: Multi-Currency Conversion & Budget Adjustment Amendments ​

  • The payment engine must support multi-currency site budgets with automated conversion to sponsor base currency based on versioned exchange rate tables.
  • The system must support manual and automated adjustments (passthrough expense reimbursements, penalty deductions for out-of-window visits or protocol deviations) requiring mandatory 21 CFR Part 11 change justification.

PRD-PAY-006: 21 CFR Part 11 Financial Disbursement Audit Ledger ​

Evidence: PostgreSQL (the ledger is append-only in the database, so only a PostgreSQL test can prove it).

  • Every budget configuration edit, payable generation, holdback calculation, invoice approval, and payment confirmation must record an append-only, immutable transaction record to PaymentAuditLog capturing user context, timestamps, before/after states, and electronic signature manifestations.

PRD-SYS-161: Site Payments Budget Contracts, Fee Schedule Rate Matrices & Trigger-to-Payable Engine ​

  • The system must provide end-to-end management of investigator grant budget contracts, multi-tier fee schedule procedure rates, institutional overhead additions, and event-driven triggers (eCRF submission, CRA SDV verification gating, and milestone completions).

PRD-SYS-162: Site Payments Multi-Party Split Payee Allocations & Holdback Retention Governance ​

  • The system must support configurable percentage-based disbursements across multi-party split payees (summing to 100%) and enforce 10% holdback retention escrow released only upon dual Data Management and Quality sign-off.

PRD-SYS-163: Site Payments Self-Billing Invoicing, Cryptographic Remittance Advice & ERP Settlement Reconciliation ​

  • The system must automate monthly and quarterly self-billing invoice compilation, generate cryptographically signed SHA-256 PDF remittance advice statements with 21 CFR Part 11 manifests, and execute bidirectional enterprise ERP synchronization and settlement reconciliation.

9. Medical Imaging & Blinded Central Endpoint Adjudication Subsystem ​

To provide zero-footprint web-based medical imaging management, in-flight DICOM de-identification, standardized oncologic and volumetric measurement tools, and dual-blinded independent review charter (IRC) adjudication workflows.

PRD-IMG-001: Zero-Footprint High-Performance Web DICOM & Multi-Planar Viewer ​

  • The system must provide a browser-native, zero-footprint DICOM viewer supporting multi-modality medical images (CT, MRI, PET, Digital X-Ray, Ultrasound).
  • The viewer must support real-time multi-planar reconstruction (MPR: Axial, Sagittal, Coronal), maximum intensity projection (MIP), window/level adjustments (Hounsfield units presets), zoom/pan, and cine playback for multi-frame cardiac and angiography sequences.

PRD-IMG-002: In-Flight Pixel & Header De-Identification and PHI Scrubbing ​

  • During image upload at clinical sites, the system must execute dual-layer de-identification:
    1. Header Metadata Scrubbing: Automatically remove or pseudonymize all HIPAA Safe Harbor / 21 CFR Part 11 DICOM tags (Patient Name, Patient ID, Birth Date, Institution, Physician Name), replacing them with trial Subject UUID and Site Code.
    2. Pixel-Level PHI Masking: Detect and black-out burned-in text annotations in ultrasound, endoscopy, and secondary capture images before persistent storage.
  • An immutable SHA-256 de-identification certificate must be generated and stored with the imaging series envelope.

PRD-IMG-003: Independent Review Charter (IRC) & Blinded Dual-Reader Workflow ​

  • The system must support blinded endpoint adjudication charters where imaging timepoints are independently routed to two certified central radiologists/readers.
  • The review workspace must completely blind readers to subject treatment arm, clinical adverse events, site identity, and the other reader's evaluations.
  • Reader evaluations must capture lesion selection, target/non-target designations, and standardized qualitative assessments.

PRD-IMG-004: Automated RECIST 1.1, Cheson, Lugano & RANO Measurement Derivations ​

  • The imaging canvas must provide specialized caliper and volumetric tools that calculate standard response criteria:
    1. RECIST 1.1 (Solid Tumors): Sum of longest diameters (SLD), percentage change from baseline, nadir tracking, and automated response categorization (Complete Response CR, Partial Response PR, Stable Disease SD, Progressive Disease PD).
    2. Lugano / Cheson (Lymphoma): Bidimensional product of perpendicular diameters (PPD) and PET Deauville 5-point scale scoring.
    3. RANO (High-Grade Glioma): T1-gadolinium enhancing and T2/FLAIR non-enhancing tumor measurement evaluation.

PRD-IMG-005: Adjudication Tie-Breaker Committee Escalation & Electronic Sign-off ​

  • If Reader 1 and Reader 2 evaluations produce discordant overall response assessments (e.g. Reader 1 = PR, Reader 2 = PD), the system must automatically escalate the case to an Adjudication Committee Chair / Tie-Breaker Reader.
  • The tie-breaker reader must be provided a consolidated comparison workspace and record final binding determination.
  • All adjudication sign-offs must require 21 CFR Part 11 compliant step-up electronic signatures.

PRD-IMG-006: Direct EDC eCRF Measurement Binding & SDTM TU/TR/RS Auto-Population ​

  • Approved central imaging adjudication results must bind directly to corresponding EDC eCRF forms (e.g. Tumor Assessment Form) without manual re-keying.
  • The transformation pipeline must automatically format imaging measurements into CDISC SDTM domains: Tumor Identification (TU), Tumor Results (TR), and Disease Response (RS).

10. Enterprise Pharmacovigilance (PV), Global Reporting Rules & AS2 Regulatory Gateway ​

To provide comprehensive global adverse event safety management, multi-country expedited reporting rule evaluation, electronic B2B AS2 transmission of ICH E2B(R3) ICSR XML packages, statistical signal detection, and aggregate safety reports.

PRD-PVG-001: Deterministic Multi-Country Expedited Regulatory Reporting Rules Engine ​

  • The safety engine (apps/safety) must evaluate Individual Case Safety Reports (ICSRs) against deterministic regulatory reporting rules across global health authorities:
    1. US FDA (IND / NDA): Fatal/Life-threatening unexpected SUSARs within 7 calendar days; all other serious unexpected suspected adverse reactions within 15 calendar days.
    2. EMA (EudraVigilance / Clinical Trials Regulation EU No 536/2014): 7-day fatal/life-threatening SUSARs; 15-day non-fatal SUSARs with direct transmission to EudraVigilance gateway.
    3. PMDA Japan, MHRA UK, Health Canada: Country-specific expedited reporting clocks and seriousness criteria.
  • The system must maintain real-time countdown clocks from the initial receipt date (Day 0) and issue escalation alerts at 75% and 90% clock elapsed thresholds.

PRD-PVG-002: Secure Applicability Statement 2 (AS2) B2B Gateway & MDN Verification ​

  • The platform must include an enterprise AS2 B2B communication client providing encrypted, digitally signed EDI transmission of ICH E2B(R3) XML messages directly to regulatory health authority gateways (FDA ESG, EMA EudraVigilance Gateway).
  • The AS2 gateway must enforce S/MIME encryption (AES-256), SHA-256 digital signatures, and automated parsing and verification of synchronous/asynchronous Message Disposition Notifications (MDN) and regulatory ACK packages (ACK A: Transmission receipt, ACK B: Syntactic validation, ACK C: Authority acceptance).

PRD-PVG-003: Disproportionality Signal Detection Engine (PRR, ROR, EBGM / MGPS) ​

  • The safety subsystem must execute automated statistical signal detection algorithms across internal clinical trial databases and external safety benchmarks:
    1. Proportional Reporting Ratio (PRR): Calculate PRR, Chi-square with Yates' correction, and 95% confidence intervals for all Preferred Term (PT) and System Organ Class (SOC) pairs.
    2. Reporting Odds Ratio (ROR): Calculate ROR point estimates and lower/upper bounds.
    3. Empirical Bayes Geometric Mean (EBGM): Compute Multi-item Gamma Poisson Shrinker (MGPS) scores to detect emergent safety signals in sparse data.
  • Statistical threshold breaches (e.g. PRR >= 2.0, Chi-square >= 4.0, N >= 3) must trigger automated Signal Review alerts.

PRD-PVG-004: Automated Periodic Aggregate Safety Reporting (DSUR, PSUR, PBRER) ​

  • The system must aggregate clinical trial safety observations and automatically draft standardized periodic regulatory reports:
    1. Development Safety Update Report (DSUR - ICH E2F): Cumulative subject exposure, line listings of all SAEs, interval summary tabulations, and risk-benefit assessments.
    2. Periodic Safety Update Report (PSUR) / PBRER (ICH E2C(R2)): Post-market worldwide safety experience, sales volume exposure, and action taken for safety reasons.

PRD-PVG-005: MedDRA / WHODrug Automated Auto-Coding & Upversioning Impact Analysis ​

  • The coding gateway (apps/interop / apps/ai_gateway) must execute hybrid lexical and dense-vector embedding matching against authoritative MedDRA (LLT, PT, HLT, HLGT, SOC) and WHODrug Global dictionaries.
  • When new dictionary releases are imported (quarterly/bi-annual), the system must execute an automated Upversioning Impact Analysis, identifying recoded terms, split codes, and obsolete concepts without silently mutating historical locked trial data.

PRD-PVG-006: Literature Safety Surveillance & Regulatory Inquiry Tracking ​

  • The system must support automated weekly PubMed/Europe PMC literature queries for active investigational substances, scoring abstracts for ICSR reportability and safety signals.
  • The system must track regulatory authority inquiries, providing structured workflows for responding to safety questions within statutory deadlines.

PRD-PVG-007: Blinded Safety Review & Unblinded Safety Officer Air-Gap ​

  • The safety module must enforce strict blinding firewalls: standard clinical study teams and CRAs view only blinded safety data, while designated Unblinded Safety Officers (USOs) and Independent Data Monitoring Committees (IDMC) operate within an isolated unblinded review workspace.

PRD-PVG-008: 21 CFR Part 11 Physician Electronic Signatures on ICSR Packages ​

  • Finalizing medical causality assessments, approving expedited safety reporting packages, and transmitting E2B(R3) XML must require multi-factor re-authentication electronic signatures by a qualified Safety Physician or Medical Monitor.

PRD-SYS-167: Multi-Country Expedited ICSR Regulatory Reporting Clocks & Rules Engine ​

  • The safety subsystem must evaluate Individual Case Safety Reports (ICSRs) against multi-country regulatory reporting rules (FDA 7/15-day fatal/serious SUSARs, EMA EudraVigilance, PMDA Japan, MHRA, Health Canada), maintain dynamic countdown clocks from Day 0, and trigger automated threshold alerts at 75% and 90% clock elapsed time.

PRD-SYS-168: AS2 S/MIME B2B XML Gateway Transmission & Signed MDN Receipt Validation ​

  • The safety subsystem must provide secure AS2 S/MIME encrypted B2B transmission of ICH E2B(R3) XML safety packages to health authority gateways, validate Message Integrity Checks (MIC), parse and verify synchronous/asynchronous signed Message Disposition Notifications (MDN), and process regulatory acknowledgments (ACK A/B/C).

PRD-SYS-169: Vectorized Disproportionality Signal Detection Engine & Aggregate Safety Reporting (DSUR/PSUR) ​

  • The safety subsystem must execute vectorized disproportionality signal detection calculations (PRR with Chi-square Yates correction, ROR, EBGM with 95% confidence intervals) across adverse event terms, evaluate safety threshold breaches, and compile standardized aggregate safety reports including Development Safety Update Reports (DSUR) with subject exposure stratifications and interval line listings.

11. Advanced Supply Chain, Temperature Excursions & Cell/Gene Therapy RTSM ​

To provide multi-echelon investigational product (IP) inventory tracking, automated predictive resupply, cold chain temperature excursion analytics, Bayesian dose-escalation adaptive algorithms, and vein-to-vein Chain of Custody / Identity (COC/COI).

PRD-SCM-001: Multi-Echelon Depot Supply Chain Tracking & Predictive Resupply ​

  • The RTSM engine (apps/execution) must model a multi-echelon clinical supply hierarchy: Primary Manufacturer -> Central Depot -> Regional Depots -> Clinical Sites -> Subjects.
  • The system must run predictive resupply algorithms that continuously forecast site kit demand based on active enrollment velocity, screening pipeline, subject visit schedule, site storage capacity, and shipping transit lead times.
  • Automated resupply orders must trigger transfer orders and packing manifests with depot notification webhooks.

PRD-SCM-002: Continuous Data Logger Ingestion & Mean Kinetic Temperature (MKT) Engine ​

  • The system must support direct ingestion of digital temperature data logger files (CSV, XML, JSON, PDF) from shipment containers and site storage units.
  • The cold chain engine must calculate Mean Kinetic Temperature (MKT) across the logged time series: $$ \Delta H / R = 10000 ext{ K}, \quad T_{K} = rac{\Delta H / R}{-\ln \left( rac{1}{n} \sum_{i=1}^n e^{- rac{\Delta H / R}{T_i}} $$

ight)}$$

  • If temperatures breach stability budget limits (e.g. cumulative hours above 8°C), the system must automatically transition affected drug kits to QUARANTINED, block dispensing in EDC, and notify the Supply Chain Manager.

PRD-SCM-003: Automated Lot Expiration Management, Extension & Re-Labeling ​

  • The system must track expiration dates and shelf-life stability per investigational product lot/batch.
  • When stability testing extends lot expiry, the system must execute automated Lot Expiry Extension workflows, updating all non-dispensed kits across all depots and sites while generating required re-labeling action tasks.

PRD-SCM-004: Dose-Escalation Bayesian BOIN / CRM Adaptive Trial Algorithms ​

  • The RTSM engine must support advanced adaptive oncology trial designs:
    1. 3+3 Standard Rule: Automated cohort completion evaluation and escalation/expansion logic.
    2. Bayesian Optimal Interval (BOIN) Design: Real-time calculation of Dose-Limiting Toxicity (DLT) rates against target toxicity boundaries ($\lambda_e, \lambda_d$), generating automated recommendation flags (Escalate, Stay, De-escalate).
    3. Continual Reassessment Method (CRM): Adaptive model-based dose-toxicity curve updating upon each evaluated cohort.

PRD-SCM-005: Cell & Gene Therapy Vein-to-Vein Chain of Custody / Identity (COC/COI) ​

  • For advanced cell and gene therapy (CGT) trials, the system must enforce unbroken Vein-to-Vein Chain of Custody and Chain of Identity:
    1. Apheresis Collection: Generation of tamper-evident cryptographic barcodes binding subject identity to initial cellular material.
    2. Cryogenic Transit: Real-time GPS and temperature tracking from site to manufacturing facility.
    3. Manufacturing Batch Binding: Validation of cell engineering batch records against original subject identity tokens.
    4. Pre-Infusion Dual Verification: Mandatory two-person electronic verification at the bedside (scanning subject wristband and drug bag barcode) before enabling infusion form completion.

PRD-SCM-006: Investigational Product Returns, Accountability & Reconciliation Destruction ​

  • The system must track drug accountability across the full lifecycle: received, stored, dispensed, returned by patient, lost, damaged, and destroyed.
  • Returned kits must be logged with pill/vial counts, calculating patient adherence percentages.
  • Final drug reconciliation must generate formal Certificates of Destruction with dual witness electronic signatures.

PRD-SCM-007: Real-Time Blinding Verification & Drug Dispensation Gating ​

  • The dispensing engine must enforce strict execution gates: dispensing is blocked if the subject is not randomized, if the visit is out of window, if required re-consent is missing, or if the kit is expired/quarantined.
  • The UI must maintain complete double-blind protection, presenting identical generic packaging labels to site coordinators while allocating specific blinded kit numbers from the inventory.

12. Centralized Statistical Monitoring (CSM), Data Fabrication & Fraud Detection ​

To provide automated statistical surveillance across clinical sites under ICH E6(R2)/(R3), detecting anomalous data patterns, digit preferences, variance shrinkage, multivariate correlations, data fabrication, and TransCelerate RACT risk factors.

PRD-CSM-001: Cross-Site Digit Preference (Benford's Law) & Rounding Bias Analysis ​

  • The Quality Sentinels (apps/quality) must execute automated statistical tests on continuous clinical variables (Blood Pressure, Heart Rate, Laboratory Values, Tumor Measurements) across all trial sites:
    1. Benford's Law Analysis: Chi-square goodness-of-fit testing of leading and trailing digits against expected theoretical distributions.
    2. Terminal Digit Rounding Bias: Detection of excessive rounding (e.g. over-representation of 0 and 5 terminal digits) indicating estimated rather than measured clinical data.

PRD-CSM-002: Multi-Variate Correlation Matrix & Variance Shrinkage Anomaly Detection ​

  • The CSM engine must compute multi-variate correlation matrices across related clinical variables for each site against the overall trial population distribution (Mahalanobis Distance and Kullback-Leibler Divergence).
  • Sites exhibiting anomalous variance shrinkage (unusually low standard deviation / "too perfect" data) or distorted inter-variable correlations must be flagged as statistical outliers with a calculated P-value ($P < 0.001$).

PRD-CSM-003: Calendar & Timestamp Pattern Clustering (Weekend/Holiday Entry Inconsistencies) ​

  • The surveillance engine must analyze data entry timestamps and visit scheduling intervals:
    1. Detect clusters of clinical assessments entered on weekends, holidays, or midnight hours inconsistent with clinic operating hours.
    2. Identify identical elapsed times between consecutive visit procedures across multiple subjects at a single site.

PRD-CSM-004: Duplicate Patient Record & Anatomical Fabrication Detection ​

  • The CSM engine must perform cross-site identity similarity matching:
    1. Record Duplication Sentinels: Detect identical baseline medical history, ECG interval vectors, or laboratory values across subjects within or across sites, identifying potential duplicate enrollment or fabricated records.
    2. Image Hash Matching: Detect identical photographic or radiological images uploaded across different subject visits using perceptual image hashing (pHash).

PRD-CSM-005: Integrated TransCelerate RACT Matrix & Automated KRI Linkage ​

  • The platform must provide an interactive Risk Assessment and Categorization Tool (RACT) conforming to TransCelerate guidelines.
  • Protocol risks defined during study startup (e.g. Complex Dosing, Rare Biomarkers, Vulnerable Populations) must map directly to automated Key Risk Indicators (KRIs) with dynamic Green/Amber/Red thresholds and automated monitoring triggers.

PRD-CSM-006: Automated Centralized Monitoring Anomaly Dossier & Inspection Snapshot ​

  • The system must compile an on-demand Centralized Monitoring Dossier summarizing site statistical distributions, KRI trends, anomaly flags, and CRA verification notes, cryptographically sealed for regulatory inspection.

PRD-SYS-174: Centralized Statistical Monitoring & Forensic Fraud Detection Engine ​

  • The system must provide sample-gated Benford's Law analysis (first and second digit distributions, chi-squared goodness-of-fit, Nigrini conformity tiers) and cross-site variance shrinkage and repeated values analysis detecting fabricated or manipulated clinical data under ICH E6(R2)/(R3).

PRD-SYS-175: Forensic Data Integrity Sentinels & Perceptual Image Hashing Tracer ​

  • The engine must execute multi-vector data integrity surveillance: cross-site patient vector cloning detection, temporal/behavioral timestamp clustering (off-hours/rapid burst/identical intervals), and perceptual image hashing (pHash/dHash) with transformation invariance (rotation, brightness) for duplicate medical image and document detection.

PRD-SYS-176: TransCelerate RACT Dynamic Risk Scoring & Automated KRI Surveillance ​

  • The platform must implement dynamic TransCelerate RACT protocol risk scoring across all 6 risk categories, automated Key Risk Indicator (KRI) breach thresholds, weighted Site Risk Index (SRI) percentile ranking, and 1-click inspection-ready dossier compilation with cryptographic audit trails.
  • The eConsent subsystem (apps/econsent) must provide a multilingual dynamic Informed Consent Form (ICF) authoring and composition engine supporting modular reusable clauses, ISO 639-1 localized translation workflows, adaptive comprehension check quizzes with configurable passing score thresholds, and tiered optional consent modules (e.g. pharmacogenomics, future biomedical data sharing, re-contact permissions) with 21 CFR Part 11 compliant electronic signatures and CDISC ODM XML export.
  • The system must track minor subject birth dates against jurisdiction-specific legal age rules (e.g. 18 / 19 / 21 years), detect impending and reached age-of-majority milestones, and automatically generate and dispatch mandatory adult re-consent workflows transitioning subjects from pediatric assent and Legally Authorized Representative (LAR) parental representation to direct legal adult participant self-consent with 21 CFR Part 11 electronic signatures and immutable audit trails.
  • Upon protocol amendment or substantive ICF revisions, the system must automatically generate differential clause-level redlines (insertions, deletions, modifications), broadcast re-consent requirements to all active cohort participants, dispatch multi-channel notifications, and enforce programmatic execution gating on subsequent clinical visits until re-consent completion or verified paper override.

13. Clinical Data Repository (CDR) & Validated Statistical Computing Environment (SCE) ​

To provide a centralized clinical data lakehouse aggregating multi-source streams, automated continuous transformation into CDISC SDTM and ADaM models, and a 21 CFR Part 11 compliant containerized statistical computing environment for biostatisticians.

PRD-CDR-001: Multi-Stream Clinical Lakehouse & Version-Pinned Data Pooling ​

  • The Clinical Data Repository (apps/interop / apps/designer) must aggregate and harmonize data across heterogeneous trial streams:
    1. Transactional EDC eCRFs
    2. Subject-Facing ePRO / eCOA Questionnaires
    3. Central Laboratory & Local Laboratory Diagnostic Feeds (HL7 / CSV)
    4. Connected Sensors & Wearable IoT streams
    5. EHR HL7 FHIR bundles
    6. Blinded Medical Imaging Adjudication Results
  • The repository must maintain version-pinned data snapshots tied to specific database lock or interim analysis milestones.

PRD-CDR-002: Automated CDISC SDTM & ADaM Data Pipeline Engine ​

  • The system must operate automated transformation pipelines that map raw clinical observations into standard CDISC Study Data Tabulation Model (SDTM v1.7 / v2.0) domains (e.g. DM, AE, CM, VS, LB, EX, DS, TU, TR, RS).
  • The pipeline must execute automated derivation rules generating Analysis Data Model (ADaM v1.3 / v2.1) datasets (e.g. Subject-Level Analysis Dataset ADSL, Adverse Events Analysis Dataset ADAE, Time-to-Event Analysis Dataset ADTTE, Basic Data Structure BDS).

PRD-CDR-003: CDISC Dataset-JSON 1.1 / 2.0 & Define-XML 2.1 Compiler ​

  • The CDR pipeline must serialize all SDTM and ADaM datasets into official CDISC Dataset-JSON 1.1 / 2.0 formats with strict structural and referential schema validation.
  • The system must automatically compile and export standard CDISC Define-XML v2.1 metadata documents encapsulating dataset structures, variable codelists, value-level metadata, computational methods, and origin provenance.

PRD-CDR-004: Validated Containerized Statistical Computing Environment (R & Python) ​

  • The platform must provide an isolated, 21 CFR Part 11 compliant analytical environment allowing qualified biostatisticians to author and execute R and Python analysis programs against versioned clinical data snapshots.
  • Statistical sessions must execute within isolated Docker/Linux containers with strictly bounded network and filesystem privileges.

PRD-CDR-005: Package Lock Integrity, Script Versioning & Reproducible Run Manifests ​

  • Analytical runs in the SCE must enforce immutable package lockfiles (e.g. renv for R, uv.lock for Python), guaranteeing 100% reproducible statistical outputs across historical regulatory audits.
  • Every statistical execution must generate a cryptographically signed execution manifest capturing script hash, input dataset snapshot hash, runtime environment container image digest, output table/figure hashes, and executing statistician identity.

PRD-CDR-006: Biostatistical Export Audit Trail & Blinded Interim Analysis Gating ​

  • Statistical data access and exports must be gated by study blinding roles: unblinded treatment arm variables must be masked from standard study statisticians until formal database lock or approved interim unblinding by the IDMC.
  • All export requests must write immutable audit records to BiostatExportAuditLog.

14. Connected Study Training, Protocol Curricula & Site Qualification ​

To provide integrated training management, automated curriculum mapping from protocol amendments and SOPs, and programmatic write-gating on EDC clinical data capture.

PRD-TRN-001: Protocol Amendment & SOP Curriculum Mapping ​

  • The training subsystem (apps/knowledge / apps/ctms) must automatically map protocol amendments, study manuals, and SOP revisions into required training curricula assigned to study roles (Principal Investigator, Study Coordinator, CRA, Pharmacist).
  • Changes to protocol versions must automatically generate delta-training requirements targeting only modified clinical procedures and visit schedules.

PRD-TRN-002: Automated EDC Write-Permission Gating Based on Training Compliance ​

  • The system must enforce programmatic qualification gates: if a site investigator or coordinator has outstanding, incomplete mandatory protocol training for an active protocol version, the Gateway and EDC engine must block eCRF edit and signature permissions, rendering forms in read-only mode with an inline training alert.
  • Completing training must instantly unlock EDC write permissions in real-time without administrative intervention.

PRD-TRN-003: Interactive Training Modules, Comprehension Quizzes & Electronic Signatures ​

  • Training modules must support interactive video, document viewing with time-on-page tracking, and automated comprehension quizzes with configurable passing scores (e.g. >= 80%).
  • Training completion must require a 21 CFR Part 11 electronic signature confirming understanding of protocol requirements.

PRD-TRN-004: Automated TMF Zone 5 Training Certificate Routing ​

  • Upon successful training completion and digital sign-off, the system must automatically generate a training certificate PDF, apply a cryptographic SHA-256 seal, and push the document directly to apps/etmf under DIA TMF Reference Model Zone 5 (Site Management - Artifact 05.02.04 Site Staff Training Records) and site eISF binders.

15. Decentralized Clinical Trials (DCT), Connected Sensors & Telehealth ​

To support hybrid and decentralized clinical trials via universal BYOD / PWA patient portals, continuous biometric sensor stream ingestion, direct-to-patient drug supply logistics, and GxP-compliant telehealth consultations.

PRD-DCT-001: Universal BYOD / PWA Offline-First Patient Diary Architecture ​

  • The subject portal (apps/subject-portal) must operate as a responsive Progressive Web Application (PWA) supporting any modern smartphone, tablet, or desktop browser without requiring native app store installation.
  • Patient diaries, symptom scales, and questionnaires must support offline data entry using encrypted client-side IndexedDB storage with automatic background synchronization upon network reconnection.

PRD-DCT-002: Continuous Biometric IoT Sensor Stream Ingestion (CGM, Actigraphy, Spirometry) ​

  • The interoperability gateway (apps/interop) must ingest continuous time-series data streams from approved medical IoT devices (Continuous Glucose Monitors CGM, actigraphy sleep/activity trackers, digital spirometers, pulse oximeters, Bluetooth blood pressure cuffs).
  • Device telemetry must be normalized into Open mHealth and HL7 FHIR Observation schemas, calculating summarized daily endpoints and flagging safety outlier excursions.

PRD-DCT-003: Direct-to-Patient (DTP) Investigational Product Dispatch Tracking ​

  • The RTSM system must coordinate Direct-to-Patient (DTP) drug shipments: generating courier dispatch orders from central depots directly to subject residential addresses with temperature-controlled packaging and delivery signature confirmation.

PRD-DCT-004: Decentralized In-Home Healthcare Nurse Visit Coordination ​

  • The CTMS system must manage mobile healthcare provider / in-home nurse visit scheduling, assigning protocol procedures (blood draws, vital signs, IP administration) to authorized visiting clinicians with mobile eCRF data entry.

PRD-DCT-005: GxP-Compliant Telehealth Video Consultation & Encrypted Recording ​

  • The platform must provide integrated, end-to-end encrypted WebRTC telehealth video visits between investigators and study subjects.
  • Telehealth sessions must support synchronized co-viewing of eConsent documents, identity verification, and optional GxP-compliant session recording stored with 21 CFR Part 11 audit trails in apps/fileshare.
  • The eConsent subsystem (apps/econsent) must support multi-tier consent workflows: age-appropriate multimedia pediatric assent (e.g. animated comprehension videos for ages 7-11, simplified text for ages 12-17) paired with simultaneous parent/guardian Legally Authorized Representative (LAR) electronic signatures.

PRD-SYS-180: GxP-Compliant WebRTC Telehealth Video Consultations & Encrypted Recording Archival ​

  • The platform (apps/interop) must orchestrate end-to-end encrypted WebRTC telehealth consultations between clinical investigators and study subjects.
  • Enforce short-lived HMAC-SHA256 room authorization tokens with role-based capability gating (can_present, can_annotate, can_sign, can_record, can_admit) and DTLS-SRTP fingerprint validation.
  • Telehealth sessions must support synchronized interactive co-viewing of informed consent materials with presenter control locking.
  • Archiving sessions must apply a 21 CFR Part 11 SHA-256 recording digital seal with attributable certification statements and immutable audit trails.

PRD-SYS-181: Direct-to-Patient (DTP) Clinical Supply Tracer & Cold-Chain IoT Ingestion ​

  • The logistics tracer (apps/interop) must coordinate Direct-to-Patient (DTP) investigational product shipments across multi-zone temperature envelopes (cryogenic, ultra-cold, frozen, refrigerated, controlled ambient).
  • Real-time continuous IoT data logger ingestion must calculate Arrhenius Mean Kinetic Temperature (MKT) per USP <1079> / PDA TR 39 and evaluate temperature excursion severity.
  • Automated quarantine workflows must place shipments in TEMP_EXCURSION_HOLD upon critical excursion violations.
  • Shipments must enforce immutable Chain of Custody (CoC) handoff verification and recipient electronic signature delivery confirmation.

16. Study Startup (SSU) & Automated Greenlight Site Activation Engine ​

To provide comprehensive country-aware study startup workflows, ethics/IRB submission tracking, clinical trial agreement (CTA) redlining, and an un-bypassable cryptographic site activation gate preventing non-compliant trial execution.

PRD-SSU-001: Dynamic Country-Specific Prerequisite Rules Matrix ​

  • The system (apps/designer and apps/ctms) must allow study authors to author and maintain country-level and study-wide prerequisite rule matrices governing site activation (e.g. FDA 1572 + IRB in the US; EU CTR Part I/II + EC in the EU; PMDA notification in Japan).
  • Rules matrices must support custom prerequisite types (regulatory approvals, site contract execution, eISF baseline certification, personnel qualification, training verification, depot drug availability).

PRD-SSU-002: Multi-Factor Greenlight Site Activation Evaluator ​

  • The Greenlight engine (apps/ctms) must dynamically evaluate real-time site activation readiness across 6 key operational facets:
    1. Regulatory authority and IRB/Ethics Committee approval certificates.
    2. Executed Clinical Trial Agreement (CTA) and investigator budget schedules.
    3. Certified baseline eISF essential regulatory documents.
    4. Principal Investigator executed Delegation of Authority (DOA) log.
    5. Verified protocol amendment and GCP training completions for all active site personnel.
    6. Investigational Product (IP) depot greenlight release authorization.
  • GxP override exceptions must require executive sponsor dual-signature electronic authorization with mandatory Part 11 justification logging.

PRD-SSU-003: Programmatic RTSM & EDC Execution Gating ​

Evidence: PostgreSQL (refusals write an immutable audit entry, so only a PostgreSQL test can prove it).

  • Once all prerequisites are digitally verified, the system must issue an HMAC-signed cryptographic Site Activation Token and broadcast a SiteGreenlightApproved event across the event spine.
  • apps/execution (EDC) and RTSM must reject subject randomization, drug kit shipment release, and eCRF data entry for any non-greenlight site with an immutable audit log entry and HTTP 403 response.

17. eSource & Real-Time EHR-to-EDC Ingestion (SMART on FHIR) ​

To automate clinical data extraction from hospital Electronic Health Record (EHR) systems using HL7 FHIR USCDI standards, eliminating manual data transcription while maintaining strict source provenance.

PRD-ESR-001: SMART Backend Services Automated Ingestion ​

  • The interoperability service (apps/interop) must implement SMART on FHIR Backend Services authentication (asymmetric private-key JWT OAuth2) to connect securely to hospital EHR systems (Epic, Cerner, Allscripts).
  • Ingestion pipelines must extract structured clinical resources (Patient, Condition, MedicationRequest, MedicationStatement, Observation vital signs and laboratory results) mapped to standardized CDASH domains.

PRD-ESR-002: Clinical Research Coordinator (CRC) Reconciliation Drawer ​

  • The platform UI (apps/web) must provide a split-screen EHR reconciliation drawer displaying incoming EHR data side-by-side with current eCRF fields, source timestamps, and FHIR resource provenance identifiers.
  • The interface must support non-destructive 1-click actions: "Accept & Commit", "Reject with Reason", or "Raise Discrepancy Query", strictly prohibiting silent background data overwrites.

PRD-ESR-003: Immutable Source Data Provenance & Part 11 Audit Attribution ​

Evidence: PostgreSQL (provenance is an append-only database record, so only a PostgreSQL test can prove it).

  • Every committed eSource data value must record complete provenance metadata (source EHR system identifier, FHIR resource type and ID, extraction timestamp, and committing coordinator electronic signature) in the GxP audit ledger.

18. Laboratory Data Management, Reference Ranges & Toxicity Grading ​

To provide centralized governance of central and local laboratory feeds, standardized unit conversions, and automated CTCAE/DAIDS toxicity grading with adverse event auto-drafting.

PRD-LBM-001: Multi-Format Lab Ingestion & LOINC Standardization ​

  • The lab management engine must ingest central laboratory data feeds (HL7, CDISC LAB v1.0.1, CSV/sFTP) and manual local lab batch entry.
  • All lab analytes must map to standard LOINC concept codes with automated mathematical unit conversion between Conventional and SI units (e.g. mg/dL to mmol/L, g/dL to g/L).

PRD-LBM-002: Age/Sex Reference Range Governance & Uncalibrated Safeguards ​

  • The system must enforce age-, sex-, and ethnicity-specific standard normal reference ranges (Lower Limit of Normal LLN and Upper Limit of Normal ULN).
  • Local hospital labs must maintain active, verified reference range certificates in the eISF; data entry for labs with uncalibrated or expired ranges must trigger an immediate uncalibrated range warning in the eCRF.

PRD-LBM-003: Automated CTCAE / DAIDS Toxicity Grading & AE Auto-Drafting ​

  • Laboratory results must be evaluated in real-time against protocol-pinned toxicity scales (NCI-CTCAE v5.0 or DAIDS) to compute Grade 1–4 severity classifications.
  • Clinically significant Grade 3 or Grade 4 laboratory abnormalities must automatically trigger a staged Adverse Event eCRF draft routed directly to the Principal Investigator review queue.

PRD-SYS-170: Central & Local Laboratory Batch Ingestion, Reference Range Governance & LOINC Unit Conversion ​

  • The lab management engine must provide high-throughput batch ingestion supporting CSV, HL7 v2.x (ORU^R01), FHIR JSON, CDISC LAB v1.0.1, and local manual entry with LOINC code standardization, age/sex/ethnicity/site-specific reference range matching, and uncalibrated local lab certification safeguards.

PRD-SYS-171: NCI-CTCAE v5.0 / DAIDS Toxicity Grading Engine, Baseline Delta Checks & Automated AE Review Queue ​

  • The system must evaluate laboratory observations in real time against NCI-CTCAE v5.0 and DAIDS v2.1 criteria, detect Hy's Law DILI hepatotoxicity flags, calculate acute baseline shifts (>= 50% delta check alerts), and automatically draft staged Grade 3/4 Adverse Event eCRFs with discrepancy queries routed for investigator medical review.

19. Clinical Endpoint Adjudication Committee (CEC) Management Suite ​

To provide a blinded, chartered expert adjudication environment for major clinical endpoints (e.g. MACE, stroke, cause of death, disease progression) with automated dossier packaging and CDISC SDTM CE domain compilation.

PRD-CEC-001: Automated Patient Event Dossier Compilation & PHI Redaction ​

  • When a candidate endpoint event is reported in EDC, the system must automatically assemble a comprehensive patient dossier bundling eCRFs, lab panels, ECGs, hospital discharge summaries, and imaging reports.
  • Outbound dossier packages must undergo in-flight de-identification, masking patient identifiers, site numbers, and treating physician names.

PRD-CEC-002: 2+1 Independent Blinded Reader & Tie-Breaker Workflow ​

  • Dossiers must be assigned to two independent primary reviewers blinded to treatment arm.
  • If both reviewers agree (concordant diagnosis), the adjudication is finalized immediately. If discordant, the system must automatically escalate the dossier to a tie-breaker Committee Chair or schedule a virtual consensus committee meeting.

PRD-CEC-003: Bi-Directional EDC Feedback & CDISC SDTM CE Domain Export ​

  • Approved consensus adjudication decisions must write back to the subject casebook and compile automatically into the CDISC SDTM CE (Clinical Events) dataset with full 21 CFR Part 11 electronic signature attribution.

PRD-SYS-172: Blinded Clinical Endpoint Adjudication Committee (CEC) Dossier Compilation & Dual-Reader Engine ​

  • The system must provide automated multi-source clinical event dossier compilation bundling eCRFs, lab panels, 12-lead ECG findings, imaging reports, and medical narratives with deterministic date-shifting and tokenized patient/site anonymization ([REDACTED_NAME], [REDACTED_SITE], [REDACTED_PHONE]).
  • Outbound packages must enforce strict reader isolation at the API projection layer, keeping peer assessments completely blinded until consensus or escalation.

PRD-SYS-173: CEC Committee Governance, Consensus Determination & 21 CFR Part 11 Electronic Signatures ​

  • The engine must support standardized endpoint criteria checklists, automated concordance evaluation, and discordance escalation to a Committee Chair tie-breaker panel.
  • Chair tie-breaker determinations and meeting quorum records must require 21 CFR Part 11 compliant electronic signatures with legal intent manifestations, immutable audit trailing via AuditedModel, and direct bidirectional synchronization into EDC observations and CDISC SDTM CE/SUPPCE datasets.

20. Aggregate Pharmacovigilance & Periodic Regulatory Reporting ​

To automate the compilation of annual Development Safety Update Reports (DSUR), Periodic Safety Update Reports (PSUR), and investigator safety update packages from live trial data.

PRD-AGG-001: Immutable Point-in-Time Regulatory Safety Snapshot ​

  • When compiling an annual DSUR or PSUR, the system must create a cryptographically sealed, immutable dataset snapshot of all SAEs, SUSARs, and exposure metrics for the reporting window (e.g. DIBD anniversary), guaranteeing 100% audit reproducibility.

PRD-AGG-002: Cumulative & Interval Exposure Calculations ​

  • The engine must compute cumulative and interval patient-years of exposure stratified by treatment arm, demographic subgroup, age bracket, and dosage cohort.

PRD-AGG-003: Automated MedDRA SOC/PT Summary Tabulations & QPPV Sign-off ​

  • The aggregate reporter must generate standard summary cross-tabulations of SAEs, fatal events, and adverse events of special interest (AESI) grouped by MedDRA System Organ Class and Preferred Term.
  • The compiled aggregate safety package must require formal electronic signature review and approval by the Qualified Person for Pharmacovigilance (QPPV).

21. Medical Device & In-Vitro Diagnostic (IVD) Clinical Investigation ​

To provide specialized regulatory and operational support for medical device and IVD trials compliant with ISO 14155:2020, EU MDR (2017/745), and IVDR (2017/746).

PRD-DEV-001: Unique Device Identifier (UDI) & Serialized Inventory Tracking ​

  • The system must track medical device inventory in RTSM using standard UDI barcodes, parsing Device Identifiers (DI) and Production Identifiers (PI: lot number, serial number, expiration date, manufacturing date).

PRD-DEV-002: Device Deficiency & Malfunction eCRF Capture ​

  • eCRFs must support standardized device deficiency, malfunction, and usability error reporting workflows, capturing device return status and root-cause evaluations.

PRD-DEV-003: Automated Adverse Device Effect (ADE) & RTSM Quarantine Triggers ​

  • Logging a device deficiency or malfunction must automatically:
    1. Trigger an Adverse Device Effect (ADE / SADE / USADE) safety investigation in apps/safety.
    2. Immediately quarantine the affected device serial number (and optionally the site's entire device lot) in RTSM, preventing further patient allocation.

PRD-DEV-004: Regulatory Incident Reports & CDISC SDTM DD/DO Dataset Exports ​

  • The system must compile Manufacturer Incident Report (MIR v7.2 XML/JSON) forms compliant with EU MDR (2017/745 Articles 87-92), EU IVDR (2017/746 Articles 82-87), and ISO 14155:2020 Annex B.
  • The system must export standardized CDISC SDTM DD (Device Deficiencies) and DO (Device Tracking and Operations) domain datasets with 21 CFR Part 11 compliant audit metadata.

22. Participant Financial Wallet & Plain-Language Lay Summary Distribution ​

To automate patient stipend and travel reimbursement disbursements and facilitate compliant distribution of lay summaries under EU CTR 536/2014.

PRD-PAT-001: SoA-Linked Stipend Matrix & Automated Payable Credits ​

  • Protocol authors must configure participant visit compensation rules directly in the Schedule of Activities (SoA) matrix in apps/designer.
  • When an in-person or remote visit is marked verified in EDC, the subject's mobile wallet must automatically receive scheduled stipend credits.

PRD-PAT-002: Mobile Travel Expense Submission & Receipt OCR ​

  • Participants must be able to photograph and submit travel/meal expense receipts via the Subject Portal mobile app.
  • Optical Character Recognition (OCR) must extract receipt date, merchant, and total amount, routing the expense claim to the site coordinator for 1-click review and digital disbursement via virtual card or ACH.

PRD-PAT-003: Plain-Language Lay Summary Portal ​

  • The Subject Portal must provide a secure channel for delivering IRB/Ethics Committee approved Plain Language Summaries of trial results to consented trial participants per EU CTR Regulation No 536/2014 Article 37.

PRD-SYS-182: Participant Wallet & Automated Stipend Micro-Ledger Tracer ​

  • The system must provide an automated participant stipend micro-ledger calculating visit completion milestones, mobile travel expense receipts (OCR parsing & receipt verification), and meal allowance disbursements.
  • The engine must monitor IRS Form 1099 tax reporting thresholds ($600.00 annual taxable stipend cap), providing early approaching warnings and triggering automated W-9 certification workflows.
  • The wallet must support automated reloadable debit card issuing, real-time balance inquiries, instant ACH payouts, and strict enforcement of IRB/ethics anti-coercion stipend caps per 45 CFR 46 and 21 CFR 50.

PRD-SYS-183: Greenlight Site Activation Multi-Factor Engine Tracer ​

  • The system must evaluate multi-factor startup criteria (ethics approval, budget execution, essential regulatory documents, pharmacy readiness, trained staff delegations) before un-gating site patient enrollment and dispensation.
  • Provide cryptographic bypass token generation, HMAC verification, dual-signature GxP overrides, and transactional outbox event propagation upon site greenlight approval.

PRD-SYS-184: Next-Gen RTSM, Bayesian BOIN & Cold Chain MKT Tracer ​

  • The system must provide Pocock-Simon covariate-adaptive minimization with configurable variance weights, marginal imbalance metrics, and biased coin allocation probabilities.
  • Provide Bayesian Optimal Interval (BOIN) and Continual Reassessment Method (CRM) Phase I dose-escalation engines with configurable target DLT rates and dose transition decision boundaries (ESCALATE, STAY, DE_ESCALATE, STOP).
  • Provide real-time IP kit dispensing, expiry/quarantine inventory fencing, cold-chain Arrhenius Mean Kinetic Temperature (MKT) excursion holds, stability budget evaluations, and 21 CFR Part 11 emergency code-break unblinding audit ledgers.

23. Reactive Cross-App Clinical Event Spine & Outbox Architecture ​

To ensure reliable, resilient, and audit-compliant event propagation across all 20 platform microservices without cascading failures or sibling database coupling.

PRD-EVT-001: Transactional Outbox Pattern & Zero Data Loss ​

  • All domain state transitions (SiteGreenlightApproved, EhrDataIngested, Grade3ToxicityDetected, EndpointAdjudicated, DeviceMalfunctionReported, VisitCompletedPayableTriggered) must be atomically written to a local transactional_outbox table within the same database transaction as the entity mutation.
  • Asynchronous relay workers must stream outbox events to the centralized event broker with exponential backoff and guaranteed at-least-once delivery.

PRD-EVT-002: Deterministic Idempotency & Replay Auditability ​

  • Consuming microservices must process incoming events using deterministic idempotency keys ({entity_type}:{entity_id}:{event_type}:{version_index}), preventing duplicate operations during network redeliveries.
  • The event log must support full point-in-time replay for disaster recovery, simulation, and regulatory inspection audits.

24. Definition of Done (DoD) & Bi-directional Traceability ​

This Product Requirements Document represents the definitive, legally compliant system configuration for Cadence Clinical. To satisfy the Definition of Done (DoD) for GxP system validation:

  1. Requirement Mapping: Every requirement key (PRD-SYS-XXX through PRD-EVT-XXX) defined in this document must map directly to:
    • A database schema attribute or application-layer class in the Technical Design Document (TDD).
    • An automated unit, integration, or manual verification script in the Quality Assurance (QA) & Validation Plan.
  2. Regulatory Conformity: No features may be added or modified without updating this document and acquiring the necessary regulatory/QA signatures.
  3. Audit Readiness: All configurations are compiled in real-time. This PRD itself is cryptographically sealed in the software build pipeline to prevent retroactive tampering or undocumented requirement modifications.