TorbatYar/backend/services/healthcare/app/queries/profiles.py
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

27 lines
1010 B
Python

"""Profile query handlers — Phase 13.0."""
from __future__ import annotations
from uuid import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from app.services.profiles import DoctorService, PatientService
class ProfileQueries:
def __init__(self, session: AsyncSession) -> None:
self.doctors = DoctorService(session)
self.patients = PatientService(session)
async def get_doctor(self, tenant_id: UUID, doctor_id: UUID):
return await self.doctors.get(tenant_id, doctor_id)
async def list_doctors(self, tenant_id: UUID, *, offset: int = 0, limit: int = 20):
return await self.doctors.list(tenant_id, offset=offset, limit=limit)
async def get_patient(self, tenant_id: UUID, patient_id: UUID):
return await self.patients.get(tenant_id, patient_id)
async def list_patients(self, tenant_id: UUID, *, offset: int = 0, limit: int = 20):
return await self.patients.list(tenant_id, offset=offset, limit=limit)