Add customizable endocrinology PDF reporting to LoopFollow#660
Add customizable endocrinology PDF reporting to LoopFollow#660greyghost99 wants to merge 7 commits into
Conversation
|
Build currently broken, will push out update within a day or so |
|
Thanks for the PR, looking forward to test it in more detail. One concern with the daily insulin breakdown: I'd suggest dropping bolus insulin, basal insulin, and the bolus/basal ratio. With AID systems these numbers vary heavily depending on delivery method (SMBs, UAM, temp basals, etc.) and don't carry meaningful signal for an endo, if anything they tend to invite questions that lead the conversation in the wrong direction. Total insulin + total scheduled basal is enough context for a clinical review. The endo can see how much insulin was delivered and how it compares to the programmed baseline, if the endo is interested in a ratio, that is the ratio to look at. At least this is my opinion and experience. |
|
Thanks for the thoughtful feedback — that makes a lot of sense, especially in the context of AID systems. I agree that bolus insulin, basal insulin, and bolus/basal ratio can become noisy or misleading with SMBs, UAM, temp basals, and dynamic insulin delivery, and I can see how that may steer discussion away from more clinically useful signals during an endo visit. I’ve updated the report accordingly and removed the daily bolus insulin, basal insulin, and bolus/basal ratio breakdowns. The daily section now focuses on total insulin delivered + total scheduled basal, which provides clearer context against programmed therapy settings and feels more aligned with provider review. Really appreciate the perspective here — this was helpful feedback and I think the report is better for it. |
|
Thanks again for taking the time to review the PR and for the thoughtful feedback — I really appreciate it. I’ve addressed the changes discussed, and I’m looking forward to hearing your thoughts after you’ve had more time to test it. Any additional feedback, ideas, or improvements are always appreciated! |
|
I’m fairly happy with the PR in its current state and feel like it’s in a good place right now, but I’m definitely open to improvements. As you continue testing, any additional feedback, suggestions, or ideas for refinement would be greatly appreciated. |
Add Endo PDF Export for Provider-Friendly Diabetes Reporting
Overview
This PR introduces an Endo PDF Export feature to LoopFollow, allowing users to generate a provider-friendly report for endocrinology appointments using diabetes data already available in the app and associated Nightscout data.
The goal is to reduce friction during appointment prep and improve how diabetes management data is communicated to providers without relying on screenshots, manual notes, or multiple external exports.
What this adds
This implementation introduces a dedicated endocrinology reporting workflow including:
EndoReportViewfor report previewingEndoReportGeneratorfor report rendering and formattingIncluded features
Reporting & Layout
Loop Followformatting cleanup)Daily Insulin Analysis
Per-day insulin summaries including:
SMBs displayed separately in daily charts for clearer AID behavior visibility
Daily therapy summaries for longitudinal review
Diabetes Metrics & Units
mg/dL ↔ mmol/L toggle support
Date range presets:
Therapy & Clinical Context
Optional provider-facing metadata fields stored locally using
UserDefaults:Trio,Loop, or custom/other)Additional therapy configuration fields:
Nutrition / Treatment Data
Why
Many users currently rely on screenshots, manual notes, or external tools to communicate therapy history during endocrinology appointments.
This feature aims to:
Files introduced / updated
New files:
EndoReportView.swiftEndoReportGenerator.swiftUpdated:
AggregatedStatsView.swiftScreenshots
EndoReport_1779594925.pdf
Testing
Future Improvements
Potential follow-up improvements may include: