Repository navigation
Lab reports: add any lab PDF, check what the coach read, chart every marker by exam - #51
Merged
Merged
Conversation
…marker by exam My Health -> Lab reports. A PDF of any lab report (blood, urine, hormones, anything) is rendered page by page on the phone and read by the user's own coach provider into structured markers: panel, name, a stable key, value, unit and the lab's printed range. Pages go as images, so every provider reads them, the custom one included. - Nothing is saved until the user checks it: a review screen lets them fix any value, unit, range or date, or remove a row. - The flag is computed against the printed range; the model's marking only stands without a number or a range. - The list groups markers by panel with the latest value, a sparkline and where it sits; a marker opens a chart with one point per exam over the lab's range drawn as an accent dither band, amber when outside it. - The coach gets the results (latest, range, earlier values) behind a switch, with rules: no diagnosis, outside-range values go to the doctor, no medication or supplement advice, goals only via set_goal after the user agrees. 'Ask the coach for a plan' opens the chat. - Room v37 (lab_reports, lab_results with FK cascade); reports, results and each PDF as base64 ride in the backup, the switch in ArchivedSettings. Deleting a report removes its results and PDF. - pt-BR strings, unit tests for the pure rules, AGENTS.md section. Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New: My Health → Lab reports. Any lab report (blood, urine, hormones, anything) is added as a PDF, read by the coach, checked by the user, and every marker is charted exam by exam.
Reading
PdfRenderer, 1600 px, up to 10 pages) and sent as images to the user's own coach provider. Every provider reads it, the custom/local one included.Screens
Coach
labsblock in the context: each marker's latest value with its range and the two before it.set_goalafter the user agrees to the exact numbers.Data
lab_reports, andlab_resultswith an FK cascade.ArchivedSettings.Also: pt-BR strings, unit tests for the pure rules (
LabReportsTest), and an AGENTS.md section. The design canvas has the four boards (list, review, marker, coach plan), updated to match what was built. The plan is confirmed in the conversation rather than with Accept buttons, sinceset_goalcovers steps, sleep and active minutes; food changes are suggestions.CI green on 1a3083b. Not tried on a device.
Generated by Claude Code