Skip to content

tables

Table models: server-DEFINED tables.

Like the chart models, the API computes presentation once — labels, units, formatted values, and semantic status — and every renderer (report pages, export documents) draws the same table from the same model. Clients never re-derive formatting or clinical semantics.

The relevance layering is contract: semantics live here; the CURATED DEFAULT (which columns/rows are the "summary" set) ships as overridable data via summary flags — the payload always carries everything; the user's own selection, held client-side, always wins.

TableCell pydantic-model

Bases: BaseModel

One cell: raw value for machines, formatted text for humans.

Fields:

detail = None pydantic-field

The value at full precision with its unit, for hover text, where text rounds it (e.g. '1h 35m 12s' behind '1h 35m'). None where text is exact.

status = None pydantic-field

Semantic status token ('caution'/'danger'); None = neutral. Consumers resolve to brand colors; unknown tokens render neutral.

text pydantic-field

The display string, formatted server-side.

value = None pydantic-field

Raw value (tooltips, sorting, data-*).

TableColumn pydantic-model

Bases: BaseModel

One column: identity, labeling, and the curated-default flag.

Fields:

align = 'right' pydantic-field

Cell alignment: 'left' for text, 'right' for numerals.

description = None pydantic-field

Optional plain-language definition of the column's metric, for hover/tooltip text.

key pydantic-field

Stable column identity (e.g. a metric key).

label pydantic-field

Header text.

summary = True pydantic-field

Whether this column belongs to the curated default set — a HINT; every column always ships and the user's client-side selection always wins.

unit = None pydantic-field

Unit suffix (e.g. 'min', '%'); None = unitless.

TableModel pydantic-model

Bases: BaseModel

A fully server-defined table.

key uses the report section-key vocabulary (report_export module), so layout documents and exports address tables the same way pages do.

Fields:

columns pydantic-field

Column order is display order.

key pydantic-field

Stable table identity (section-key grammar).

rows pydantic-field

Row order is display order.

subtitle = '' pydantic-field

Optional subheading.

title pydantic-field

Human-readable table heading.

total_rows = None pydantic-field

Total rows in the underlying data when rows is a server-capped excerpt; renderers should show 'rows of total_rows' and offer the full download the producing endpoint documents. None when rows is complete.

TableRow pydantic-model

Bases: BaseModel

One row: a label plus cells keyed by column key.

Fields:

cells pydantic-field

Cells keyed by TableColumn.key; a missing key renders as an em dash.

description = None pydantic-field

Optional plain-language definition of the row's metric, for hover/tooltip text (row-axis twin of TableColumn.description).

key pydantic-field

Stable row identity within the table.

label pydantic-field

Row header (e.g. an event type or metric).

selection_key = None pydantic-field

The key a row selection names, when it is not the row's own key: rows that repeat one metric per group or per event share it, so choosing the metric keeps it in every group.

selection_label = None pydantic-field

What a row picker calls selection_key: the metric's or event's name, listed once for every row that shares the key.

summary = True pydantic-field

Row-axis twin of TableColumn.summary, for tables whose curated set is rows (e.g. biomarker headline metrics).