Case file

Passayge

An unofficial sandbox for how patient data moves in an ELGA-style health data exchange. A doctor finds a patient, inserts a simulated e-card, and the contact confirmation opens the records for a window set by Austrian law: 90 days for doctors and hospitals, 28 for pharmacies and for the vaccination record. Every search, opening and refusal is written as a FHIR® AuditEvent, and every call is shown with its IHE transaction and the ELGA transaction it stands in for. Synthetic data only, not connected to ELGA or the e-card system. 92 unit, 7 integration and 17 browser tests.

Author
Henry CartoMSc · Software, Medical & eHealth Engineer
Role
Sole engineer and designer.
Stack
TypeScript · React · Fastify · HAPI FHIR · HL7 Austria FHIR Core · IHE PDQm, MHD, ATNA · Docker Compose · Vite · Vitest · Playwright · axe-core · GitHub Actions · Vercel
State
Working sandbox with CI. Full stack with Docker or Codespaces; static demo on Vercel.

Problem

In Austria, a doctor does not get a patient's records by asking for them. The patient's e-card is read in the practice, that read becomes a contact confirmation, and the contact confirmation opens the national health record for a limited time: 90 days for doctors and hospitals, 28 days for pharmacies, and 28 days for the vaccination record whoever opens it. Patients can extend a trusted doctor to a year, block a provider, or leave altogether, and every access is logged.

These rules decide what a clinician sees on a Monday morning, yet they are spread over a law, an architecture document and a set of FAQs written for software vendors. Passayge puts them in one place where they can be tried: find a patient, insert the card, open a document, move the clock, and read the log of what just happened and why.

The tour, then a doctor without a contact confirmation: no access, the e-card is inserted, access is granted, and the audit log shows all three steps

Synthetic patients and providers throughout. Passayge is not connected to ELGA, the e-card system or any real service, and says so on every screen.

How it works

browser ---> gateway (Node, Fastify) -------------------> HAPI FHIR R4
             access rules, simulated clock,               HL7 Austria FHIR Core 2.0.0
             network log, audit records                   internal network only

ELGA itself runs on HL7 CDA documents and SOAP-based IHE transactions. Passayge rebuilds the same flows on the IHE FHIR profiles, and every call is shown next to the ELGA transaction it stands in for.

In Passayge IHE transaction In ELGA
Find a patient PDQm, ITI-78 ITI-47 against the central patient index
List documents MHD Find Document References, ITI-67 ITI-18, ITI-38 between areas
Open a document MHD Retrieve Document, ITI-68 ITI-43, ITI-39 between areas
Log the access ATNA Record Audit Event, ITI-20 ITI-20 to the area's audit repository
Read the log Retrieve ATNA Audit Event, ITI-81 the patient's access portal

The patient chart: the access window for documents, medication and vaccinations on one scale, the documents list with a report entered in error, and a laboratory report

The gateway stands in for three ELGA components at once (the contact confirmation service, the token service and the policy store) and applies the rules before any record is touched. The same engine also runs in the browser with an in-memory FHIR store, which is what the hosted demo uses; the full stack runs with Docker or in Codespaces.

Design decisions

Only rules with a primary source

Every rule names the paragraph it comes from, linked to the law on RIS: the 90 and 28 day windows (§ 18 Abs. 6 GTelG 2012), the 365 day extension that does not apply to hospitals (§ 18 Abs. 7), what each provider type may see (§ 21 Abs. 2), opt-out (§ 15), and the vaccination record's own 28 days and missing opt-out (§ 24f, § 24e). Hospital access for a whole inpatient stay appears only in a 2017 architecture document, written under older law, so it is not modelled and the README says why.

The answer to "may I look?" sits in the patient banner

Who the patient is, and whether you may open their record, are the two facts a clinician needs before anything else. Both live in the banner, as a sentence ("Access granted, 2 of 3") with an icon and a colour, never colour alone. Below it, one 90 day scale shows all three record types, so a vaccination window that ended this morning is visible next to documents with two months left.

A doctor who has never seen the patient: no access, every tab locked, and the reason in plain words

Every refusal says why, and what to do next

A locked tab names the rule, links its source, and says what happens next: insert the e-card, or ask the patient. It also says what did not happen: the search never reached the document registry, so nothing about the patient was disclosed. The refusal itself is in the audit log, like every other access.

Simplified, and labelled where it happens

The e-card is a button, the token service issues no SAML, there is one ELGA area, and documents are CDA-like rather than checked against ELGA's guides. Each simplification is labelled on the screen where it applies, not only in the README.

Nothing leaves the sandbox

The FHIR server sits on a Docker network with no route to the internet, the gateway's outbound requests are limited in code to that server, and fonts and icons are self-hosted. Social security numbers have the real format and check digit but serial numbers that are never issued, so none can belong to a real person.

The audit log: each access with the fields Austrian law lists, and the network calls that produced it

Tests

92 unit tests, 7 integration tests and 17 browser tests, run in CI on every push.

The unit tests cover every access rule at and around its boundary: a doctor is granted one millisecond before 90 days and refused at exactly 90 days. They cover the gateway behind HTTP with every IHE transaction and the audit record each case writes, and the same engine with the in-memory store the demo uses. The integration tests run against HAPI FHIR in Docker with the HL7 Austria profiles, validate every resource the sandbox writes, and fail on any validation error.

The browser tests walk the tour, a refused doctor who then inserts the card, a pharmacy that sees medication only, and a window closing as the clock moves. They run accessibility checks in light and dark at desktop and tablet width, and one fails if any request leaves the sandbox. They run twice in CI: against the Docker stack and against the demo build.

What is simplified

  • The e-card is a button: no card reader and no signed contact.
  • One sandbox service stands in for the contact confirmation service, the token service and the policy store.
  • One ELGA area, so no queries between areas.
  • FHIR instead of SOAP; the real transaction is always shown next to each call.
  • Documents are CDA-like XML, not checked against ELGA's implementation guides.
  • Access is shown before you try; in ELGA, software finds out by trying.
  • A window of N days ends exactly N times 24 hours after the contact.
  • Time is simulated and can jump ahead.

Sources

The research behind every rule, with what was verified and what was not, is in the repository under docs/research. The main sources: GTelG 2012 on RIS, ELGA GmbH's technical overview, the e-card system's ELGA FAQ, HL7 Austria FHIR Core, and the IHE profiles MHD, PDQm and BALP.

Trademarks

Unofficial simulation. Not affiliated with or endorsed by ELGA GmbH, the Dachverband der österreichischen Sozialversicherungsträger or HL7 International.

HL7, FHIR and the FHIR [FLAME DESIGN] are the registered trademarks of Health Level Seven International and their use does not constitute endorsement by HL7. CDA is a registered trademark of Health Level Seven International and its use does not constitute endorsement by HL7.