Skip to content
Guides · Billing

TISS XML batches: submission errors and how to avoid rejection

Why the TISS XML batch comes back before anyone reviews the claim, what each batch-level rejection in TUSS table 38 means, and how to validate the XML before sending it.

By Published on 10 min read

What is a TISS XML batch?

A TISS XML batch is the electronic message a hospital uses to bill a health plan, grouping claim forms in a single file. TISS (Troca de Informações na Saúde Suplementar, or Information Exchange in Supplementary Health) is the mandatory data exchange standard set by ANS, Brazil's National Agency for Supplementary Health, the regulator of private health plans. Its Organizational Component defines claim billing as the provider-to-health-plan message carrying a billing batch of services performed [3]. The LoteGuias message covers office visits, SP/SADT (outpatient services and diagnostic tests), inpatient summaries, professional fees and dental care [3].

Billing is a mandatory electronic exchange under TISS (Troca de Informações na Saúde Suplementar), the data exchange standard of Brazil's National Supplementary Health Agency (ANS), and Normative Resolution (RN) 501/2022 requires the exchange to use the current version (art. 7) [1]. That makes the batch the point where hospital billing leaves the hospital: everything checked on the claim has to fit a structure the health plan can read. In US terms, it plays a role similar to an 837 claim file, but with Brazil-specific rules.

This guide covers the envelope: the file, the transmission and the rejections that block review. The rules for each claim form are in the TISS claim forms guide.

Batch anatomy: what the file must contain

An accepted batch combines four elements, each defined by a component of the standard:

ElementWhat it isWhere it is defined
XML structureTags, order, types and lengths of each field, in the official schema namespaceCommunication Component: XSD and WSDL schemas [3]
Message headerIdentifies the transaction (type, date and time), sender, recipient and standard versionMessage schema; rejections in table 38 [4]
Batch bodyBatch number and the billing claim forms, with TUSS codesContent and Structure Component and TUSS [2]
EpilogueThe hash of the message content, used to check integrityOrganizational Component, item 148 [3]

The standard uses XML and requires every party to use the namespace set in the XSD schemas and WSDL descriptors when generating files [3]. The definition files are in the Communication Component package on the ANS website. tissV4_03_00.xsd holds the main message structure, and the batch submission web service is described in tissLoteGuiasV4_03_00.wsdl [3].

Health plans must offer their network both web services and a portal, and the provider chooses the channel (items 129 and 130) [3]. The file is the same either way; only the delivery method changes. The guide Healthcare interoperability: TISS, HL7 FHIR and data exchange with payers shows where TISS fits among other data exchanges.

How does the batch hash work?

The hash is a check code, written in the message epilogue, that lets the health plan confirm the content received matches what was generated. Under the Organizational Component, it is computed over the concatenated tag contents, without element and attribute names, always in ISO-8859-1 encoding, and the result goes in hexadecimal in the epilogue [3]. The same section requires the header password to be sent as an MD5 hash [3].

In practice, this has three consequences:

  • Hand-editing the XML invalidates the batch. Opening the file in a text editor and fixing a field changes the content but not the stored hash. The health plan recalculates it, and it does not match.
  • Encoding matters. If the file is saved in another encoding after it is generated, accented characters may change bytes and the hash may no longer match.
  • The fix always happens at the source. The safe path is to correct the data in the billing system and generate the batch again.

When the hash does not match, the table 38 message is 5014: “invalid hash code; message may be corrupted” [4].

Batch rejections in table 38

TUSS table 38 lists the messages health plans use in responses to providers, as well as messages for data exchange between health plans and ANS [3]. That is why not every 5000-series code applies to a hospital batch. The codes below describe file, header and totals rejections, checked in TUSS version 202607, the official ANS spreadsheet [4]. Texts are translated; the original Portuguese wording is in the source.

LayerTable 38 code and text [4]What to check
Structure5001 — Electronic message outside the TISS standardWhether the uploaded file is really the batch XML generated by the system
Structure5002 — The XML file could not be validatedValidation against the version's XSD: missing required field, wrong type or length, tag order
Structure5007 — Inconsistent or incomplete messageFile truncated during generation or transmission
Version5028 — Invalid standard versionVersion declared in the file vs. version the health plan accepts
Integrity5014 — Invalid hash code. Message may be corruptedHand edits, encoding other than ISO-8859-1
Header3148 — Invalid transaction typeTransaction type matches the batch submission message
Header5025 and 5026 — Invalid transaction date and timeFormat and consistency of the transaction date and time
Header5005 — Sender not identified · 1206 — Invalid CPF / CNPJProvider code at the health plan, CNPJ (Brazilian company tax ID)
Header5006 — Recipient not identified · 5027 — Invalid health plan ANS registrationANS registration number of the receiving health plan
Body5047 — Batch number not providedBatch number filled in
Body5015 — Number of claim forms/statements in the message exceeds the maximum allowedClaim forms per batch, within the limit set by the schema and each health plan's manual
Totals1104 — Protocol total differs from the claim forms totalSum of claim forms and amounts in the batch
Content1308 — Claim form already submittedClaim form resent in a new batch
Deadline3161 — Submission outside the contractual period agreed by the partiesSubmission date and contract deadline

Clinical and pricing rejections, which hit items inside reviewed claims, are not on this list. They are in the TISS denial codes guide, where denial (claim denial, full or partial) is explained.

Three validation layers before submission

Batch validation is simpler when it is organized in three layers, following the rejection groups in the table above. Checking a layer only pays off once the previous one passes.

Three validation layers before a TISS XML batch gets a protocolThree-layer flow: 1) structure checked against the XSD schema of the current version, codes 5001, 5002 and 5028; 2) integrity: epilogue hash in ISO-8859-1 and batch totals, codes 5014, 1104 and 1104; 3) business rules: sender, recipient, claim already submitted and deadline, codes 5005, 5027, 1308 and 3161. If all pass, the health plan issues the receipt protocol, which only proves receipt, and later sends the claim review statement. If any fails, fix it in the system and generate a new batch. Three validation layers before a TISS XML batch gets a protocolIf one layer fails, the whole batch is returned before any claim is reviewed 1. StructureFile checked against the XSDschema of the current version 5001 · 5002 · 5028 2. IntegrityEpilogue hash (ISO-8859-1)and batch totals 5014 · 1104 3. Business rulesSender, recipient,claim already submitted, deadline 5005 · 5027 · 1308 · 3161 Failed? Fix it in the system and generate a new batch Receipt protocolProves only that the batch arrived Claim review statementStatus and denials of each claim Source: ANS — TISS Organizational Component 202609 (items 47, 55, 134, 148) and TUSS table 38 (message codes).
Source: ANS — TISS standard, Organizational Component 202609 (items 47, 55, 134 and 148) and TUSS table 38 (message codes). The three layers are an editorial grouping of the rejection messages. Produced by Accrua.
  1. Structure. The file is validated against the XSD of the current version. This catches the wrong file, missing required fields, types and lengths outside the schema and an unaccepted standard version.
  2. Integrity. The epilogue hash is recalculated and batch totals are checked against the sum of the claim forms.
  3. Business rules. The health plan checks sender, recipient, batch number, claim forms already submitted and the submission deadline, plus contract rules.

XSD validation can be done in the hospital before sending, with the official schemas published by ANS [3]. The second layer depends on the system generating the hash last and nobody editing the file afterward. The third requires correct provider and health plan records and tracking of claims already sent.

Why the standard version rejects the whole batch

The version rejection (5028) returns the whole batch because the health plan validates the file against the schema of the version it accepts. RN 501/2022 requires exchange in the current version [1], and each component of the standard has its own version. In September 2026 they were [2]:

ComponentCurrent version (Sep 2026)What it changes in the batch
Organizational202609Submission rules, protocol, hash
Content and Structure202511Fields and structure of claim forms
TUSS (terminology)202607Codes on the claim forms
Security and Privacy202511Confidentiality and certificate requirements
Communication04.03.00 and 01.06.00XSD and WSDL schemas the file must follow

The schema version (04.03.00) appears in the XSD and WSDL file names. ANS publishes the standard in dated packages, and the table of current versions should be checked on the TISS standard page at each new release. Each component is covered in the TISS standard guide.

Staying on the current version also has contractual effects. Under RN 503/2022, the prohibitions that guarantee providers access to the reasons for each denial and the right to contest it only apply when billing uses the current TISS standard (art. 5, sole paragraph) [5]. And one of the level C requirements of the ANS Quality Factor (Fator de Qualidade, a multiplier on hospital contract adjustments) is having at least 75% of claim forms on the current TISS version [6].

Receipt protocol: what it proves and what it does not

