How suryanshswarn09/nirmaya works
NIRMAYA is a health-record interoperability platform spanning a patient vault, provider EMR, diagnostic gateway, clinical scheduling, and FHIR/ABDM-aligned exchange. The workflow runs from role-based sign-in and profile access through appointment booking and clinical or lab record creation, with records persisted in the relational database and represented in FHIR formats. Edges are limited to relationships established by the README or shown in the excerpts and SOURCE INDEX; unsampled feature internals and external integrations are therefore shown only where documented.
Main entry points: router.py API routing · services Domain services · transformers.py FHIR schemas and transforms · main.py FastAPI application
Components 22
Web experience
- Role portals
frontend/src/app - Sign-in and registration
frontend/src/app/login/page.tsx - API client
frontend/src/lib/api.ts
API and access
- Authentication endpoints
backend/app/api/v1/endpoints/auth.py - Token and role access
backend/app/core/dependencies.py - API routing
backend/app/api/v1/router.py - FastAPI application
backend/app/main.py
Clinical workflows
- Patient vault
backend/app/api/v1/endpoints/patients.py - Doctor discovery
backend/app/api/v1/endpoints/doctors.py - Appointment booking
backend/app/api/v1/endpoints/appointments.py - Slot generation and holds
backend/app/services/slot_engine.py - Clinical conditions
backend/app/api/v1/endpoints/conditions.py - Vitals and observations
backend/app/api/v1/endpoints/observations.py - SOAP notes
backend/app/api/v1/endpoints/soap_notes.py - Lab orders and reports
backend/app/api/v1/endpoints/diagnostics.py - Domain services
backend/app/services
Interoperability
- FHIR schemas and transforms
backend/app/fhir/transformers.py - ABDM exchange
backend/app/abdm
Persistence
- Clinical data models
backend/app/models - Relational database
backend/app/db/session.py - Supabase auth and storage
Other components
- Patients, doctors, labs
Connections 29
- Patients, doctors, labs → Role portals: use portals
README.md - Role portals → Sign-in and registration: sign in
README.md - Sign-in and registration → API client: submit credentials
- API client → FastAPI application: call API
- FastAPI application → API routing: mount routes
backend/app/main.py - API routing → Authentication endpoints: route auth
backend/app/api/v1/router.py - API routing → Patient vault: route patients
backend/app/api/v1/router.py - API routing → Doctor discovery: route doctors
backend/app/api/v1/router.py - API routing → Appointment booking: route appointments
backend/app/api/v1/router.py - API routing → Clinical conditions: route conditions
backend/app/api/v1/router.py - API routing → Vitals and observations: route observations
backend/app/api/v1/router.py - API routing → SOAP notes: route notes
backend/app/api/v1/router.py - API routing → Lab orders and reports: route diagnostics
backend/app/api/v1/router.py - Authentication endpoints → Token and role access: use identity checks
backend/app/api/v1/endpoints/auth.py - Patients, doctors, labs → Authentication endpoints: authenticate
README.md - Doctor discovery → Slot generation and holds: generate availability
backend/app/api/v1/endpoints/doctors.py - Appointment booking → Domain services: use domain services
backend/app/api/v1/endpoints/appointments.py - Appointment booking → Slot generation and holds: hold slots
backend/app/api/v1/endpoints/appointments.py - Clinical conditions → Domain services: use condition service
backend/app/api/v1/endpoints/conditions.py - Lab orders and reports → Domain services: use diagnostic service
backend/app/api/v1/endpoints/diagnostics.py - Clinical conditions → FHIR schemas and transforms: FHIR exchange
backend/app/api/v1/endpoints/conditions.py - Lab orders and reports → FHIR schemas and transforms: FHIR exchange
backend/app/api/v1/endpoints/diagnostics.py - Clinical data models → FHIR schemas and transforms: transform records
backend/app/fhir/transformers.py - Domain services → Clinical data models: operate on entities
backend/app/services/slot_engine.py - Slot generation and holds → Relational database: read and write slots
backend/app/services/slot_engine.py - Domain services → Relational database: persist records
- Clinical data models → Relational database: map entities
backend/app/models/appointment.py - FHIR schemas and transforms → ABDM exchange: standards exchange
- FastAPI application → Supabase auth and storage: integrate auth and storage
README.md