Lab reference values¶
The table a learner opens in the ⚗ panel beside a question. Editing here changes what everybody sees.
Where it is maintained¶
/tools — the question workbench — under Lab reference values, for
moderators and admins. Press Open the table, then Edit values.
It used to be editable from inside a session, where an educator answering a question was one keystroke from changing a range every learner reads. Looking one up during a block is a lookup; maintaining the table is this. The in-session panel is read-only for everybody, including a moderator.
While Edit values is on, the table also shows unpublished entries, and the page says so: "Unpublished values are shown too. Anything you change here every learner sees."
What a reference is¶
All of these are required except the last four.
| Field | Max | Notes |
|---|---|---|
name |
120 | The test |
group |
60 | What it is filed under — the tabs across the top are built from whatever groups exist |
reference_range |
250 | The range itself, as text |
units |
80 | |
age_group |
120 | The population. A paediatric range is an age range before it is a number. |
specimen |
120 | |
source |
500 | The citation. Required — a range with no provenance is a number somebody typed. |
source_url |
2000 | Optional, and validated as a URL |
article_id |
Optional deep link. Must be a real article. | |
article_section_id |
64 | Optional, and requires article_id. Must be a section that article actually has. |
is_published |
The checkbox reads: "I have verified this source and population; publish this reference" |
Blank-but-present values are refused: every required field is stripped and checked for content, not merely for existence.
Published, or not¶
GET /study-tools/lab-values |
Published entries only. Any signed-in user. |
…?include_drafts=true |
Everything. Moderator only — a learner asking for it gets a 403. |
An unpublished entry is marked draft in the editor's view and is invisible in
a session. Writing one and leaving it unpublished is how a range is drafted
without anybody reading it.
How it is ordered and grouped¶
By group, then name, then id — and insertion order within a test is kept, so a test's age rows stay in the sequence they were entered rather than being sorted into something unhelpful.
The panel collapses rows with the same name into one line with the age-specific values stacked underneath.
Cards on a value¶
A reference can be linked to flashcards:
PUT /study-tools/lab-values/{id}/cards/{card_id}
DELETE /study-tools/lab-values/{id}/cards/{card_id}
Moderator only, by card id, from the editing view. Linked cards show as chips under the value and link into the deck's study page — for learners too, which is the point.
Limits¶
The listing is capped at 500 entries with no pagination. It is a bounded table by design; the code says to add pagination before exceeding that.
Everything here is moderator-gated¶
POST, PUT and DELETE on /study-tools/lab-values all require
require_moderator. There is no grant that reaches this table: a reference
range is not filed under a category, so there is no branch to grant.