{"_id":"@br-health-kit/fhir","name":"@br-health-kit/fhir","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@br-health-kit/fhir","version":"1.0.0","description":"Terminologia e perfis FHIR brasileiros da RNDS, com as URIs canonicas oficiais","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":["fhir","rnds","hl7","interoperabilidade","saude","brasil"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-health-kit.git","directory":"packages/fhir"},"homepage":"https://github.com/arielff3/br-health-kit/tree/main/packages/fhir#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/fhir@1.0.0","_integrity":"sha512-ac33H3olEP7QlkQbi78pk2rvZyidx0l9D538xRV8/xHnyEeN5NKKowl1ps6H2x6HTeAvbsQ/OhP0sZxJHcyubQ==","_resolved":"C:\\Users\\ariel\\AppData\\Local\\Temp\\d2951de973fe3b693696ebaac1f608cf\\br-health-kit-fhir-1.0.0.tgz","_from":"file:br-health-kit-fhir-1.0.0.tgz","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ac33H3olEP7QlkQbi78pk2rvZyidx0l9D538xRV8/xHnyEeN5NKKowl1ps6H2x6HTeAvbsQ/OhP0sZxJHcyubQ==","shasum":"5f4328187ef9706608ca72e2757462fd8aae1572","tarball":"https://registry.npmjs.org/@br-health-kit/fhir/-/fhir-1.0.0.tgz","fileCount":24,"unpackedSize":852930,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDCKHNQXQe5gfO6dEFWAPGzKnY5Z4brqXDnEN8m+iubaQIhAKYSC5i4PjS2NxvGie/443t/XFwwnHfuc9fDN0KanQ4W"}]},"_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/fhir_1.0.0_1787770221750_0.188274400251363"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-26T18:50:21.551Z","1.0.0":"2026-08-26T18:50:21.985Z","modified":"2026-08-26T18:50:22.449Z"},"maintainers":[{"name":"arielff03","email":"arielfrancoferreira5@gmail.com"}],"description":"Terminologia e perfis FHIR brasileiros da RNDS, com as URIs canonicas oficiais","homepage":"https://github.com/arielff3/br-health-kit/tree/main/packages/fhir#readme","keywords":["fhir","rnds","hl7","interoperabilidade","saude","brasil"],"repository":{"type":"git","url":"git+https://github.com/arielff3/br-health-kit.git","directory":"packages/fhir"},"bugs":{"url":"https://github.com/arielff3/br-health-kit/issues"},"license":"MIT","readme":"# @br-health-kit/fhir\n\nBrazilian FHIR R4 terminology and profiles, extracted from the official\n**RNDS** implementation guide.\n\n```bash\nnpm install @br-health-kit/fhir\n```\n\n```ts\nimport { fhir } from '@br-health-kit/fhir'\n\nfhir.coding('cid10', 'J45', 'Asma')\n// { system: 'https://rnds-fhir.saude.gov.br/CodeSystem/BRCID10',\n//   code: 'J45', display: 'Asma' }\n\nfhir.identifier('cns', '700000000000000')\n// { system: 'http://rnds.saude.gov.br/fhir/r4/NamingSystem/cns', value: '...' }\n\nfhir.systemUri('tuss')   // resolves the alias to the canonical URI\n```\n\n## The value is in the canonical URIs\n\nA FHIR resource coding a CID-10 diagnosis is only interoperable if it names\nthe system **exactly** as the RNDS does. A URI off by one character produces a\nresource nobody can interpret, and no validator will tell you which character.\n\nEvery URI in this package comes from the official guide's `package.tgz`, with\nchecksum and version. None was transcribed from documentation or from memory.\n\nNobody remembers that TUSS is `BRCBHPMTUSS` in the RNDS guide. The aliases\n(`cid10`, `cbo`, `tuss`, `ciap2`, `cns`, `cpf`, `cnes`) handle that; the URI\nthat comes out is the canonical one.\n\n## It is the bridge between the kit and FHIR\n\n```ts\nimport { cid10 } from '@br-health-kit/cid10'\nimport { fhir } from '@br-health-kit/fhir'\n\nconst asthma = cid10.find('J45')\nfhir.codeableConcept('cid10', asthma.code, asthma.description)\n```\n\n`@br-health-kit/cid10` knows the codes; this package knows how to say them in\nFHIR.\n\n## An unknown system is not a guess\n\n```ts\nfhir.systemUri('doesNotExist')     // null\nfhir.coding('doesNotExist', 'X')   // throws UnknownSystemError\n```\n\nAnd identifiers are separated from code systems by construction: emitting a\npatient's CNS under a code-system URI would be silently wrong, so\n`fhir.identifier()` only accepts the three identifier systems the RNDS\ndeclares (CNS, CPF, CNES).\n\n## What the dataset contains\n\n| Table | Contents |\n| --- | --- |\n| `codeSystems` | 28 systems, with their concepts |\n| `namingSystems` | 54 canonical URIs, 3 of them identifiers |\n| `valueSets` | 25 sets and the systems they reference |\n| `profiles` | 27 Brazilian profiles and extensions |\n\n## Limit\n\nThis package provides terminology and the profile URIs. It does **not**\nvalidate a FHIR resource against a `StructureDefinition`. For that, use a real\nFHIR validator, pointed at the profiles whose URLs are here.\n\n## Environment\n\nNode 20+ through the default entry. For a client bundle use\n`@br-health-kit/fhir/web`. See [`docs/browser.md`](../../docs/browser.md).\n\n## Provenance\n\nThe public RNDS implementation guide, redistributed without content\nmodification. Code under MIT.\n","readmeFilename":"README.md","_rev":"1-a36c2c45ec8ca41bd3c6174e245aa55d"}