CPS-API / api /__init__.py
Ali2206's picture
Update api/__init__.py
a5b05f4 verified
raw
history blame contribute delete
768 Bytes
from fastapi import APIRouter
import logging
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(name)s - %(message)s'
)
logger = logging.getLogger(__name__)
def get_router():
router = APIRouter()
# Import sub-modules from the routes directory
from .routes.auth import auth
from .routes.patients import patients
from .routes.pdf import pdf
# Include sub-routers, prioritizing patients to avoid conflicts
router.include_router(patients, prefix="/ehr", tags=["patients"])
router.include_router(auth, prefix="/auth", tags=["auth"])
router.include_router(pdf, prefix="/ehr/patients", tags=["pdf"])
return router
# Export the router
api_router = get_router()