How markgon-cell/medtour-navigator works
MedTour Navigator helps patients locate care, book a walk-in visit, and keep clinical records on their own device. Its central workflow runs from symptom/location-based hospital discovery through appointment booking, doctor consultation, QR-based transfer of visit details into the patient’s local vault, and claim verification. Separate capabilities include first-aid guidance, emergency SOS, and waiting-time information. The README documents the end-to-end flow; several unsampled route implementations are represented at their listed paths, so their internal relationships are not inferred.
Main entry points: api.ts API client · main.py FastAPI application · database.py PostgreSQL data · ai_analysis.py AI triage and discovery
Components 24
Patient experience
- Home and search
src/routes/index.tsx - Walk-in triage
src/routes/walk-in.tsx - Appointment booking
src/components/appointments/BookAppointmentDialog.tsx - Doctor portal
src/routes/doctor.tsx - Visits and QR scan
src/routes/visits.tsx
Care discovery
- Hospital discovery API
backend/app/api/hospitals.py - AI triage and discovery
backend/app/api/ai_analysis.py - First-aid retrieval
backend/app/api/hybrid_first_aid_retriever.py - Emergency triage engine
backend/app/api/robust_triage_engine.py - Emergency SOS
backend/app/api/emergency.py - Queue and wait estimates
backend/app/api/waiting_prediction.py
Clinical services
- Appointment API
backend/app/api/appointments.py - Doctor and consultation API
backend/app/api/doctor.py - Doctor authentication
backend/app/api/doctor_auth.py
Visit records
- Encrypted patient vault
src/lib/mtrDatabase.ts - Vault cryptography
src/lib/cryptoEngine.ts - Claim purchase
src/components/visits/ClaimPurchaseModal.tsx - Verification status
src/routes/verificationStatus.tsx - QR and claim rendering
backend/app/services/qr_service.py - Public verification API
backend/app/api/verification.py
Backend platform
- API client
src/lib/api.ts - PostgreSQL data
backend/app/database/database.py - FastAPI application
backend/app/main.py
Other components
- Patient
Connections 33
- Patient → Home and search: uses
- Home and search → API client: requests hospitals
src/routes/index.tsx - Walk-in triage → API client: requests triage
- Appointment booking → API client: submits booking
src/components/appointments/BookAppointmentDialog.tsx - Appointment booking → Encrypted patient vault: reads visit details
src/components/appointments/BookAppointmentDialog.tsx - Doctor portal → API client: calls doctor API
src/routes/doctor.tsx - Visits and QR scan → API client: submits scanned QR
- Visits and QR scan → Encrypted patient vault: stores visit details
- Claim purchase → API client: purchases claim
- Verification status → API client: checks status
- API client → FastAPI application: sends requests
src/lib/api.ts - FastAPI application → Hospital discovery API: registers routes
backend/app/main.py - FastAPI application → Appointment API: registers routes
backend/app/main.py - FastAPI application → Doctor and consultation API: registers routes
backend/app/main.py - FastAPI application → Emergency SOS: registers routes
backend/app/main.py - FastAPI application → AI triage and discovery: registers routes
backend/app/main.py - FastAPI application → Queue and wait estimates: registers routes
backend/app/main.py - AI triage and discovery → PostgreSQL data: uses sessions
backend/app/api/ai_analysis.py - AI triage and discovery → First-aid retrieval: retrieves guidance
backend/app/api/ai_analysis.py - AI triage and discovery → Emergency triage engine: uses triage logic
backend/app/api/ai_analysis.py - Hospital discovery API → PostgreSQL data: queries hospitals
- Emergency SOS → PostgreSQL data: records SOS
backend/app/api/emergency.py - Appointment API → PostgreSQL data: stores status
backend/app/api/appointments.py - Doctor and consultation API → PostgreSQL data: reads appointment
backend/app/api/doctor.py - Doctor and consultation API → QR and claim rendering: creates QR
backend/app/api/doctor.py - Doctor authentication → PostgreSQL data: checks doctor
backend/app/api/doctor_auth.py - Doctor portal → Doctor authentication: authenticates
- QR and claim rendering → Visits and QR scan: returns QR payload
- QR and claim rendering → Claim purchase: renders claim PDF
- Public verification API → PostgreSQL data: reads claim status
- API client → Public verification API: checks public status
- Encrypted patient vault → Vault cryptography: encrypts records
src/lib/mtrDatabase.ts - PostgreSQL data → FastAPI application: serves database sessions
backend/app/main.py