How adot-7/sansys works
This prototype lets a clinician select a patient episode and specialty, review an AI-generated discharge-summary draft, edit or regenerate sections, then approve and retrieve a locally stored summary. The main stages are patient/episode selection, clinical-data retrieval and normalization, specialty-aware drafting, clinician review, and approval/persistence. The graph includes the major documented UI, Sansys, specialty, and LLM-provider capabilities. Some internal calls are shown only where excerpts or the source index support them; unsampled details are omitted.
Main entry points: App.jsx Summary workspace · routes.js Summary REST API · index.js LLM provider registry · anthropic.js Anthropic adapter
Components 24
Clinician workflow
- Summary workspace
client/src/App.jsx - REST client
client/src/api.js - Patient selection
client/src/components/PatientSelect.jsx - Patient banner
client/src/components/PatientBanner.jsx - Section navigation
client/src/components/SectionNav.jsx - Draft review
client/src/components/DraftPanel.jsx - Section editing
client/src/components/EditPanel.jsx - Approval controls
client/src/components/ApproveBar.jsx - Summary settings
client/src/components/SettingsModal.jsx - Specialty creation
client/src/components/SpecialtyModal.jsx - Print summary
client/src/components/PrintSummary.jsx - Print formatting
client/src/components/printFormat.js
Clinical data
- Patient data access
server/src/dataAccess.js
Draft generation
- Specialty registry
server/src/specialties/index.js - Prompt and source data
server/src/llm/prompts.js - LLM provider registry
server/src/llm/index.js - Anthropic adapter
server/src/llm/anthropic.js - Compatible chat adapter
server/src/llm/chat.js - Section formatting
server/src/llm/format.js
API and persistence
- Summary REST API
server/src/routes.js - Approved summaries
server/src/store.js
Other components
- Clinician
- Sansys clinical API
- LLM services
Connections 27
- Clinician → Summary workspace: uses
README.md - Summary workspace → REST client: requests data
client/src/App.jsx - Summary workspace → Patient selection: renders
client/src/App.jsx - Summary workspace → Patient banner: renders
client/src/App.jsx - Summary workspace → Section navigation: renders
client/src/App.jsx - Summary workspace → Draft review: renders
client/src/App.jsx - Summary workspace → Section editing: renders
client/src/App.jsx - Summary workspace → Approval controls: renders
client/src/App.jsx - Summary workspace → Summary settings: renders
client/src/App.jsx - Summary workspace → Specialty creation: renders
client/src/App.jsx - Summary workspace → Print summary: renders
client/src/App.jsx - Print summary → Print formatting: uses
client/src/components/PrintSummary.jsx - REST client → Summary REST API: calls
README.md - Summary REST API → Patient data access: fetches patient
server/src/routes.js - Patient data access → Sansys clinical API: reads clinical data
README.md - Summary REST API → Specialty registry: loads config
server/src/routes.js - Summary REST API → Prompt and source data: builds source data
server/src/routes.js - Summary REST API → LLM provider registry: generates draft
server/src/routes.js - LLM provider registry → Anthropic adapter: dispatches
server/src/llm/index.js - LLM provider registry → Compatible chat adapter: creates compatible client
server/src/llm/index.js - Anthropic adapter → Prompt and source data: builds prompts
server/src/llm/anthropic.js - Anthropic adapter → LLM services: sends requests
server/src/llm/anthropic.js - Compatible chat adapter → LLM services: sends requests
README.md - LLM provider registry → Section formatting: formats sections
server/src/llm/index.js - LLM provider registry → Patient data access: reconciles facts
server/src/llm/index.js - Summary REST API → Approved summaries: reads summary
server/src/routes.js - Summary REST API → Approved summaries: saves approval
server/src/routes.js