Repository navigation
Reagent lots record their opening, in-use period, storage and certificate files - #93
Merged
Merged
Conversation
…torage and certificate files A reagent or reference standard lot names its supplier from the register and every new lot states its storage condition. Where an in-use period is set the lot is used only once its opening is recorded; its last day of use (a stored generated column) is the earlier of the expiry date and the period's last day. A released lot can be recorded used up, irreversibly. Certificate files are kept unchanged with their checksum. Lists, reminders, the overview, the bench and the method register follow the last day of use. Migrations laboratory 0008 (columns, constraints, ReagentCertificate) and 0009 (guard trigger replaced: opening and used-up written once, revision advances; certificate files append-only). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ration - The person who recorded a lot's opening or attached one of its certificate files does not release it, whatever roles they hold. - The guard replacement moves into 0008, in the transaction that adds the generated column, so no moment or reversal leaves the 0002 guard comparing it; storage_condition has a database default so the previous release can still insert lots while a deployment migrates (operations upgrade note). - A solution is not dated before its source lot was received or opened; the lineage check at a past time uses the source's opening as of that day. - Laboratory history names accounts (one query per page). - Tests: release independence, preparation dates, opening after a preparation, used up racing a use, download integrity failure, history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Local verification on 9cae60c (the changelog commit ccb4ea4 changes only
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First increment of the roadmap area Reagent and standard lots in use (requirement OQ-011): opening and in-use periods.
Product choices (no source read sets an in-use period, a used-up status or these refusals) are recorded in
docs/product.mdand in the regulatory matrix note of 2026-12-01.Migration and upgrade
laboratory.0008_reagent_in_use. In a single transaction it:last_use_on, check constraints andReagentCertificate;0002, so the opening and the used-up record are written once, every change advances the revision, and the generated column is never compared;storage_conditionhas a database default, so the previous release can still insert lots while the deployment migrates. This was checked with an insert using the old column list.docs/operations.md.Documentation
docs/product.md(status tables and a new paragraph), architecture, operations, regulations note, README.Verification
ruff check,ruff format --check, Djangocheck,makemigrations --check --dry-run(PostgreSQL),collectstatic,changelog --check.laboratory/tests/test_reagent_in_use.py(19): arithmetic and boundaries, eligibility, role and stale refusals, audit, used up, status/filter agreement, reminders, bench, certificate files, database guards, release independence, preparation dates, used up racing a use;laboratory/tests/test_reagent_in_use_views.py(8);e2e/test_reagent_in_use_journey.py.🤖 Generated with Claude Code