mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
The doctor report PDF printed lab values and reference ranges with one decimal and the share page with two at most, so a PSA of 0.034 read 0.0 or 0.03 and a TSH window of 0.27 read 0.3, while the labs page kept more. The labs page itself cut values above 1 to two decimals. One rule now decides every recorded number (src/lib/format/recorded-number): a stored value keeps every digit it holds, minus binary float noise, and a value converted from the unit its report printed keeps the precision of the printed figure. The report payload carries sourceValue for that. The labs page, its chart and history, the PDF lab table and footnote, the share page, the day view and the OCR review all print through it, reference bounds included. Doses on the PDF and the share page follow the same rule. Measurement statistics in the PDF and on the share page now share one per-row precision: up to three significant digits but never more decimals than recorded, so a waist-to-height ratio of 0.52 no longer reads 0.5; glucose keeps its unit's precision. Refs #1228