---
id: "cupscode"
kind: "datatype"
status: "stable"
is_pii: false
categories: ["medical"]
country: ["ES"]
langs: ["es"]
quality: 65
url: "http://registry.apicrafter.io/datatype/cupscode"
---

# Código CUP/CUPS según el nombre del campo (`cupscode`)

ES datatype for 'Código CUP/CUPS según el nombre del campo' (cupscode) from rules in context 'medical'. CUPS (Catálogo Único de Procedimientos Sanitarios) codes are used in Spain to identify medical procedures. Format: 5 digits (3+2) optionally followed by a dot and 2-3 additional digits.

- Personal data (PII): no
- Categories: Medical/pharma identifiers (medical)
- Countries: Spain (ES)
- Languages: Spanish (es)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[0-9]{3}[0-9]{2}(\.[0-9]{2,3})?$
```

## Examples

- `12345` — CUPS code with 5 digits (3+2 format)
- `12345.67` — CUPS code with 5 digits and 2-digit extension
- `12345.678` — CUPS code with 5 digits and 3-digit extension

## Metacrafter rules

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

- `escupfield` (field, `es/es_med.yaml`)
- `escupvalue` (data, `es/es_med.yaml`)

## Supported by tools

- `metacrafter`
- `pythonstdnum`

## Quality

Score 65/100. Missing: negative example, source link, mapping (Wikidata, Schema.org, ...), translation.

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