valueset_code

The codes a value set admits, with the display text that must accompany them.

The codes a value set admits, with the display text that must accompany them.

Source

ModelLegRole
valueset_codeopenEHRdefines this table

A coded column group carries a four-column foreign key into this table on (value_set_id, code, system, text). Including the text in the key is deliberate: the display string stored on the row has to be one the value set actually defines, so a row cannot claim at1001 means "standing" when the value set says "Standing".

Columns

ColumnTypeNullDescriptionSource
value_set_idtextnoThe value set this code belongs to.
codetextnoThe code itself — an at-code for openEHR, a terminology code for FHIR.
systemtextnoCode system the code is drawn from.
texttextnoDisplay text. Part of the key, so a stored row must use the text defined here.
descriptiontextyes
numericnumericyesOrdinal value, where the archetype defines one (scales and scores).
preferredbooleannoWhether this is the preferred term for the code.

Primary key: value_set_id, code, system, text

Unique

References

ColumnsTargetOn delete
value_set_idvaluesetcascade

Referenced by

868 tables reference valueset_code, via reason_for_absence_valueset_id, reason_for_absence_code, reason_for_absence_system, reason_for_absence. The first 15 alphabetically:

Definition

create table valueset_code (
    value_set_id text not null references valueset (id) on delete cascade,
    code text not null,
    system text not null,
    text text not null,
    description text,
    numeric numeric,
    preferred boolean not null default false,
    primary key (value_set_id, code, system, text),
    unique (value_set_id, code, system, text, numeric)
);