FHIR R4 & HAPI · Chapter 15
Act III · Live Updates · Chapter 15

The BFF served it. Next.js rendered it. Now keep it live.

Chapter thirteen built the BFF. Chapter fourteen rendered a Patient, an Encounter, an Observation — each a snapshot, rendered once. The moment another clinician edits that patient on the server, the open view goes silently stale. How does the screen learn the resource just changed — without hammering the server with polling?

What this chapter answers

The live-update problem — and why the obvious answers fall short The 5-layer loop — datastore to DOM A typed event contract — one schema, both ends
One mutation · five layers · one typed contract — trace a single edit to a re-render