Case file

Wardread

A Chrome extension that makes raw healthcare messages readable. Select an HL7® v2 message on any page and click the icon: the side panel shows every segment and field with its name, components and repetitions broken out, dates in readable form, and anything it cannot read reported by line. On a page showing a FHIR® resource, it renders patients, observations and allergies with wardkit. It runs only when clicked, makes no network requests and stores nothing. 161 unit tests and 7 browser tests.

Author
Henry CartoMSc · Software, Medical & eHealth Engineer
Role
Sole engineer.
Stack
TypeScript · React · Chrome Manifest V3 · Side Panel API · Vite · Tailwind · wardkit · Vitest · Playwright · axe-core · GitHub Actions
State
Working extension with CI. Repository and Chrome Web Store listing wait for HL7's licence answer.

Problem

HL7 v2 messages end up in places that were never meant to show them: a ticket about a rejected message, an email from an interface engineer, a log viewer. There they are a line of pipes and carets, and reading PID-7 means counting separators by hand. FHIR resources have the same problem in a different shape: a page of raw JSON where a blood pressure, an allergy or a patient's name is there, but not readable at a glance.

Wardread reads the message where it already is. Select the text, click the icon, and the side panel lays it out.

The side panel reading a lab result message: the second OBX segment, numbered, with every field named and its components broken out

A synthetic lab result message selected in a ticket. Repeated segments are numbered, so OBX[1]-5 and OBX[2]-5 can be told apart in the panel and in "Copy as table".

How it works

click the icon --> one script reads the selection --> service worker --> side panel
(activeTab)        or the page text, once             (memory only)      parse and render

Nothing runs before the click. The click gives the extension temporary access to that one tab, a single function reads the selected text, or the page text when nothing is selected, and returns it. The side panel decides what it is.

  • HL7 v2: a selection that starts with MSH (or FHS or BHS for a batch) is split into segments, fields, repetitions, components and sub-components. Escape sequences are decoded, and separators that differ from the standard set are named. Each field is shown with its name from the version in MSH-12, and dates appear in readable form next to the raw value, at exactly the precision given: 200605290901 is 2006-05-29 09:01, with no seconds added.
  • FHIR: a page whose text is a JSON resource is rendered. Patients, observations and allergies use wardkit components; anything else becomes a collapsible tree. In a Bundle, references between entries are links that move to the entry.

A FHIR Bundle in the side panel: a blood pressure panel shown with both components and their values

A synthetic Bundle. The blood pressure Observation keeps its values in components, and each one is shown with its own value.

Design decisions

A partial parse is never shown as complete

A message pasted from an email often arrives damaged: a line wrapped, a footer pulled into the selection. Every line that cannot be read is listed with its line number, and the panel says that what it shows is not the whole message. It never crashes and never presents half a message as a whole one.

The side panel with an alert: not a complete parse, one problem, the line that is not a segment named

Names only from the right version

Field names come only from the version in MSH-12. When that version is not in the data, when MSH-12 is empty, and for Z segments, fields are shown by position only. A name is never guessed or borrowed from another version, because a wrong name is worse than none.

Three permissions and no network

The extension asks for activeTab, scripting and sidePanel, and nothing else: no access to any site before a click, no storage, no content scripts. It contains no code that can make a network request. Both are checked on every push, so neither can drift.

Colour is never the only signal

Segments are coloured in four groups, and every colour pair was checked for contrast in light and dark mode and for distinctness under a deuteranopia simulation. The segment name is always printed next to the colour.

Tests

161 unit tests and 7 browser tests, run in CI on every push.

The unit tests cover the parser rule by rule: separators, components, repetitions, every escape sequence, three kinds of line ending, pasted whitespace, batches, malformed input and 2,000 random inputs that must not crash it. They cover date precision from year only to seconds with an offset, the numbering of repeated segments, field names for every required segment, FHIR detection, Bundle references, and the states of the panel, with accessibility checks.

The browser tests load the built extension in Chromium, select text on a test page, open the panel and check the result, including an accessibility check with colour contrast in light and dark mode. One of them fails if the extension makes any network request; the built code is also scanned for any API that could make one. Another check fails the build unless the manifest asks for exactly the three permissions above. The click on the toolbar icon itself cannot be automated, so it was tested by hand, and passed.

Blocked

The repository and Chrome Web Store listing go public once HL7 confirms the licence for shipping v2 segment and field names. Permission requested from HL7 Austria on 22 October 2026.

Limits

Selections inside frames from another site cannot be read, and Chrome does not let extensions read its own pages or the Chrome Web Store. Local files need Chrome's "Allow access to file URLs" switch. Readable dates and component names depend on knowing the version, so a message without a supported version in MSH-12 is shown by position only. All messages and resources shown here are synthetic.

Trademarks

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.