N NoBullshit.wiki 中文

Dental clinic purchasing & ordering - three-track reorder-point calculator, single-file tool - routine disposables computed from visits x a per-visit coefficient that must be calibrated; open-container shelf-life materials (resin, bonding agents, impression material) driven by an opening log, with the post-opening period copied from product labeling; implant-class stock prepared against the surgical schedule, never smoothed from history; three order sheets output on separate tracks; open-container periods and usage coefficients are never pre-filled - product labeling decides, the tool does not practice dentistry

Works with:Claude / GPT-4 classCategories:Dental ClinicLevel:Advanced Updated

You are a coding agent building an internal tool for a dental
clinic. Build a single-file HTML tool (HTML, CSS, JS fully
inline; no external dependencies, no network requests; opens
by double-click) for the purchasing person to compute order
quantities. The core structure is "three tracks": dental
consumables naturally split into three classes with different
algorithms and separate outputs - their consumption logics
differ utterly, and one mixed sheet always cross-contaminates.

Track 1 - Routine disposables (visit-driven):
Scope: single-use exam kits, gloves, suction tips, masks
Fields: name / spec / unit / shelf life / trailing [4]-week
average daily visits (hand-entered) / per-visit usage
coefficient / stock on hand / inbound / lead time / safety
days / pack size
- Suggested order = daily visits x coefficient x (lead time
  + safety days) - stock - inbound; negatives clamp to 0
  and mark "no order needed this cycle"
- [Hard gate] The coefficient has no default. First use
  enters "calibration mode": enter the item's total
  consumption over the last [4] weeks and total visits; the
  tool computes the coefficient and writes it into the item
  file after user confirmation - uncalibrated items show
  "uncalibrated, no output," never an estimate

Track 2 - Open-container shelf-life materials (opening-log
driven):
Scope: light-cured resin, bonding agents, impression
material, etchant - the printed date assumes an unopened
container; the real usable window after opening is usually
far shorter and follows product labeling
Fields: name / spec / package expiry / post-opening period
(copied from product labeling, hand-entered, never
pre-filled) / opening log (each entry: open date + current
remainder) / unopened stock / inbound / lead time / safety
days
- Each opening-log entry shows "days of usable life left";
  below [ ] days (user-set) the entry flags yellow
- Suggested order works on two layers: opened remainders
  trigger early reorder when "days left < coverage cycle" -
  the open-container deadline arriving before quantity runs
  out is the main way these materials go short; unopened
  stock follows the ordinary coverage formula
- Order sheets mark "open-container-driven" items so the
  line is readable as deadline-driven, not quantity-driven

Track 3 - Implant and surgery-specific stock (schedule-
driven):
Scope: implants, abutments, graft material, membranes
Fields: name / spec / lot and expiry / stock / scheduled-
but-unserved surgical demand (hand-entered from the surgery
plan: date + spec + quantity) / inbound / minimum order
- Coverage check = surgery by surgery: does "stock +
  inbound" cover each scheduled case's required specs?
  Shortfalls land in a "gap list" sorted by surgery date,
  nearest first - the nearest surgery's shortage leads,
  because its runway is shortest
- [Hard gate] No smoothing from historical usage, no
  forecasting of surgical volume - the surgery plan is
  hand-entered and the tool checks coverage of the entered
  plan only; history displays as reference and enters no
  formula

Output area:
- Three order sheets on separate tracks (disposables /
  open-container materials / implant preparation), each
  with date and buyer signature fields, printable
- Track 3 adds a "gap list": surgery date / spec / gap
  quantity / suggested action (rush order / transfer /
  confirm alternative with the dentist)
- A "method notes" area: all three tracks' formulas laid
  out, user-visible

Hard requirements:
- No external CDN, fonts, or icons; no network requests;
  data never leaves the machine
- Item files (calibrated coefficients, opening log)
  export and import as a whole
- Any input change recomputes live; no "calculate" button
- No smart replenishment, no usage forecasting - the tool
  does arithmetic, deadlines, and coverage checks; method
  transparency is requirement one

Constraints:
- No pre-filled defaults for coefficients, post-opening
  periods, or safety days - this clinic's usage can only
  come from this clinic's data, and open-container periods
  can only come from product labeling
- No built-in "common dental consumables catalog" - the
  treatment mix decides the item list; the tool does not
  practice dentistry
- Track 3 may not grow any "recommend stocking based on
  historical surgical volume" feature - the basis for
  implant stocking is the confirmed surgical plan, not
  statistics

Why it is written this way

The three tracks are this tool's first design - one track more than the clinic's two-track tool, and the added track is dentistry's most singular class: open-container shelf-life materials. The printed date on resin, bonding agent, and impression material assumes a sealed container; the real countdown starts at opening. Managing these by package date means one day discovering a cabinet of resin that is "in date" and entirely past its open-container window. Track 2 makes the opening log the data source so replenishment fires off "days of usable life left" rather than quantity, because these materials run short not from volume but from deadlines arriving first.

Track 3's "prepare against the surgical schedule; smoothing from history forbidden" is the safety logic of implant-class stock: implant surgery is appointment-based and planned, each case's required specs known in advance - the natural basis of stocking is a confirmed plan, not a forecast. Historical usage inside a formula produces a distinctly bad outcome: quiet months under-order automatically, and when the busy season's surgeries land, the gap already exists; and the cost of an implant stockout is not "a few days later" but a postponed surgery. The tool only runs case-by-case coverage of "entered plan vs stock + inbound," with gaps sorted by surgery date, nearest first.

Three separate order sheets carry forward the principle that separate algorithms must land in separate outputs: the disposables sheet goes to the consumables distributor, the implant sheet often runs through another channel entirely, and the open-container sheet needs the storeroom's opening log to work - one mixed sheet is sendable to no one. No pre-filled coefficients, no pre-filled open-container periods - the same discipline this tool series always carries: however precise the arithmetic, a fabricated base makes the output precisely wrong. The calibration mode and the "copy from labeling" hand-entry gates accept a clunky first run over shipping numbers off invented bases.

Variables

Variable Notes
Post-opening period Copy per item from product labeling and packaging; the same material from different brands carries different periods - file rows key on "name + brand," never shared
Remainder units The opening log's "current remainder" uses this practice's habitual units (estimated grams / drops / pieces) - any consistent convention works; precision serves reorder triggers, not cost accounting
Calibration window "Trailing 4 weeks" is the example; clinics whose ortho/implant mix swings seasonally calibrate away from the off-peak transition
Plan entry cutoff Track 3's coverage check depends on how far ahead surgeries are entered - set the cutoff to the practice's scheduling habit (e.g., plans locked one week out); add-on surgeries past the cutoff are entered by hand

reorder-calculationsingle-file-toolshelf-life