@br-health-kit/fhir
v1.0.0
Published
Terminologia e perfis FHIR brasileiros da RNDS, com as URIs canonicas oficiais
Maintainers
Readme
@br-health-kit/fhir
Brazilian FHIR R4 terminology and profiles, extracted from the official RNDS implementation guide.
npm install @br-health-kit/fhirimport { fhir } from '@br-health-kit/fhir'
fhir.coding('cid10', 'J45', 'Asma')
// { system: 'https://rnds-fhir.saude.gov.br/CodeSystem/BRCID10',
// code: 'J45', display: 'Asma' }
fhir.identifier('cns', '700000000000000')
// { system: 'http://rnds.saude.gov.br/fhir/r4/NamingSystem/cns', value: '...' }
fhir.systemUri('tuss') // resolves the alias to the canonical URIThe value is in the canonical URIs
A FHIR resource coding a CID-10 diagnosis is only interoperable if it names the system exactly as the RNDS does. A URI off by one character produces a resource nobody can interpret, and no validator will tell you which character.
Every URI in this package comes from the official guide's package.tgz, with
checksum and version. None was transcribed from documentation or from memory.
Nobody remembers that TUSS is BRCBHPMTUSS in the RNDS guide. The aliases
(cid10, cbo, tuss, ciap2, cns, cpf, cnes) handle that; the URI
that comes out is the canonical one.
It is the bridge between the kit and FHIR
import { cid10 } from '@br-health-kit/cid10'
import { fhir } from '@br-health-kit/fhir'
const asthma = cid10.find('J45')
fhir.codeableConcept('cid10', asthma.code, asthma.description)@br-health-kit/cid10 knows the codes; this package knows how to say them in
FHIR.
An unknown system is not a guess
fhir.systemUri('doesNotExist') // null
fhir.coding('doesNotExist', 'X') // throws UnknownSystemErrorAnd identifiers are separated from code systems by construction: emitting a
patient's CNS under a code-system URI would be silently wrong, so
fhir.identifier() only accepts the three identifier systems the RNDS
declares (CNS, CPF, CNES).
What the dataset contains
| Table | Contents |
| --- | --- |
| codeSystems | 28 systems, with their concepts |
| namingSystems | 54 canonical URIs, 3 of them identifiers |
| valueSets | 25 sets and the systems they reference |
| profiles | 27 Brazilian profiles and extensions |
Limit
This package provides terminology and the profile URIs. It does not
validate a FHIR resource against a StructureDefinition. For that, use a real
FHIR validator, pointed at the profiles whose URLs are here.
Environment
Node 20+ through the default entry. For a client bundle use
@br-health-kit/fhir/web. See docs/browser.md.
Provenance
The public RNDS implementation guide, redistributed without content modification. Code under MIT.
