TorbatYar/backend/services/healthcare/README.md
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

65 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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)
```bash
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
```bash
pytest
```