File size: 768 Bytes
a5b05f4
a2b6de1
 
 
 
 
 
 
 
0dcbb28
 
 
 
861de3a
0dcbb28
 
 
 
a2b6de1
a5b05f4
a2b6de1
a5b05f4
0dcbb28
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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()