Lab reports
A Lab Report is the record of what a laboratory sends back for a set of Samples: the analyses run, the results, and the metadata that frames them. It belongs to a single Project and groups the Lab Analyses a laboratory returns for them. A report carries a Status that tracks where it sits in your review, from first entry through validation.
What a Lab Report holds
A Lab Report (Lab Report) is an aggregate root: it owns its child records and is the unit you create, edit, and delete. Each report identifies itself with a Code that is unique within its Project — two Projects can both have a report coded LR-2026-001.
The report pulls together three kinds of related records:
- Lab Analyses — the analyte-by-analyte results the lab returned. The report groups these; deleting a report is blocked while any Lab Analysis still points to it.
- A Laboratory — the organization that ran the work. Optional, but a report with no laboratory assigned raises a warning on save.
- A Chain of Custody (CoC) — the Chain of Custody that delivered the samples to the lab. Optional, and resolved within the report's own Project (see How it fits together).
The report header also records when samples were received (SampleReceiptDate), when the report was issued (ReportDate), who reported it, and free-text notes. Erde derives Turnaround (days) from the two dates when both are present, and enforces that the receipt date is on or before the report date.
The status lifecycle
Every Lab Report has a Status drawn from exactly five values. New reports start as Draft.
| Status | Meaning |
|---|---|
| Draft | Default for a new report; results are being entered or reviewed. |
| Preliminary | An early or partial issue from the lab, not yet final. |
| Approved | Reviewed and accepted; eligible to be validated. |
| Rejected | Reviewed and rejected. |
| Validated | Final sign-off; reached only from Approved. |
The diagram below shows the moves the product treats as forward progress. Apart from validation — which requires the report to be Approved first (see The rules behind a status change) — any other move can still be made, but moving backward out of a promoted status raises a warning rather than blocking.
Figure: forward status moves for a Lab Report. Reaching Validated requires the report to be Approved first.
The rules behind a status change
One transition is enforced: a report can become Validated only when its current status is Approved. Any other source status returns a conflict and the change is refused.
Three backward moves are allowed but warn — the change goes through, and Erde surfaces a warning so the action is deliberate:
- Moving out of Validated to any status warns that this is unusual after validation.
- Moving out of Approved to anything other than Validated warns that it rolls back the approval.
- Moving out of Rejected to any status warns that it resurrects a rejected report.
A few data-quality warnings also fire on save. Setting a status of Approved or Validated without a report date or a sample receipt date warns, as does recording a report date with no sample receipt date. None of these block the save.
There is no Pending or Received status. Pre-analysis tracking lives on the Chain of Custody, not the Lab Report.
How it fits together
A Lab Report sits between the samples a Project collects and the analyses a lab returns. The CoC link and the Laboratory link are resolved differently because the CoC is Project-scoped data while a Laboratory is shared Reference data.
| Linked record | Scope | How Erde resolves it |
|---|---|---|
| Chain of Custody | Project-scoped | Matched within the report's own Project, so a report cannot reference a CoC from another Project. |
| Laboratory | Organization-wide | Matched globally; an inactive lab is rejected unless it was already assigned. |
| Lab Analyses | Owned by the report | Block deletion while present; the report groups them. |
Each Lab Analysis (Lab Analysis) carries the individual Lab Results. When you promote a report to Validated, Erde checks whether every field-sample result has been validated and warns you about any that have not.