TISS & Glosa Prevention
TISS & Glosa Prevention
DELPHOS is designed to prevent glosas (payment denials from health insurances) by enforcing billing accuracy at every step of the workflow — from contract configuration through pricing calculation to guide submission.
What is a Glosa?
A glosa is a payment denial issued by a health insurance company when a billing guide contains discrepancies. Common causes include:
| Cause | Description |
|---|---|
| Wrong price | Billing at current prices instead of event-date prices |
| Missing authorization | Procedure requires prior authorization not recorded |
| Invalid TUSS code | Procedure code not recognized or deprecated |
| Expired contract | Billing under a contract period that has ended |
| Copay mismatch | Patient copay calculated incorrectly |
| Missing card number | Insurance card number not provided when required |
Glosas result in delayed or lost revenue. Even when successfully appealed (recurso), the clinic loses months of cash flow while the insurance holds the funds interest-free.
How DELPHOS Prevents Glosas
DELPHOS addresses glosa prevention through four layers of validation:
Layer 1: Temporal Pricing
Every price query is resolved against the contract period active on the event date, not the billing date. This prevents the most expensive category of glosas — wrong-price denials.
POST /v1/scheduling/pricing/calculate{ "convenio_id": "...", "appointment_type_id": "...", "procedure_codes": ["10101012"], "event_date": "2026-01-15"}The pricing engine automatically finds the contract period whose validity range contains January 15, even if the billing is submitted months later. See Pricing Queries for details.
Layer 2: Eligibility Validation
Before booking an appointment, DELPHOS validates that the provider accepts the patient’s convenio and that the appointment type is covered.
POST /v1/scheduling/convenio/validateThis endpoint checks:
- Provider is linked to the convenio
- Convenio is active
- Appointment type is accepted under the convenio
- Authorization requirements are met
- Card number requirements are satisfied
Booking with an ineligible convenio is caught before the appointment happens, not after billing.
Layer 3: Contract Period Immutability
Active and closed contract periods are immutable. Once a period is activated, its pricing configuration cannot be changed — only superseded through a reajuste that creates a new period.
This guarantees that:
- Historical prices are preserved exactly as they were
- Billing audits can always reproduce the exact price that was charged
- Snapshots provide a complete record for dispute resolution
GET /v1/scheduling/convenios/{convenio_id}/contracts/{period_id}/snapshotLayer 4: Medical Knowledge Validation
DELPHOS maintains a medical knowledge base sourced from authoritative registries — CBHPM procedure tables, TUSS procedure codes, TISS billing references, and ANVISA medication data. The platform validates procedure codes against these sources during eligibility checks and pricing calculations, catching invalid or deprecated codes before they reach a billing guide.
TISS Compliance Architecture
DELPHOS stores all the data required for TISS XML guide generation:
Data captured per appointment
| Data Point | Source | TISS Field |
|---|---|---|
| Patient insurance card | Convenio validation | Carteirinha |
| Provider ANS code | Provider profile | Prestador |
| Insurance ANS code | Convenio record | Operadora |
| TUSS procedure codes | Medical knowledge | Procedimento |
| CBHPM pricing | Pricing engine | Valor |
| Authorization code | Appointment metadata | Autorizacao |
| Event date/time | Appointment record | Data/Hora |
TISS guide types
| Guide | Portuguese | Purpose |
|---|---|---|
| Consultation | Guia de Consulta | Standard office visits |
| SP/SADT | Guia SP/SADT | Procedures, exams, therapies |
| Hospitalization | Guia de Internacao | Hospital admissions |
| Summary | Resumo de Internacao | Discharge summaries |
Glosa Prevention Checklist
Use this checklist when configuring a new convenio to minimize glosa risk:
-
Create the convenio with the correct ANS code and payment type.
-
Set card and authorization requirements — enable
requires_card_numberandrequires_authorizationto match the insurance’s rules. -
Create a contract period with the correct CBHPM table version and percentage from the insurance contract.
-
Add procedure overrides for any procedures with negotiated prices that differ from the CBHPM table.
-
Configure copay rules — set
copay_enabled,default_copay_percent, anddefault_copay_max_centsto match the contract terms. -
Link providers — ensure every provider who sees patients with this convenio is linked via the provider-convenio endpoint.
-
Activate the contract period — only activated periods are used for pricing calculations.
-
Test with the estimate endpoint — verify prices match expected values before going live.
Audit Trail
Every contract change is recorded in an immutable change log:
GET /v1/scheduling/convenios/{convenio_id}/contracts/{period_id}/changelogThe change log captures:
- Who made the change
- What was changed (previous and new values)
- When it was changed
- Which database table was affected
This audit trail is essential for glosa disputes — it proves exactly what pricing configuration was in effect on any given date.
Pricing Resolution Example
To demonstrate how DELPHOS prevents glosas through correct pricing:
import httpxfrom datetime import date
# Step 1: Validate eligibility before bookingeligibility = httpx.post( "https://your-instance.delphos.app/v1/scheduling/convenio/validate", headers={"x-api-key": "YOUR_API_KEY"}, json={ "provider_profile_id": provider_id, "convenio_id": convenio_id, "appointment_type_id": type_id, },).json()
if not eligibility.get("eligible"): print("Cannot book: convenio not accepted") raise SystemExit(1)
# Step 2: Get binding price for the event datepricing = httpx.post( "https://your-instance.delphos.app/v1/scheduling/pricing/calculate", headers={"x-api-key": "YOUR_API_KEY"}, json={ "convenio_id": convenio_id, "appointment_type_id": type_id, "procedure_codes": ["10101012"], "event_date": str(date(2026, 3, 15)), },).json()
print(f"Total: R$ {pricing['total_price_cents'] / 100:.2f}")print(f"Source: {pricing['pricing_source']}")print(f"Period: {pricing['contract_period_id']}")
# Step 3: Retrieve snapshot for billing auditsnapshot = httpx.get( f"https://your-instance.delphos.app/v1/scheduling/convenios/{convenio_id}" f"/contracts/{pricing['contract_period_id']}/snapshot", headers={"x-api-key": "YOUR_API_KEY"},).json()
print(f"CBHPM version: {snapshot['cbhpm_table_version']}")print(f"Overrides: {len(snapshot['overrides'])}")# Step 1: Validate eligibilitycurl -X POST "https://your-instance.delphos.app/v1/scheduling/convenio/validate" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "provider_profile_id": "PROVIDER_UUID", "convenio_id": "CONVENIO_UUID", "appointment_type_id": "TYPE_UUID" }'
# Step 2: Calculate binding pricecurl -X POST "https://your-instance.delphos.app/v1/scheduling/pricing/calculate" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "convenio_id": "CONVENIO_UUID", "appointment_type_id": "TYPE_UUID", "procedure_codes": ["10101012"], "event_date": "2026-03-15" }'
# Step 3: Get snapshot for auditcurl "https://your-instance.delphos.app/v1/scheduling/convenios/CONVENIO_UUID/contracts/PERIOD_UUID/snapshot" \ -H "x-api-key: YOUR_API_KEY"Error Handling
| Code | Meaning |
|---|---|
200 | Validation or query successful |
404 | Convenio, provider, or period not found |
422 | Ineligible convenio, no resolvable price, or invalid procedure code |
500 | Internal server error |
All errors return a structured response:
{ "detail": "No price resolvable for procedure 10101012 in contract period ..."}