TorbatYar/backend/services/healthcare
Mortezakoohjani 625275e55b feat(healthcare): add backend service and finalize frontend build
Add the Healthcare platform backend (phases 13.0–13.7) with Alembic migration revision fix, production deploy script, validation reports, shared UI exports, and loyalty list page client directives so Next.js build succeeds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 11:38:31 +03:30
..
alembic feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
app feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
scripts feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
alembic.ini feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
Dockerfile.dev feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
pytest.ini feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
README.md feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30
requirements.txt feat(healthcare): add backend service and finalize frontend build 2026-07-27 11:38:31 +03:30

Healthcare Platform (Torbat Healthcare)

Field Value
Service healthcare-service
Database healthcare_db
Port 8010
Permission prefix healthcare.*
Version 0.13.0.0
Phase 13.0 Healthcare Foundation

Owns

  • Clinics, branches, departments, configuration/settings shells
  • Doctor and patient profile shells (Identity user refs only)
  • External provider registrations (contracts only)
  • Healthcare roles/permissions catalog shells
  • Healthcare audit log + transactional outbox
  • Health / capabilities / metrics discovery
  • Publish-only healthcare.* events

Does not own

  • Accounting journals / billing posting
  • Communication SMS/email providers
  • Loyalty ledger
  • Identity user administration
  • Appointment booking, visit workflows, medical records, pharmacy (phases 13.113.7)
  • Delivery dispatch engines
  • Frontend UI

APIs

Method Path
GET /health
GET /capabilities
GET /metrics
CRUD /api/v1/clinics
CRUD /api/v1/branches
CRUD /api/v1/departments
CRUD /api/v1/doctors
CRUD /api/v1/patients
CRUD /api/v1/external-providers
CRUD /api/v1/configurations
PUT/GET /api/v1/settings
GET /api/v1/audit
GET /api/v1/permissions/catalog

Run (dev)

export HEALTHCARE_DATABASE_URL=postgresql+asyncpg://...
export HEALTHCARE_DATABASE_URL_SYNC=postgresql+psycopg://...
python scripts/ensure_db.py
alembic upgrade head
uvicorn app.main:app --host 0.0.0.0 --port 8010 --reload

Tests

pytest