You open the medicine cabinet during a fever at midnight, grab what you think is ibuprofen, and only notice once you've swallowed two tablets that the blister pack had an expiry date from fourteen months ago. The box location was wrong, the quantity was off by half, and you have no idea when you bought this or whether it was still in the effective range. This is not a rare scenario — it's the default state of household pharmaceutical storage for most families, and it's one that a properly maintained inventory makes entirely preventable.

The Chaos in Every Medicine Cabinet

The fundamental problem with pharmaceutical storage at home is that medications come and go on different cycles, stored in different places, bought from different sources, and tracked by no one. A household managing chronic conditions for multiple family members might have thirty or forty distinct pharmaceutical items — prescription and OTC, topical and oral, short-course antibiotics next to long-term cardiovascular medications — and the only inventory system is spatial memory.

Spatial memory fails. You buy a backup box of antihistamines, forget you bought them, buy another box, and now you have three partially-used boxes from different purchase dates with different lot numbers and expiry dates scattered across two bathrooms and a travel bag. You run out of a critical maintenance medication because you thought there was more left than there was. You administer a medication past its active window because you didn't realize the degradation clock started at the date opened, not the printed manufacture date.

The template addresses all of these failure modes with a structure that's complete enough to actually use in the moment.

Two Expiry Dates and Why That Matters

The most sophisticated element of this template is the dual expiry logic: Regular Date for the manufacturer's printed expiry, and the Opened duration calculation that computes a different expiry based on when the package was actually unsealed.

This distinction is pharmacologically meaningful. Eye drops and topical preparations frequently carry a "use within 28 days of opening" instruction that supersedes the printed expiry date. Some liquid oral medications have similar post-opening stability windows. The Duration field handles four states: Lifetime (for items without expiry), Regular (manufacturer's printed date), Opened (time after opening), and None. The Expiry Date JavaScript field reads whichever mode applies and outputs the result in MM/YYYY format — short enough to be readable on a list card.

The Expire Date field provides the longer-form output — "MMMM YYYY" — with complete logic for edge cases. If Duration is set to Opened but no Opened Date has been entered, it falls back to the Regular Date if that's populated, or returns "Regular Date Empty" if nothing is entered. This prevents the record from silently displaying incorrect data.

The Lot Number Field

The Lot Number field, scanned via barcode, is the field most home inventories skip. Lot tracking matters when a pharmaceutical recall is issued. Regulatory agencies issue recalls by lot number — and if you've been storing medications without tracking lots, you have no way to determine whether your specific stock is affected without physically checking every package. With lot numbers logged in the database at purchase time, a recall check becomes a search query.

Box Quantity and Pill Quantity stored as separate integers means you can track at the level that actually matters for reorder decisions. Knowing you have two boxes is less useful than knowing you have two boxes with 18 pills remaining in the opened one and 30 sealed in the second — a total of 48 units, with a reorder point that depends on the dosing schedule in the Specs field.

The thirteen-category classification — Analgesic, Antipyretic, Anti-inflammatory, Antibiotic, Gastrointestinal, Cardiovascular, Psychotropic, Immunomodulator, Antimicrobial, Endocrine, Dermatological, Ophthalmic, Respiratory — is broad enough to cover most home pharmacy scenarios and specific enough to support meaningful filtering. During cold season, filter by Respiratory and you see everything available without opening every cabinet. Sharing the database with a caregiver or family member, filter by Cardiovascular and they see the maintenance medications without wading through the rest of the inventory.