Qubiclo is a multi-tenant, event-driven adjudication platform. Each claim flows through a deterministic pipeline — document ingestion, fraud analysis, pricing validation, rules execution — before a final decision is emitted and an immutable audit record is written.
Intake & Validation
syncClaim received via REST API, schema validated, idempotency key checked, persisted with status=queued.
Document Ingestion
asyncSupporting documents scanned with ClamAV, OCR-extracted with Tesseract, and attached to the claim.
Fraud Analysis
asyncML-based fraud scoring, duplicate detection, provider velocity checks, and pricing anomaly detection.
Pricing Validation
asyncClaimed amount validated against active provider contract rates and configured pricing schedules.
Policy Reasoning (RAG)
asyncRAG pipeline queries policy rulebooks via pgvector embeddings; deterministic rules engine evaluates coverage.
Workflow Routing
syncAPPROVED claims auto-close; FLAGGED/BLOCKED enter manual review queue.
Webhook Dispatch
asyncFinal decision posted to tenant-configured webhook URL with HMAC-SHA256 signature.
API Layer
FastAPI with OpenAPI auto-docs, request validation, JWT auth, and rate limiting.
Database
PostgreSQL with pgvector extension for semantic search. SQLAlchemy ORM with Alembic migrations.
Task Queue
Celery workers process claim analysis asynchronously. Redis used as message broker.
AI / LLM
Ollama hosts local LLMs (llama3.2) for policy reasoning. Sentence transformers generate embeddings.
Security
RS256 JWT tokens, bcrypt password hashing, RBAC with permission scopes, PHI scrubbing.
Observability
Structured JSON logging. Audit events written transactionally — records are immutable.
All claim data is tenant-scoped from ingestion to storage. Row-level security (RLS) on PostgreSQL ensures no cross-tenant data leakage. Audit events are written synchronously in the same DB transaction as the claim mutation.
Idempotency
Claim submissions accept an idempotency key to prevent duplicate processing on retries.
Async Processing
Heavy work (OCR, LLM, fraud) runs in Celery workers so the API responds immediately.
Retry Logic
Failed tasks auto-retry with exponential backoff. Dead-letter queue captures persistent failures.
Audit Immutability
Audit records written in the same transaction — no state change without a log entry.
Tenant Isolation
Every DB query is tenant-scoped. No shared state between tenants at the data layer.
Health Checks
GET /health endpoint checks DB, Redis, and Ollama connectivity.