How vibe12341/hospital-osv2 works
HospitalOS is a demo hospital-operations web app with a staff dashboard and domain workspaces, REST-backed data access, and a Gemini assistant that uses MCP tools. Staff workflows span patient and vital review, beds, appointments, laboratory diagnostics, pharmacy, billing, and audited, role-restricted writes. The graph preserves the README’s external FHIR/openFDA wrappers and settings/audit capabilities; sampled evidence is partial, so unsampled subsystem links are omitted where callers cannot be verified.
Main entry points: App.tsx Route application · agent.ts Gemini agent · routes.ts REST routes · repo.ts Repository interface
Components 22
Staff web app
- Route application
src/App.tsx - Dashboard
src/pages/DashboardPage.tsx - Operations workspaces
src/pages - Public landing
src/pages/LandingPage.tsx - Chat and confirmations
src/components/ChatPanel.tsx - Settings and audit
src/pages/SettingsPage.tsx - API client
src/lib/api.ts
REST and assistant
- HTTP application
server/index.ts - REST routes
server/api/routes.ts - Gemini agent
server/agent/agent.ts - Role permissions
server/agent/permissions.ts - Google Gemini
Hospital data
- Repository interface
server/data/repo.ts - Memory repository
server/data/memoryRepo.ts - Firestore repository
server/data/firestoreRepo.ts - Demo data seed
server/data/seed.ts
MCP tools
- MCP registry
server/mcp/registry.ts - Hospital tool servers
server/mcp
External integrations
- FHIR and FDA wrappers
server/mcp/external - HAPI FHIR API
- openFDA API
Other components
- Hospital staff
Connections 27
- Hospital staff → Route application: uses
src/App.tsx - Route application → Dashboard: routes to
src/App.tsx - Route application → Operations workspaces: routes to
src/App.tsx - Route application → Public landing: routes to
src/App.tsx - Route application → Settings and audit: routes to
src/App.tsx - Dashboard → API client: fetches data
src/pages/DashboardPage.tsx - Public landing → API client: fetches status
src/pages/LandingPage.tsx - Chat and confirmations → API client: sends chat
src/components/ChatPanel.tsx - API client → REST routes: calls REST
src/lib/api.ts - HTTP application → REST routes: mounts
server/index.ts - HTTP application → MCP registry: mounts tools
server/index.ts - REST routes → Repository interface: reads and writes
server/api/routes.ts - REST routes → MCP registry: probes status
server/api/routes.ts - REST routes → Gemini agent: serves chat
server/api/routes.ts - Gemini agent → Google Gemini: generates responses
- Gemini agent → MCP registry: connects tools
server/agent/agent.ts - Gemini agent → Role permissions: checks roles
server/agent/agent.ts - Gemini agent → Repository interface: appends audit
server/agent/agent.ts - MCP registry → Hospital tool servers: mounts servers
- Hospital tool servers → Repository interface: reads and writes
server/mcp/appointments/server.ts - Repository interface → Memory repository: selects backend
server/data/memoryRepo.ts - Repository interface → Firestore repository: selects backend
server/data/firestoreRepo.ts - Memory repository → Demo data seed: loads seed
server/data/memoryRepo.ts - Firestore repository → Demo data seed: uses seed
server/data/firestoreRepo.ts - MCP registry → FHIR and FDA wrappers: registers wrappers
- FHIR and FDA wrappers → HAPI FHIR API: queries
- FHIR and FDA wrappers → openFDA API: queries