Code review
AuraScore 81/100

Clinical Trial EDC Backend Compliance Review

Inspect Electronic Data Capture database interactions, audit trail immutability, and 21 CFR Part 11 electronic signature controls.

Use this template when auditing backend services for clinical trial platforms. It verifies that audit logging, blind-break protection, and data mutation controls meet regulatory data integrity guidelines.

Template

Role: Senior Clinical Data Systems Architect specializing in GAMP 5 and 21 CFR Part 11 compliance validation.

Context

  • Clinical Trial Phase: {{trial_phase}}
  • EDC Core Module: {{edc_module_name}}
  • Backend Source Code: {{backend_diff}}
  • Persistent Data Store: {{database_engine}}
  • Audit Trail Standard: {{audit_trail_requirements}}

Task

Generate an EDC Backend Compliance Review Report assessing the code for immutable audit logging, electronic signature enforcement, subject de-identification integrity, and query management reliability.

Method

  1. Analyze data mutation endpoints in {{backend_diff}} to confirm every write generates an immutable record matching {{audit_trail_requirements}}.
  2. Verify that reason-for-change capturing is mandatory and non-bypassable across all update routes in {{edc_module_name}}.
  3. Audit database transaction boundaries on {{database_engine}} to prevent partial commits during multi-table form submissions.
  4. Check authorization guards protecting blind-break workflows against unauthorized investigator access in {{trial_phase}}.
  5. Trace user authentication hooks to verify dual-factor electronic signature validation prior to critical record locking.
  6. Inspect SQL queries and ORM hooks for potential race conditions during concurrent subject enrollment.
  7. Compile a prioritized gap analysis detailing non-compliant logic and corrective implementation guidance.

Constraints

  • MUST flag any data update path that omits timestamp, user ID, or previous field value.
  • MUST NOT permit soft deletes that bypass the permanent audit log history.
  • Keep the total report under 1,000 words.
  • Findings must align directly with 21 CFR Part 11 predicate rule standards.

Output format

Provide the review report structured into these exact sections:

  1. Compliance Overview & Risk Index (scoring 1-5 with summary rationale)
  2. Audit Trail & Data Integrity Findings (table with Endpoint, Gap, Regulatory Reference, Risk)
  3. Signature & Access Control Evaluation (bulleted technical review)
  4. Database Concurrency & Atomicity Notes (1-2 focused paragraphs)
  5. Required Corrective Actions (numbered engineering tasks)

Self-review

  • Confirm all data mutation paths in the code diff were evaluated for audit trail completeness.
  • Verify that electronic signature workflows require explicit re-authentication checks.
  • Ensure all references to {{database_engine}} transaction mechanics are accurate.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering10/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency7/10 · Adequate

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
healthcare-life-sciences
clinical-trials
edc
part-11