---
id: "br_cnes"
kind: "datatype"
status: "draft"
is_pii: false
name: "Brazilian health establishment code (CNES)"
regexp: "^\\d{7}$"
categories: ["medical", "government"]
country: ["BR"]
langs: ["pt"]
quality: 90
url: "https://registry.apicrafter.io/datatype/br_cnes"
---

# Brazilian health establishment code (CNES) (`br_cnes`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

The seven-digit number of a health establishment (a hospital, clinic, laboratory or primary care unit) in the Cadastro Nacional de Estabelecimentos de Saúde of the Ministry of Health (2446480, 0000957). DATASUS, the SUS programmes and the surveys of primary care units (PMAQ) identify the units by it (CNES, CO_CNES, CNESFINAL); spreadsheets drop the leading zeros (957) and statistics packages add a decimal part (2446480.0). The number has no check digit.

- Parent datatype: [`id`](https://registry.apicrafter.io/datatype/id.md)
- Personal data (PII): no
- Categories: Medical/pharma identifiers (medical), Government related (government)
- Countries: Brazil (BR)
- Languages: Portuguese (pt)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\d{7}$
```

## Examples

- `2446480` — a primary care unit of the PMAQ survey (Bom Jesus do Norte)
- `0000957` — a primary care unit of the PMAQ survey, with its leading zeros
- `24464800` (invalid example) — eight digits

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `brcnesbyname` (field, `br/br_health.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- pt: Código CNES do estabelecimento de saúde
- ru: Код медицинского учреждения Бразилии (CNES)

## Sources

- doc: <https://cnes.datasus.gov.br/>
- wikipedia: <https://pt.wikipedia.org/wiki/Cadastro_Nacional_de_Estabelecimentos_de_Sa%C3%BAde>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/br_cnes.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/BR/medical/br_cnes.yaml>
