GSoC 2026: Patient Visit Summary Printing — Project Updates & Discussion

Medications section — scope question (O3-5672)

I am currently working on the MedicationsSection and hit a design question I’d value input on.

What should “Medications” show?

  1. All medications the patient is currently active on, or
  2. Only the medications ordered during this specific visit

For context, here’s how the other sections are currently scoped:

  • Visit-scoped (this visit’s encounters): Vitals, Diagnoses
  • Patient-level: Conditions (active only, per our earlier discussion) and Allergies — though these are patient-level mainly because the data model is, not a deliberate choice

Medications can go either way: orders are linked to encounters, so getOrders(patient, visit, …) gives me exactly this visit’s prescriptions, while getActiveOrders(patient, …) gives the full current list.

Why the full active list is tempting: say a patient is on long-term metformin + amlodipine and comes in for an acute issue, leaving with a new amoxicillin prescription. If the summary shows only amoxicillin, a referral provider doesn’t see what they’re already on — which matters for interactions and safety.

Why visit-scoped is tempting: a visit summary is fundamentally a record of what happened at that visit. If I print the summary of a visit from a month ago, the “active now” approach shows what the patient is on today, not what was prescribed at that visit — so a short course (say a 15-day antibiotic) prescribed at that visit has since ended and doesn’t appear at all, leaving the section blank even though a medication was very much part of that encounter. For a document meant to describe a specific visit, that’s a real gap. It also matches how we scope Diagnoses and Vitals to the visit — a prescription, like a diagnosis, is arguably a visit-specific event.

So the two options really serve two different documents: a referral/hand-off (where “what is the patient on right now” is what matters) vs. a record of one encounter (where “what was done at this visit” is what matters). I don’t think there’s an obviously correct answer without knowing how implementers actually use the printed summary, so I’d really value the community’s perspective on which use case should drive the default — or whether both need to be supported (e.g. a config option or two modes).

Thanks!

cc: @veronica @ibacher @wikumc @nethmi