Skip to content

Dabrams/otr 2256 patient education materials available in progress note#7265

Draft
alexwillingham wants to merge 9 commits intodevelopfrom
dabrams/otr-2256-patient-education-materials-available-in-progress-note
Draft

Dabrams/otr 2256 patient education materials available in progress note#7265
alexwillingham wants to merge 9 commits intodevelopfrom
dabrams/otr-2256-patient-education-materials-available-in-progress-note

Conversation

@alexwillingham
Copy link
Copy Markdown
Contributor

I am just opening this to give an review of the changes

Daniel Abrams and others added 9 commits April 7, 2026 16:24
Adds a "Patient Education" button to the Plan tab that generates
patient-friendly education materials based on the visit's primary
ICD-10 diagnosis. The flow fetches relevant links from MedlinePlus
Connect, passes them to Gemini via a new zambda endpoint, and
renders the AI-generated content as a PDF opened in a new tab.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the single-diagnosis Patient Education button with a modal
that shows checkboxes for all ICD codes on the visit. Providers can
select which diagnoses to generate education for. The system generates
content for each selected diagnosis via the MedlinePlus + Gemini
zambda, then combines all sections into a single PDF opened in a new
tab. Progress is shown during generation.

- All diagnoses pre-selected by default when modal opens
- Primary diagnosis labeled in the checkbox list
- Progress indicator shows which diagnosis is being generated
- Each diagnosis starts on its own page in the combined PDF
- Source attribution and generation date on the last page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Updated the AI prompt to generate a patient-friendly title for each
diagnosis (e.g., "Caring for Your Wound" instead of "Open wound of
unspecified lower leg"), styled after MedlinePlus and Mayo Clinic
article titles.

The PDF now shows:
- Patient-friendly title as the main heading
- ICD code and clinical description as a subtitle below
- Falls back to the clinical description if AI doesn't return a title

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Redesigned the PDF layout with visual elements:
- Blue header banner with white title text
- Orange accent line below the header
- Section headers with light blue background and left border
- Orange bullet dots for list items
- Warning highlight box for emergency/urgent care instructions
- Page numbers on every page (Page X of Y)
- Thin divider line above footer
- Helvetica font family for modern appearance
- Source attribution and generation date in footer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PDF standard fonts (WinAnsi encoding) cannot render Unicode emoji.
Replaced ⚠ with bold "!" in the warning box.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ge summary

Instead of opening the education PDF in a new tab, it is now saved as a
patient instruction list item with a clickable PDF link. The PDF is uploaded
to Z3 storage via a new save-patient-education-pdf zambda and linked through
a DocumentReference. Education PDFs are automatically appended to the
discharge summary PDF when generated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…DF styling

- Split generation into two phases: AI content generation then review/edit
- Show editable markdown document before PDF creation so providers can
  review and modify wording
- Prefetch all diagnosis content in parallel when modal opens for faster UX
- Update PDF title to 24px #0F347C

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant