Hospital Admission Authorization (AIH) Validator

Quickly and easily validate your Hospital Admission Authorization (AIH)! Our AIH validator ensures the authenticity of the provided number, confirming that it is valid and error-free. If you need to generate a new AIH, try our Hospital Admission Authorization generator.

This tool generates fictitious data intended exclusively for software testing and development purposes. The data does not correspond to real people or entities and must not be used for illegal, fraudulent purposes, or in ways that violate the privacy of others. Compliant with LGPD (Brazilian Data Protection Law).

How AIH Validation Works

What does the validator check?

The Help4Dev AIH validator checks whether a Hospital Admission Authorization number has correct structural fields and whether the check digit is mathematically consistent with the Ministry of Health algorithm. It verifies the state code (first 2 digits), year of competence, AIH type (1 or 5), and the check digit calculated with specific weights and modulus 11.

When is an AIH considered invalid?

An AIH is invalid when: (1) it does not have 13 digits; (2) the state code does not correspond to a valid Brazilian state; (3) the AIH type (digit 5 of the number) is not 1 (normal) or 5 (extended stay); (4) the check digit (last) does not match the calculation with weights 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, and 5 and modulus 11.

Why validate AIH in development?

SUS hospital billing systems, medical billing audit platforms, and DATASUS integrations need to validate AIHs to ensure billing data integrity. Developing and testing these applications without real patient AIHs is fundamental to protecting sensitive health information. The Help4Dev validator allows this verification safely and efficiently.