The protocol is the number the health plan issues on receiving a batch. It is the proof of receipt the standard sets for claim batches, attachment batches and denial appeals [3]. It comes with the list of claim form numbers sent by the provider and, where applicable, the numbers assigned by the health plan [3].

The protocol does not mean the claims were accepted. After it, the standard provides for a protocol status request and a response with the status of every claim form, plus a request to cancel a batch, claim form or appeal already sent [3]. The review comes in the claim review statement (demonstrativo de análise de conta), covered in the Claim review and payment statements guide.

Two practical rules follow:

  • Keep the protocol and the file together. The protocol number, the XML sent and the date are the proof of on-time submission.
  • Cancel before resubmitting. Resending a claim form that is already under another protocol can trigger rejection 1308 (claim form already submitted) [4]. The standard provides a cancellation message for claim forms or batches for this case [3].

What we see in our operations

At Accrua, XML batch validation is one of the steps that Accrua OS agents carry out on their own, because it has a defined rule: the schema for the current version, structure, hash and required fields. The batch is checked before submission, and the receipt protocol is tracked until it arrives.

We separate the two kinds of problem this guide distinguishes. A file-level rejection, such as XML outside the TISS standard, an invalid hash or the wrong version, sends the whole batch back and delays the protocol. Content denials come later, in the remittance statement, form by form. Accrua OS reconciles that statement and ties each denial to the item and to the health plan's rule.

Because the hash stops matching when a field changes after the file is generated, we fix the data at the source and generate the batch again instead of editing the file. When a health plan moves to a new version of the standard, its validation rule is updated before the next submission.

Where to start

  1. Validate every batch against the official XSD of the current version before sending, using the Communication Component schemas published by ANS.
  2. Forbid hand-editing the XML. Every fix goes back to the billing system, and the batch is regenerated with a new hash.
  3. Log each rejection by code and health plan, separating file (5001, 5002, 5014, 5028) from header, totals and claim form.
  4. Archive the protocol, file and date of each batch, and track claim forms by protocol so nothing is resubmitted without cancellation.
  5. Track the version table on the ANS TISS standard page and confirm with each health plan the cutoff date for the previous version.

Frequently asked questions about TISS XML batches

What does error 5014 mean in a TISS XML batch?

It is the TUSS table 38 message “invalid hash code; message may be corrupted”. The hash the health plan calculates does not match the one in the epilogue, usually because the file was changed or saved in another encoding after it was generated. The fix is to generate the batch again from the system.

What should I do when a batch returns “invalid standard version”?

Code 5028 means the file was generated in a version the health plan does not accept. Check the current version on the ANS TISS standard page, update the system and generate the batch again in the right version.

How do I validate a TISS XML file before sending it?

Validate it against the official XSD schemas of the current version, published by ANS in the Communication Component package. Then check the hash, totals, header and claim forms already sent.

Does the receipt protocol mean the claim was accepted?

No. The protocol only proves the health plan received the batch. The status of each claim form and any denials come later, in the claim review statement.

Can I fix the XML file in a text editor?

It is not advisable. The epilogue hash is computed over the field content, and changing that content later invalidates it. Fix the data in the system and generate a new batch.

What is the difference between a batch rejection and a denial?

A batch rejection blocks review of the entire file, before the health plan looks at the claim forms. A denial is a refusal to pay an item or a reviewed claim form, reported in the statement with a table 38 code.

Sources

  1. ANS — Resolução Normativa nº 501, de 30 de março de 2022 (Normative Resolution 501 of March 30, 2022 — TISS standard), art. 7.
  2. ANS — Padrão TISS – Setembro/2026 (TISS standard, September 2026: current component versions; published 09/30/2026, updated 10/06/2026).
  3. ANS — Padrão TISS: Componente Organizacional, versão 202609 (TISS Organizational Component, version 202609), items 33, 47, 55, 102–104, 128–134, 138–142, 147–149, 152 and 157.
  4. ANS — Terminologia TUSS, tabela 38 (TUSS terminology, table 38: messages), version 202607, official ANS “Demais terminologias” spreadsheet, checked on 10/18/2026.
  5. ANS — Resolução Normativa nº 503, de 30 de março de 2022 (Normative Resolution 503 — contracts between health plans and providers), art. 5, sole paragraph.
  6. ANS — Critérios do Fator de Qualidade (Quality Factor criteria for hospitals), level C.