Skip to content

Add ClinicalMultimodalDB, Flask clinical API, docs and end-to-end tests#1

Open
pifu-dabai wants to merge 1 commit intomainfrom
codex/build-integrated-database-for-clinical-data
Open

Add ClinicalMultimodalDB, Flask clinical API, docs and end-to-end tests#1
pifu-dabai wants to merge 1 commit intomainfrom
codex/build-integrated-database-for-clinical-data

Conversation

@pifu-dabai
Copy link
Copy Markdown
Collaborator

Motivation

  • Provide a lightweight, notebook-friendly multimodal clinical database with standardized schema and retrieval/analysis utilities.
  • Expose ingestion, extraction, QA, search and research queries via a simple Flask API for integration and testing.
  • Document the data management / research engine plan to guide implementation and extension.

Description

  • Add database/clinical_multimodal_db.py implementing ClinicalMultimodalDB and SearchResult with schema, FTS5 semantic search, regex-based auto-fill, RAG-style answer synthesis, IQA scoring, change detection, knowledge-graph extraction, lesion evolution and research query helpers.
  • Export ClinicalMultimodalDB and SearchResult from database/__init__.py.
  • Add server/clinical_api.py which provides a Flask application via create_app with endpoints for health, upsert patient, visits, medications, lesions, labs, assets, auto-fill (single/batch), IQA, semantic search, RAG, multimodal ingest, review commit, change detection, snapshot, graph extraction, evolution, audits and research queries.
  • Add implementation plan documentation in docs/data_management_research_engine_plan.md describing goals, data model, intelligent fill, RAG/graph/IQA features, architecture and phased rollout.
  • Add comprehensive integration tests in tests/test_clinical_api.py that exercise end-to-end flows and validation guardrails using a temporary SQLite database and the Flask test client.

Testing

  • Ran the test module tests/test_clinical_api.py with unittest using a temporary DB and Flask test client.
  • The end-to-end flow test exercises patient/visit ingestion, auto-fill, batch fill, medications/lesions/labs ingestion, semantic search, RAG, IQA scoring, change detection, snapshot, review commit, graph extraction, evolution, audits and research query.
  • All automated tests in tests/test_clinical_api.py completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant