from fastapi import APIRouter

from .epicrisis import _find_latest_case_document_impl
from .epicrisis import router as epicrisis_router
from .epicrisis_patient import router as epicrisis_patient_router
from .epicrisis_pdf_cache import router as epicrisis_pdf_cache_router
from .navigation import router as navigation_router
from .rips_operativo import router as rips_operativo_router
from .soat_pages import router as soat_pages_router


router = APIRouter()
router.include_router(navigation_router)
router.include_router(rips_operativo_router)
router.include_router(epicrisis_patient_router)
router.include_router(epicrisis_router)
router.include_router(epicrisis_pdf_cache_router)
router.include_router(soat_pages_router)

# Re-exported to preserve tests that patch `app.routes.pages._find_latest_case_document`.
_find_latest_case_document = _find_latest_case_document_impl
