All rules

A test result in another unit than its reference range

reference-unit-mismatchon by defaultJapanese / English

A results table row whose result and reference range are in different units

Example

Flagged
| Test | Result | Reference range | | --- | --- | --- | | Creatinine | 0.82 mmol/L | 0.57–1.11 mg/dL |
What chaff prints
3:16 The result "0.82 mmol/L" for "Creatinine" is in another unit than its reference range "0.57–1.11 mg/dL"
Fixed
| Test | Result | Reference range | | --- | --- | --- | | Creatinine | 0.82 mg/dL | 0.57–1.11 mg/dL |
What chaff prints
no finding

How to fix

Check the lab's report and correct the unit of the result or of the range, or convert one so both use the same unit.

Why it matters

When a results table writes a result as "52 mmol/L" and the reference range on the same row as "40–60 mg/dL", the numbers cannot be compared, and the reader cannot tell whether the result is in range. It happens when a unit is copied wrong or a value is pasted from another lab. Each row of a table whose headings name a result and a reference range (the language package's lab-result-column and reference-unit-column lexicons) is read, and the units of the two cells (the reference-unit lexicon) are compared. A cell without a unit takes a unit in brackets in its column heading, then the row's Unit column. Two reference range columns (men and women) are each compared. Two ways of writing one unit, which compare without converting the number (mg/dL and mg/dl, ×10³/µL and ×10⁹/L), are read as the same unit.

What it does not flag

A row where the result or the range has no unit, in its cell, in its column heading or in the row's Unit column, a unit that is not in the reference-unit lexicon, and a cell without a number ("Negative", "—") are not compared. A cell that also gives a converted value ("5.5 mmol/L (99 mg/dL)") is fine when any of its units matches. A table without a result column and a reference range column is not read.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: reference-unit-mismatch — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax reference-unit-mismatch --why "reason"
Turn it off for the team (chaff.yaml)
rules: reference-unit-mismatch: off
Technical details
Layer
L3
Status
stable
Severity
error
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

normalerror
relaxedwarning

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, speech/address, speech/transcript
Turned off by the genre in
literature/fiction, literature/essay, literature/poetry, literature/play

Genres

Message

The result "{result}" for "{item}" is in another unit than its reference range "{range}"

This page is built from the rule's definition file:packages/chaff/rules/reference-unit-mismatch.yaml