Reverse-engineering national health portals into FHIR facades — Jun 11, 2026
The recipe — HAR export, sanitise, hand it to an agent
Deliberately unglamorous: log into your national patient portal, record the browser traffic as you click through it, export it as a HAR file, strip the personal data out, and hand it to a skill that maps the proprietary model to FHIR R4. No documentation, no cooperation from the portal, nothing changed on their side.
The agent does about 95% of the work. The decompiling and packet-staring that used to eat weeks and months now takes hours.
He was emphatic about sanitising the dump before it goes anywhere near a model you don't control.
Shared design principles across all facades
Read-only, stateless, and pass-through auth — the proxy borrows the session token you legitimately got by logging in and impersonates the portal, so the security model, the audit trail and the data integrity all stay exactly as they were. Jens described it as Home Assistant for healthcare.
FHIR is just a data model. The same data in different attributes, no new risk. So what exactly is anyone waiting for?
Automating the manual HAR step — CDP as the tool
Nikolai suggested cutting the manual step: drive Chrome over the DevTools Protocol directly instead of exporting HAR by hand, since Playwright is built on top of CDP and Claude knows the low-level JSON-RPC well enough to sniff the network, open tabs and navigate for itself, sharing the session with you while you log in.
I kept the toolchain boring on purpose. Every extra tool raises the bar to getting started.
MCP inside the facade, and the trade-off on auth
The Danish proxy embeds an MCP server in the facade, so the agent can talk to the FHIR view of your own record conversationally. Two auth modes, with a real trade-off:
- Bootstrap the facade with a session token → locked to one user
- Pass the token per invocation → flexibility, but it leaks into the agent session
The blocker for personal health agents isn't technical
Anyone could build a personal health agent today on existing models. The blocker isn't technical — it's that you can't tell where your data ends up, and that question has to be answered first.
This won't stop anyone. People are already asking these questions of chatbots. It's better to ask with part of your record attached than with no context at all.
Nordics vs US, and EHDS as the forcing function
Finland is the only Nordic country whose national portal openly supports FHIR as an entry point — Sweden, Denmark and Norway don't. The Nordics have a structural advantage worth envying: heavy centralisation means one national entry point covers most of a citizen's data for a population of six to eight million.
Jens sees EHDS as the forcing function, the first common EU-level requirement that you can get your own data in a structured format, and notes he has covered roughly 7% of the 27 member states with very little effort.
The US arrived at interoperability through patient right-of-access mandates and has been arguing about it for fifteen years — fragmentation instead of one portal.