SUITS INDENTING ENGINE · VERSION 1.2

Deployment & calculation guide

← Open the engine · Verification report

Update your Cloudflare Pages deployment

  1. Open the existing Pages project in Cloudflare Workers & Pages.
  2. Select Create a new deployment and upload the updated ZIP.
  3. Deploy and reopen the same pages.dev address. The ZIP already contains index.html at its root; no build or installation is required.
  4. For a new project, choose Pages → Direct Upload / Drag and drop and upload the ZIP.

Official reference: Cloudflare Pages Direct Upload. This package is for Pages static hosting. No account deployment is performed by this delivery.

Dates and filenames

Enter and view calendar dates as dd/mm/yyyy, for example 27/10/2026. The calendar icon can also select a date. Week cards, result dates, print dates and CSV exports use the same display format. Internal JSON backup dates remain ISO strings for compatibility; the tool converts them for display.

ZIP delivery names end in _yyyymmdd_hhmmss.zip, using Indian Standard Time.

Weekly planning

Choose the preparation date. The next Wednesday–Tuesday appears, with Sunday already marked. Saturday is a full day. A normal week is 6.5 biochemistry day loads and six immunoassay day loads. Additional holidays default to Sunday operation: half-load biochemistry and no immunoassay. These load fractions remain editable.

Enter stock

Blank remains unknown. Enter zero only when counted as zero. Dates and times identify the observation; this version does not project depletion before receipt.

Step 3: the requested calculation

ColumnMeaning
Weekly NeedHoliday-adjusted demand rounded upward to multiples of 20 by default. Exact multiples stay unchanged. The daily rate is not rounded.
Pack SizeUsable tests, pieces, aliquots or other base units in one supplied unit.
Rounded Packs NeededWeekly Need ÷ Pack Size, rounded upward to the permitted supply increment.
In LabEntered supply-unit stock + loose stock converted to supply-unit equivalents + machine shots converted to supply-unit equivalents + compatible pooled stock.
To IndentMaximum of zero and Rounded Packs Needed minus In Lab, rounded upward to the permitted supply increment.

Pack rounding happens before subtracting In Lab, as requested. If supply is permitted only in whole packs, a fractional deficit is rounded up again to a whole pack. Whole-pack rounding may leave a residual balance.

Example: Glucose average/week 2,419 tests → Weekly Need 2,420; Pack Size 2,500; Rounded Packs Needed 1. With stock zero, To Indent is 1. With two extra loose bottles and five R1 bottles per packet, In Lab is 0.4 packet; the whole-pack request remains 1.

There is no before-receipt risk KPI, flag, consumption deduction or receipt-to-evening addition in this version. Entering zero balances is a valid way to check the full weekly request.

All-item setup

The source master contains 95 rows, 93 initially enabled. It includes reagents, QC, calibrators, instrument solutions, diluents and consumables. Missing consumption rates and yields stay incomplete. Enter rates from lab records, or use an explicit target-stock rule where appropriate. Target-stock rules use the entered target, without rounding it as weekly consumption.

Each row exposes its weekly-demand rounding increment (default 20 base units), supply increment, pack capacity and R1 bottles per pack. Review small-unit rules such as QC bottles or sets when configuring them. All current stock fields begin empty; source counts remain reference only.

Save and reopen past indents

  1. Calculate the current request in Step 3 and select Save indent.
  2. Give the copy a name and select Save copy. It stores the preparation date, coverage dates, stock and machine readings, holidays, item rules and calculated quantities.
  3. Open Saved indents to search by name or date, view a read-only copy, export its CSV or print it.
  4. Select Use as draft when you want an editable working copy. Confirm replacement of the current draft. The archived original remains unchanged.
  5. Export a JSON backup to preserve the working draft and all saved history, including the original calculated results. Importing a backup replaces the current draft, rules and saved history after validation and confirmation.

Saving again creates another dated revision; earlier copies are retained. Incomplete calculations are labelled drafts and retain unknown quantities. Later changes to live rules or stock never recalculate archived numbers.

History is saved in this browser on the same site address. It is not a shared Cloudflare database. Clearing browser data removes local history; retain exported backups to restore it or transfer it to another device. If the browser runs out of storage, the save fails visibly and older archives are not silently removed.

Existing drafts, backups and imports

The same browser storage key is retained. Existing version-1 drafts/backups are upgraded to schema version 2. Loose reagent entries formerly expressed in tests are divided by the confirmed tests per bottle. All other entered balances and item rules remain. If a conversion is unknown, the ambiguous old loose entry is cleared with a message requiring re-entry; it is never silently reinterpreted as a bottle count.

The updated CSV template contains a loose_unit column. Positive loose entries require the exact displayed unit, such as bottle, aliquots or pieces. Legacy nonzero loose values without a unit are rejected, avoiding accidental conversion of tests into bottles. Blank/zero loose values remain compatible.

CSV and JSON imports validate every row before changing the draft. Negative balances, duplicate IDs and unknown items are rejected. CSV export includes the new Pack Size, Rounded Packs Needed, In Lab and To Indent columns. JSON backups retain full precision. Work is saved in this browser only; export backups to transfer between devices.

Verification

The included pure calculation module is used by both the application and the test suite. The separate history suite checks saved-copy immutability, revisions, backup restore, old-draft migration and malformed archives. Run node verification/engine.test.mjs from the extracted ZIP and node verification/history.test.mjs to reproduce both suites; no dependencies are required. The randomized seed is 1729.

The tool calculates requests; it does not post supply transactions or validate actual consumption, lot expiry or QC performance.