{"_id":"@br-health-kit/tuss","name":"@br-health-kit/tuss","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@br-health-kit/tuss","version":"1.0.0","description":"TUSS - Terminologia Unificada da Saude Suplementar, tipada e versionada","license":"MIT","engines":{"node":">=20"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./web":{"types":"./dist/web.d.ts","import":"./dist/web.js","require":"./dist/web.cjs"},"./data/*":"./data/*"},"dependencies":{"@br-health-kit/core":"1.0.0"},"publishConfig":{"access":"public"},"keywords":["tuss","tiss","ans","procedimentos","saude suplementar","brasil"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-health-kit.git","directory":"packages/tuss"},"homepage":"https://github.com/arielff3/br-health-kit/tree/main/packages/tuss#readme","bugs":{"url":"https://github.com/arielff3/br-health-kit/issues"},"scripts":{"build":"tsup","clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""},"_id":"@br-health-kit/tuss@1.0.0","_integrity":"sha512-RsE6vJtFDwu9G7GnQ/XiD5Ma/fXZWZVuFpcST4fXCvGWWvnItlVjF/CBzEgYC+cBrMeG+FYfE0O2VW0RF02Edw==","_resolved":"C:\\Users\\ariel\\AppData\\Local\\Temp\\3ef747a04936621136b9b985b396b303\\br-health-kit-tuss-1.0.0.tgz","_from":"file:br-health-kit-tuss-1.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-RsE6vJtFDwu9G7GnQ/XiD5Ma/fXZWZVuFpcST4fXCvGWWvnItlVjF/CBzEgYC+cBrMeG+FYfE0O2VW0RF02Edw==","shasum":"9de9886dde68d48a70a65b7c66fb8be571d2c707","tarball":"https://registry.npmjs.org/@br-health-kit/tuss/-/tuss-1.0.0.tgz","fileCount":26,"unpackedSize":26245962,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD3Y1Nylp+CCwt/YIy1qwJ+ZtI6CEin9d4kTiPwUpeIcwIhAJ1SXG/Z+6Y3fA/MKcNm6c5AOGoSRyNw8fTlUi+33MTS"}]},"_npmUser":{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"},"directories":{},"maintainers":[{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tuss_1.0.0_1787770234853_0.7437054131663237"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T18:50:34.697Z","1.0.0":"2026-08-26T18:50:35.075Z","modified":"2026-08-26T18:50:35.305Z"},"maintainers":[{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"}],"description":"TUSS - Terminologia Unificada da Saude Suplementar, tipada e versionada","homepage":"https://github.com/arielff3/br-health-kit/tree/main/packages/tuss#readme","keywords":["tuss","tiss","ans","procedimentos","saude suplementar","brasil"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-health-kit.git","directory":"packages/tuss"},"bugs":{"url":"https://github.com/arielff3/br-health-kit/issues"},"license":"MIT","readme":"# @br-health-kit/tuss\n\nTUSS, the Terminologia Unificada da Saúde Suplementar published by ANS, typed\nand versioned.\n\n```bash\nnpm install @br-health-kit/tuss\n```\n\n```ts\nimport { tuss } from '@br-health-kit/tuss'\n\ntuss.findProcedure('10101012')\n// { code: '10101012', name: 'Consulta em consultório (...)', table: 22, ... }\n\ntuss.search('consulta')          // across every billable table\ntuss.searchProcedures('consulta')\ntuss.isValid('10101012')\ntuss.isActive('10101012')                // in force today\ntuss.isActive('10101012', '2000-01-01')  // false, it did not exist yet\n```\n\n## TUSS is not one table, it is a family\n\n| Table | Contents | Accessor |\n| --- | --- | --- |\n| 18 | Daily rates, taxes and gases | `tuss.dailyRates()` |\n| 19 | Materials and OPME | `tuss.materials()` |\n| 20 | Medications | `tuss.medications()` |\n| 22 | Procedures and health events | `tuss.procedures()` |\n| 24 | Health occupations (a CBO subset) | `tuss.occupations()` |\n| others | TISS controlled vocabularies | `tuss.terminology(n)` |\n\nThe thirteen small tables (sex, admission type, discharge reason and so on)\nare exposed through `tuss.terminology(43)` rather than thirteen separate\naccessors: together they are only a few hundred rows.\n\n## Validity matters\n\nA code existing does not mean it is valid for the guide's competence period.\nAn expired code is a common cause of rejected billing, so existence and\nvalidity are separate questions:\n\n```ts\ntuss.isValid(code)                 // exists in the table\ntuss.isActive(code, '2026-01-15')  // was in force on that date\n```\n\n## Table 64 is not published\n\nThe \"envio de dados para ANS\" table ships in the official ZIP with a malformed\nheader, `\"DT_INICIO_VIGENCIA;` with an unterminated quote, which merges two\ncolumn names and makes all 67,759 rows lose their last value silently.\n\nPublishing it would mean publishing shifted data, exactly what this project\nexists to prevent. The pipeline detects and refuses it; it will be included\nwhen ANS fixes the source. See [`docs/decisions.md`](../../docs/decisions.md).\n\n## Size and loading\n\nThe package ships around 25 MB of data, 21 MB of which is materials and OPME.\nTables are read from disk **on demand**: looking up a procedure reads under\n1 MB and never touches the materials table.\n\n## Environment\n\nNode 20+ through the default entry. For a client bundle use\n`@br-health-kit/tuss/web`. See [`docs/browser.md`](../../docs/browser.md).\n\n## Provenance\n\nANS open data (PDA 049), redistributed without content modification. Code\nunder MIT.\n","readmeFilename":"README.md","_rev":"1-70b558edaa54647bb3dfab3998bcc306"}