42 mg/L of nitrate is fine in a wastewater discharge and a
problem in drinking water. The number alone decides nothing. In
SENAITE the comparison is made by a Specification: a set of
ranges, one per analysis, that tells the lab whether a result
is in range, close to the limit, or out of range.
One specification per sample type
Specifications live under Setup, Analysis Specifications. Each one belongs to exactly one sample type and lists the analysis services it sets ranges for. A water lab typically has one for drinking water, one for wastewater and one for surface water, because the same parameter is judged against different limits in each.
For every service in the specification you can set:
| Field | Meaning |
|---|---|
| Min, Max | The valid range. Either one may stay empty for an open range. |
| Min operator, Max operator | Whether the limit itself counts as in range (>=, <=, the default) or not (>, <). |
| Min warn, Max warn | The outer edges of the shoulders, see below. |
| < Min, > Max | A value shown instead of the result when it falls below or above it, for example < 8. |
| Out of range comment | A note printed on the report when the result is out of range. |
There is no “panic” level and no target value. A result is in range, in a shoulder, or out of range.
Shoulders
The shoulders sit outside the valid range. Min warn must be lower than Min, Max warn higher than Max:
min max
warn min max warn
·········|---------------|=====================|---------------|·········
----- out-of-range -----><----- in-range ------><----- out-of-range -----
<-- shoulder --><----- in-range ------><-- shoulder -->
A result in a shoulder is out of range, but SENAITE marks it with a warning instead of the hard out-of-range alert. Labs use this for values that exceed the limit by less than the method can resolve, or for a tolerance agreed with the customer. Leave the warn fields empty and there are no shoulders: anything outside Min and Max is simply out of range.
The shoulder is a fixed number you set. SENAITE does not derive it from the measurement uncertainty. If your rule is “out of range only if the limit is exceeded by more than the uncertainty”, put that margin into the warn values.
How a specification reaches a sample
On the sample registration form, the specification field offers the specifications of the selected sample type. Specifications can also be created inside a client; those are offered only for that client’s samples, next to the lab’s own. This is how a customer with stricter contractual limits gets its own ranges without affecting anybody else.
When a specification is assigned, SENAITE copies its ranges into the sample and its analyses. From then on the analyses carry their own ranges. Two consequences:
Changes in the setup do not rewrite history. When a regulator tightens a limit and you edit the specification, samples that already have it keep the old ranges. Their results stay judged by the rules that applied when they were measured. New samples get the new ranges.
Assigning a different specification replaces the ranges. Selecting another specification on an open sample applies its ranges to the sample and to its partitions, as long as they can still be edited. Verified or published partitions keep theirs.
![Analyses of a drinking water sample. Nitrate 62.00 mg/L against the range <=50 and pH shown as < 6.5 against [6.5;9.5], both with an out-of-range icon; Conductivity 410 within <=2500.](/_astro/training-sample-out-of-range.3fMegMiU_Z1ARBgX.webp)
Ranges directly on the sample
For one-off jobs a lab can type ranges straight into the analyses of a sample instead of picking a specification. This needs Enable Sample Specifications on the Analyses tab of the setup. Use it sparingly: ranges typed on a sample are not reused anywhere, and they are easy to miss when someone later asks where a limit came from.
When the same parameter needs different ranges depending on the sample point, the method or another attribute, the cleaner tool is a dynamic specification: a spreadsheet attached to an ordinary specification that overrides its ranges row by row.
A worked example
A drinking water specification:
| Service | Min | Max | Max warn | Comment |
|---|---|---|---|---|
| pH | 6.5 | 9.5 | ||
| Nitrate (mg/L) | 50 | 52 | Limit of the drinking water regulation | |
| Turbidity (NTU) | 1 | |||
| E. coli (CFU/100 mL) | 0 |
A nitrate result of 50 is in range, because the default
operator includes the limit. 51.2 is in the shoulder and gets
a warning. 58 is out of range and the report prints the
comment under it. A pH of 9.7 is out of range with no
shoulder, since none is defined.
Pitfalls we see in workshops
The check uses the stored result, not the rounded display.
With one decimal of precision, a nitrate result of 50.04
shows as 50.0 but is out of range against a max of 50
with <=. Either enter results at the precision you report, or
set the limit with the precision in mind.
Max warn below Max. Shoulders only work outside the valid range. A warn value inside it does not produce an early warning.
Editing the specification and expecting open samples to follow. They will not. Reassign the specification on the samples that should get the new ranges.
A specification for every customer. Client specifications are for real contractual differences. If most clients share the lab’s ranges, keep one specification and add client ones only where the contract demands it.
Specifications only judge a number that is already there. How that number is entered, as a free value or from a fixed list, is decided on the service; see result options and uncertainties.