Distopia22's picture
Add file upload functionality for provider notes
a8f12f6
raw
history blame
1.04 kB
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from api.routes import router
import uvicorn
import logging
# Configure logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
app = FastAPI(
title="ICD-10 & CPT Code Analyzer",
description="AI-powered medical coding assistant",
version="1.1.0"
)
# CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include API routes
app.include_router(router, prefix="/api")
@app.get("/")
async def root():
return {
"message": "ICD-10 & CPT Code Analyzer API",
"version": "1.1.0",
"endpoints": {
"text_input": "/api/coding",
"file_upload": "/api/upload-file",
"docs": "/docs"
}
}
@app.get("/health")
async def health_check():
return {"status": "healthy"}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=7860)