Summary
Follow-up work after the Clinical KB Database audit and cleanup (Supabase project sjrfecxgysukkwxsowpy). Canonical data is now 185 differentials, 328 medications, and 226 services under primary owner 4f1b3c19-3c39-4597-b9df-168c8e6007ff. Recent cleanup removed 62 empty presentation stubs, deduplicated a secondary owner copy, enriched 9 service contacts, and completed a verification pass.
Three content/provenance gaps remain and are not auto-fixable without source material or import work.
Background
- Empty
kind: presentation stubs were deleted because they had no payload; presentation-level navigation content was never imported.
- Diagnosis records (
kind: diagnosis) are populated; presentation topics still need a separate import path.
clinical_registry_record_sources has 0 rows — registry/services are not linked to source PDFs or documents.
Tasks
Acceptance criteria
- All intended presentation topics exist as
kind: presentation with non-empty payload (sections and related content), unique per (owner_id, slug, kind).
- Diagnosis records flagged for missing
immediateActions / investigations are either enriched or explicitly deferred with a tracked list.
- Each clinically important service/registry record has at least one row in
clinical_registry_record_sources pointing to a document_id (or documented reason if internal-only).
- Re-run Supabase advisors / spot-check queries confirm no regression in deduplication or RLS on affected tables.
References
- Supabase project: Clinical KB Database (
sjrfecxgysukkwxsowpy)
- Tables:
differential_records, clinical_registry_records, clinical_registry_record_sources, medication_records
Summary
Follow-up work after the Clinical KB Database audit and cleanup (Supabase project
sjrfecxgysukkwxsowpy). Canonical data is now 185 differentials, 328 medications, and 226 services under primary owner4f1b3c19-3c39-4597-b9df-168c8e6007ff. Recent cleanup removed 62 empty presentation stubs, deduplicated a secondary owner copy, enriched 9 service contacts, and completed a verification pass.Three content/provenance gaps remain and are not auto-fixable without source material or import work.
Background
kind: presentationstubs were deleted because they had no payload; presentation-level navigation content was never imported.kind: diagnosis) are populated; presentation topics still need a separate import path.clinical_registry_record_sourceshas 0 rows — registry/services are not linked to source PDFs or documents.Tasks
immediateActionsand/orinvestigationsinpayload(audit snapshot: ~194 without immediate actions, ~268 without investigations among 185 diagnosis rows; counts were pre-cleanup on diagnosis set). Prioritize high-use differentials first.clinical_registry_record_sources(and related source metadata onclinical_registry_recordswhere needed) so services/registry entries link to source PDFs or uploaded documents.Acceptance criteria
kind: presentationwith non-emptypayload(sections and related content), unique per(owner_id, slug, kind).immediateActions/investigationsare either enriched or explicitly deferred with a tracked list.clinical_registry_record_sourcespointing to adocument_id(or documented reason if internal-only).References
sjrfecxgysukkwxsowpy)differential_records,clinical_registry_records,clinical_registry_record_sources,medication_records