---
title: "valueset"
description: "One row per coded field in the schema."
---

One row per coded field in the schema.

## Source

| Model | Leg | Role |
|---|---|---|
| `valueset` | openEHR | defines this table |

Every coded column group names a value set here. openEHR value sets are minted per archetype field, so the id carries the archetype and the field (`org.openehr::openEHR-EHR-OBSERVATION.blood_pressure.v2/position`); FHIR value sets keep their canonical URL.

## Columns

| Column | Type | Null | Description | Source |
|---|---|---|---|---|
| `id` | `text primary key` | no | Value set identifier — an archetype-scoped id or a FHIR canonical URL. | — |
| `version` | `text` | yes | Major version of the archetype that minted it, where it came from openEHR. | — |
| `name` | `text` | no | Human-readable name, unique across the schema. | — |
| `description` | `text` | yes | — | — |
| `created_at` | `timestamptz` | no | Row creation timestamp. | — |
| `updated_at` | `timestamptz` | no | Row update timestamp; maintained by the application. | — |
| `created_by` | `text` | no | Actor who created the row. | — |
| `updated_by` | `text` | no | Actor who last updated the row. | — |

## Unique

- `name`

## Referenced by

- [`valueset_code`](/docs/tables/valueset_code) via `value_set_id`

## Definition

```sql
create table valueset (
    id text primary key,
    version text,
    name text not null unique,
    description text,
    created_at timestamptz not null default current_timestamp,
    updated_at timestamptz not null default current_timestamp,
    created_by text not null,
    updated_by text not null
);
```

