How itsbk13/cts_project works
Patient Journey Intelligence is a hospital-facing patient access and drop-off analytics product. Hospital staff use its web interface to inspect patient journeys, cohorts, funnels, leakage, risk, survival, and SHAP explanations; backend processing builds journey features and serves analytics and risk results, with assistant capabilities for recommendations and contextual questions. The excerpts show registration calling the auth service and backend connections to preprocessing, validation, onboarding, and Databricks. Frontend-to-backend analytics wiring and several storage paths are not shown, so those links are omitted.
Main entry points: main.py FastAPI application · onboard_hospital.py Hospital onboarding · page.tsx Account registration · schemas.py Request schemas
Components 25
Journey analytics
- Journey overview
frontend/src/app/page.tsx - Cohort analysis
frontend/src/app/cohorts/page.tsx - Journey funnel
frontend/src/app/funnel/page.tsx - Event journeys
frontend/src/app/journey/event/page.tsx - Leakage analysis
frontend/src/app/leakage/page.tsx
Risk and assistance
- Patient records
frontend/src/app/patients/page.tsx - Patient detail
frontend/src/app/patients/[patientId]/page.tsx - Patient intake
frontend/src/app/patients/register/page.tsx - Risk analysis
frontend/src/app/risk/page.tsx - SHAP explanations
frontend/src/app/shap/page.tsx - Survival analysis
frontend/src/app/survival/page.tsx - AI assistant
frontend/src/app/ai/page.tsx
Backend services
- FastAPI application
backend/main.py - Request schemas
backend/schemas.py - Input validation
backend/validation.py - Journey preprocessing
backend/src/preprocessing.py - Hospital onboarding
backend/onboard_hospital.py - Risk recommendations
backend/llm_recommendation.py - Contextual chat
backend/chatbot.py - SQL database setup
backend/database.py
Identity and onboarding
- Account registration
frontend/src/app/register/page.tsx - Sign in
frontend/src/app/login/page.tsx - Auth API client
frontend/src/services/authApi.ts
Other components
- Hospital staff
- Databricks
Connections 11
- Hospital staff → Account registration: registers
frontend/src/app/register/page.tsx - Account registration → Auth API client: calls
frontend/src/app/register/page.tsx - Hospital staff → Sign in: signs in
frontend/src/app/login/page.tsx - FastAPI application → Request schemas: imports
backend/main.py - FastAPI application → Input validation: imports
backend/main.py - FastAPI application → Journey preprocessing: imports
backend/main.py - FastAPI application → Risk recommendations: imports
backend/main.py - FastAPI application → Contextual chat: imports
backend/main.py - FastAPI application → Hospital onboarding: calls
backend/main.py - FastAPI application → Databricks: requests predictions
backend/main.py - Hospital onboarding → Databricks: creates schema
backend/onboard_hospital.py