TorbatYar/backend/services/healthcare/app/specifications/appointments.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

26 lines
705 B
Python

"""Appointment list specifications — Phase 13.1."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime
from uuid import UUID
from app.models.types import AppointmentStatus
ALLOWED_SORT_FIELDS = frozenset(
{"created_at", "scheduled_start", "status", "code", "updated_at"}
)
@dataclass
class AppointmentListSpec:
status: AppointmentStatus | None = None
doctor_id: UUID | None = None
clinic_id: UUID | None = None
patient_id: UUID | None = None
date_from: datetime | None = None
date_to: datetime | None = None
q: str | None = None
sort_by: str = "scheduled_start"
sort_dir: str = "desc"