@br-health-kit/tuss
v1.0.0
Published
TUSS - Terminologia Unificada da Saude Suplementar, tipada e versionada
Maintainers
Readme
@br-health-kit/tuss
TUSS, the Terminologia Unificada da Saúde Suplementar published by ANS, typed and versioned.
npm install @br-health-kit/tussimport { tuss } from '@br-health-kit/tuss'
tuss.findProcedure('10101012')
// { code: '10101012', name: 'Consulta em consultório (...)', table: 22, ... }
tuss.search('consulta') // across every billable table
tuss.searchProcedures('consulta')
tuss.isValid('10101012')
tuss.isActive('10101012') // in force today
tuss.isActive('10101012', '2000-01-01') // false, it did not exist yetTUSS is not one table, it is a family
| Table | Contents | Accessor |
| --- | --- | --- |
| 18 | Daily rates, taxes and gases | tuss.dailyRates() |
| 19 | Materials and OPME | tuss.materials() |
| 20 | Medications | tuss.medications() |
| 22 | Procedures and health events | tuss.procedures() |
| 24 | Health occupations (a CBO subset) | tuss.occupations() |
| others | TISS controlled vocabularies | tuss.terminology(n) |
The thirteen small tables (sex, admission type, discharge reason and so on)
are exposed through tuss.terminology(43) rather than thirteen separate
accessors: together they are only a few hundred rows.
Validity matters
A code existing does not mean it is valid for the guide's competence period. An expired code is a common cause of rejected billing, so existence and validity are separate questions:
tuss.isValid(code) // exists in the table
tuss.isActive(code, '2026-01-15') // was in force on that dateTable 64 is not published
The "envio de dados para ANS" table ships in the official ZIP with a malformed
header, "DT_INICIO_VIGENCIA; with an unterminated quote, which merges two
column names and makes all 67,759 rows lose their last value silently.
Publishing it would mean publishing shifted data, exactly what this project
exists to prevent. The pipeline detects and refuses it; it will be included
when ANS fixes the source. See docs/decisions.md.
Size and loading
The package ships around 25 MB of data, 21 MB of which is materials and OPME. Tables are read from disk on demand: looking up a procedure reads under 1 MB and never touches the materials table.
Environment
Node 20+ through the default entry. For a client bundle use
@br-health-kit/tuss/web. See docs/browser.md.
Provenance
ANS open data (PDA 049), redistributed without content modification. Code under MIT.
