Trial editor
Per-trial column editor at /admin/trials/[registry_id]/edit. Use it to fix a single bad row that the automatic pipeline got wrong — without waiting for the next weekly cron and without re-extracting the whole corpus.

What you can edit
Every field on trials, plus tags in trial_tags, drugs in trial_drugs, and locations in trial_locations. The form is grouped into six logical sections matching the underlying schema.
How a save works
Edits land directly in the respective tables. Two columns on trials track the audit:
admin_edited_at— timestamp of last saveadmin_edited_by— free-form actor string (fromx-admin-userheader or fallback)
Tag rows you touch get tag_source='admin'.
The conflict policy (HARD RULE)
The weekly cron's push_v3_intent.py and push_v4_disease.py scripts respect admin edits. Their DELETE clauses gate on AND tag_source <> 'admin' by default — your manual fixes survive every re-extraction.
This is the inverse of the "manual = automated" rule: by default, manual and automated paths produce identical output; when they diverge (admin edit), the manual path wins until explicitly overridden with --force-overwrite-admin.
Spot-review workflow on /admin/pipeline/[runId]
Often you'll reach the trial editor via the pipeline-run drill-down. The spot-review tab samples N trials from a run and lays the original CT.gov / CTRI text alongside the extracted v3 + v4 tags. Per-card buttons:
- Audit — re-runs
scraper/audit_one_trial.pywith a different model (gemini-3.1-flash-liteby default — different family than the cron'sgemini-2.5-flash-liteto give a real differential). Read-only verdict. - Regen (dry) — re-runs the v3 + v4 extraction on this trial and shows a before/after diff. No DB write.
- Regen + apply — same, but UPSERTs the new tags with
tag_source='v4-admin-regen'. - Flag — writes a
trial_qa_findingsrow withkind='admin_review_flag'for later triage.