mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
The Coach read lab results from the last twelve months only, even with the lookback set to its widest option, so a slow change in LDL or PSA across years stayed out of reach. Labs are sparse, so they are no longer held to the one-year window that bounds the dense readings: they reach back over the whole record, and a lookback limit the person set still applies. The snapshot block keeps the latest value per marker, now over that wider window, at its old size: it shares the prompt's size cap and is never shed. get_labs with an analyte adds each matching marker's history, summarised so it stays bounded: the newest five earlier readings in full and older ones as one mean / min / max / count per year, ten years at most, older years counted. With a heavy fixture (30 markers, quarterly for 20 years) the overview stays at 4.3k characters and a named LDL read grows from 0.2k to 1.2k characters for 80 readings. The MCP get_labs read and the lab resource follow, since they run the same tool. The widest lookback option no longer reads "All": it names what it reads, twelve months in detail and every lab result, in every locale. Refs #1263