feat: módulos de envío TNS/ERP Lab + sync de médico, empresa y valor total
- Hub /envios/tns con 5 sub-tabs (Terceros, Transacción RIPS, Facturas Venta, Prueba RDA, Automatización) via iframe lazy - Hub /envios/erp con sub-tabs Pacientes y Sync Automático (historial scheduler) - Modo embed (?embed=1) en base.html para cargar páginas sin sidebar/header dentro de iframes - Sidebar simplificado: 6 ítems individuales reemplazados por módulos TNS y ERP Lab - Scheduler y endpoint /pacientes/examenes ahora incluyen médico ordenante (DOCIDMEDICO), empresa/EPS (NIT_EMPRESA) y valor total (VALORTOTAL) desde Firebird Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
31c0b71c90
commit
8e27225326
@@ -8,11 +8,14 @@ from fastapi import FastAPI, Request
|
||||
from fastapi.responses import RedirectResponse
|
||||
from fastapi.templating import Jinja2Templates
|
||||
import uvicorn
|
||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||
|
||||
from app.database import init_db
|
||||
from app.auth import decode_token
|
||||
from app.services.scheduler import sync_recientes
|
||||
|
||||
app = FastAPI(title="RIPS Manager", version="1.0.0")
|
||||
_scheduler = AsyncIOScheduler()
|
||||
|
||||
templates = Jinja2Templates(
|
||||
directory=os.path.join(os.path.dirname(__file__), "app", "templates")
|
||||
@@ -60,6 +63,14 @@ async def startup():
|
||||
config_defaults()
|
||||
query_defaults()
|
||||
contratos_defaults()
|
||||
_scheduler.add_job(sync_recientes, "interval", minutes=1, id="wa_sync_recientes",
|
||||
max_instances=1, coalesce=True)
|
||||
_scheduler.start()
|
||||
|
||||
|
||||
@app.on_event("shutdown")
|
||||
async def shutdown():
|
||||
_scheduler.shutdown(wait=False)
|
||||
|
||||
|
||||
@app.get("/")
|
||||
@@ -67,12 +78,13 @@ async def root():
|
||||
return RedirectResponse(url="/dashboard")
|
||||
|
||||
|
||||
from app.routes import auth, dashboard, config, queries, terceros, transaccion, logs, automation, test_rda, debug_fb, pacientes, contratos, ventas
|
||||
from app.routes import auth, dashboard, config, queries, terceros, transaccion, logs, automation, test_rda, debug_fb, pacientes, contratos, ventas, envios
|
||||
|
||||
app.include_router(auth.router)
|
||||
app.include_router(dashboard.router)
|
||||
app.include_router(config.router)
|
||||
app.include_router(queries.router)
|
||||
app.include_router(envios.router)
|
||||
app.include_router(terceros.router)
|
||||
app.include_router(transaccion.router)
|
||||
app.include_router(logs.router)
|
||||
|
||||
Reference in New Issue
Block a user