Repository navigation
PipeHat v2.0.0 - MLLP send/receive + PHI leak fix
The MLLP release. PipeHat goes from an HL7 viewer to a live interface tester -- and, with it, opens a socket for the first time. It also fixes a silent PHI leak that affected every prior version.
⚠️ Read this if you have scrubbed PHI with an earlier build
Segment IDs containing a digit were not recognized, so the PHI scrubber skipped those segments entirely -- and still reported the scrub as clean.
PV1, NK1, GT1, IN1, IN2, PD1, DG1, PR1 and PV2 were affected: next-of-kin names/addresses/phones, guarantor name/DOB/SSN, insurance IDs, and attending/referring/admitting doctors all survived the scrub. That is 9 of the scrubber's 24 mapped segments. PID is all-alpha and scrubbed correctly, which is why the leak presented as a working scrubber.
The fail-closed coverage check did not catch it because it derived segment IDs from the same parser call it was meant to audit, and skipped on the same empty result -- a safety net sharing a dependency with the thing it audits is not a safety net.
If you shared scrubbed output from an earlier build, treat it as not de-identified and re-scrub it with 2.0.0. Full write-up: docs/05-CODE-REVIEW.md (C6).
Added
- MLLP send/receive over TCP -- HL7's Minimal Lower Layer Protocol framing. Off by default; opens no sockets until you enable it.
- Send Message (MLLP) (
Ctrl+Alt+Shift+M) -- sends the active message on a background thread and shows the returned ACK/NAK (MSA-1 + control ID). - Toggle MLLP Listener (
Ctrl+Alt+Shift+L) -- MLLP server; inbound messages are auto-acknowledged (AA) and opened in a colored tab. - Loopback-only bind unless you opt in and supply a bind address; cleartext-PHI confirmation on first use each session. MLLP is cleartext -- there is no TLS (MLLP/S) yet.
- Saving inbound messages to disk is opt-in and off by default. When enabled, files land in
%LOCALAPPDATA%\PipeHat\received\-- deliberately Local, not the roaming config folder, so cleartext PHI is not carried off-machine by roaming profiles or backup agents. Clear Received Messages purges them.
- Send Message (MLLP) (
- Settings GUI (
Ctrl+Alt+Shift+P) -- conformance rule editor plus the MLLP section, with named per-interface profiles andSegmentDB-backed dropdowns. - Compare Views (
Ctrl+Alt+Shift+D) -- diffs Notepad++'s two split views, boxing differing fields in both panes. - Copy Field Path (
Ctrl+Alt+Shift+K), Copy as Rich Text (Ctrl+Alt+Shift+W), current-field highlight, PHI-aware event log, and user-initiated Check for Updates. tests/SegmentIDTest.cpp-- standalone regression harness for segment-ID parsing and PHI scrub coverage.
Fixed
- Silent PHI leak on segment IDs containing digits (above). Explicit
A-Z/0-9checks replace locale-dependentiswalpha/iswalnum; the coverage check now derives its own segment ID and never calls into the lexer. - False activation on prose -- any three uppercase characters parsed as a segment (
THE QUICK BROWN FOXwas segmentTHE). - Syntax colors were lost on tab switch. Root cause:
SCI_SETLEXER(SCLEX_CONTAINER)was removed in Scintilla 5 (Notepad++ 8.4+) and is a silent no-op, and Notepad++ re-applies the buffer's theme on activation, resetting style definitions. PipeHat now health-checks styling onSCN_PAINTEDand re-applies when wiped.
Changed
- All hotkeys now include Shift (
Ctrl+Alt+Shift+...) -- plainCtrl+Alt+<letter>collides with Notepad++ defaults and gets grabbed by other software. - PHI fakes are deterministic (seeded from a hash of the original), so linkage is preserved across a message.
- Styling is incremental -- only the edited line range is re-styled.
Known limitations
- No TLS (MLLP/S). Messages cross the network in cleartext.
- Enhanced-mode ACK (MSH-15/16) is not honored -- always application ACK.
- The listener services one connection at a time.
- Tree is field-level; components/subcomponents are not expanded.
- Segment and PHI tables are hand-curated, not generated from HAPI/nHapi metadata.
Verification
Release DLL builds clean (MSVC, x64) and embeds 2.0.0. tests/SegmentIDTest.cpp passes, and fails 27 assertions against the pre-fix lexer -- confirming it actually catches C6. MLLP protocol 20/20 and transport 12/12 standalone tests pass; send and receive verified over loopback in Notepad++. Not yet verified against a third-party MLLP endpoint (e.g. Mirth Connect).
Install
Unzip into your Notepad++ plugins folder so the path is ...\Notepad++\plugins\PipeHat\PipeHat.dll, then restart. The folder and DLL must both be named PipeHat or the dockable panel won't register.
SHA-256 (PipeHat-v2.0.0-x64.zip): 1337C684758241F729DB35FDD1D6A84DF48477C418F6999158F71F426F8C9602