File size: 612 Bytes
0dcbb28
 
 
 
 
861de3a
0dcbb28
 
 
 
 
6c992a8
 
 
0dcbb28
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from fastapi import APIRouter

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
    router.include_router(auth, prefix="/auth", tags=["auth"])  # Use 'auth' directly
    router.include_router(patients, prefix="/ehr", tags=["patients"])  # Use 'patients' directly
    router.include_router(pdf, prefix="/ehr/patients", tags=["pdf"])  # Use 'pdf' directly
    
    return router

# Export the router
api_router = get_router()