Skip to content
Guides

Find, read and replay messages

Search every message on the Stream, read one field by field with PHI masked, replay with a dry run first, fix failures in groups on Needs action, watch each destination's queue, and see who is connected over MLLP right now.

On this page

Messages is one page with four tabs: Stream for every message the engine receives, Needs action for the failures that wait on a person, grouped by cause, Queues for the destinations that queue until delivered, and Connections for who is connected to your MLLP listeners and destinations right now. PHI stays masked until you choose Show PHI with a reason. For a worked recovery of one failed delivery, follow Monitor a feed and recover a failed message.

flowchart LR
    Stream["Stream: live sample, Enter searches all"] --> Panel["Message panel: Fields · Input → Output · Trace · Delivery · Raw"]
    Panel --> Replay["Replay or Edit & replay: dry run first"]
    Action["Needs action: grouped by cause"] --> Replay
    Queues["Queues: depth, state, Decide"] --> Action
    Replay --> Done["Replayed · logged"]

Before you start

  • A workflow that receives traffic. Every trigger type is a message here: MLLP, webhook, X12, FHIR subscription, polling, cron, schedule, manual and replays.
  • The operator role to show PHI, replay, skip and act on a queue. A replay of more than 1,000 messages also needs a second admin. A viewer can open every tab and read what arrived, but not message content. See Viewers.
  • Synthetic messages when you practise. The examples use the patient TESTPATIENT^DELTA, control ID DEMO0004 and the workflow Demo Health ADT.

The page

The header reads, for example, "612,480 today · 7.1 / s now · 43 need action": messages received since midnight UTC, the rate over the last minute, and the messages Needs action holds. The same need-action count is on the Needs action tab and the sidebar, and they update together.

ControlWhat it does
Saved searches ▾Ready-made searches: Failed ADT today, PACS queue and Patient by MRN (audited), then the ones you saved. Picking one sets the query and switches to Stream. See Saved searches and Export.
ExportDownloads the Stream's last search as CSV, with no patient details. The download is audited.
The queue stripOne pill per destination queue, on every tab. A queue that is not delivering normally is outlined in its state's colour and listed first. A pill opens that queue on Queues.
StreamEvery message, live. No badge.
Needs actionFailures grouped by cause. Its badge counts the messages that need a person.
QueuesDestination queues. Its badge counts the queues that are not delivering normally; a queue catching up counts.
ConnectionsLive MLLP connections, for operators and admins. No badge. See Connections.

The old addresses still work: /messages/ack-queue opens Needs action, and /messages/destination-queues opens Queues. Batches stays its own page, linked from the Queues tab. See Large batches.

The Stream

The Stream starts on a live sample of the last 15 minutes: the rate graph, then one row per message with Time, Message, Workflow · patient and Result. The Result reads as a sentence, such as "Delivered · Demo Health EHR", "Queued · PACS not answering" or "Failed at step 3 · bad data".

While traffic is under 2 messages a second, the live feed shows every message. From 2 a second it shows about 1 message in 50, picked by a hash of the message id, and it goes back to every message only below 1.5 a second. The footer says which: "Live · sampled 1 in 50 · last 15 min" or "Live · every message · last 15 min". A search always reads every message.

Five chips build the query: Workflow, Type (ADT, ORU, ORM, RDE, SIU), Status (Failed, Queued, Delivered, Filtered), ACK (AA, AE, AR) and Time (Last 15 min, Last hour, Last 24 h, Last 7 days). A chip writes its term into the search box, and editing the text updates the chips.

text
workflow:"Demo Health ADT" type:ADT^* status:failed ack:AE since:24h

You can also type fields, such as PID.5:TESTPATIENT* or MSH.10:DEMO0004. Typing PID. lists matching fields under HL7 fields; pick one to insert it. Join terms with AND, OR and NOT. * matches any run of characters. since: takes 15m, 1h, 24h or 7d (up to 90 days); anything else shows "since must be like 15m, 1h, 24h or 7d" under the box.

To find the run behind an API call, search correlation: with the call's X-Request-Id, its Idempotency-Key or the run's ID, for example correlation:req-7f3a. That is the ID an outbound REST call carries in its correlation header, so the other team can paste theirs. For a JSON message, json: matches one field: json:$.patient.id:TP-0001 or json:$.entry.resource.status:final*. A path is $, then .name and [n] steps; a name step over a list applies to each item. A json: search parses each message's JSON text, so one request reads at most 32 MiB of it: past that the page stops early with jsonParseBudgetExhausted and a hint to narrow the search (a shorter window, a workflow, or an indexed term such as control: or mrn:), and Keep searching continues from there.

Who sent it

Each row names the healthcare organization the message came from, next to the workflow: the site-to-site tunnel (a MedHook tunnel or one on your FortiGate) whose remote subnets hold the sender's address. When two tunnels hold it, the more specific subnet wins. When they are equally specific, MedHook doesn't guess: the row reads Ambiguous: Demo Clinic A or Demo Clinic B. An address no tunnel holds shows as the address.

Click the name to add it to the search, for example peer:"Demo Lab", and see only that organization's messages. peer: also takes an address or a pattern, such as peer:10.1.*. A message whose tunnels are ambiguous matches either name, so filtering never hides it. peer: reads no message content, so viewers can use it too.

The address comes from what the engine records when the message arrives: the MLLP listener's connection (listener images from this release on), or a webhook's client address when CLIENT_IP_SOURCE says which proxy header to trust. Other messages have no label.

  • Typing narrows the rows already on screen. The note at the right reads "{n} in the live sample · ↵ searches all". Nothing is sent while you type.
  • Enter searches every message. The result count, Load more and Replay {n} appear, and the live indicator and Pause go away. Clear the text to go back to the live sample.
  • Filtered is a message whose every router destination filtered it out. A message a source or trigger filter drops creates no run, so it is not listed.
  • Keep searching. One search reads up to 2,000 messages. When older messages may still match, Keep searching reads further.

Patient searches never go in a URL. A search on a patient field (PID, PD1, NK1, GT1, IN1 or IN2), mrn:, body:, json: or free text is sent in the request body, and the page's address keeps an opaque search id instead of the query. Searching a patient field is audited as a PHI search.

The message panel

Choose a row to open it in the message panel. Its header shows the control ID, the type and a status pill (Delivered, Failed, Queued or Filtered), then "{workflow} · {time} · took {x}", the ACK pill (for example ACK AA · 12 ms, or Outcome for a source that is not MLLP), and Show PHI.

TabWhat it shows
FieldsOne card per segment: field, name and value. A field the run's error names, such as PV1.3, is marked in red. With the flat field-path view on, each value's path follows the cards.
Input → OutputThe message's fields next to the output's fields, with added and changed fields tagged, under a Passed, Failed or Queued banner. Output as sent is below.
TraceEach step in the order it ran, with a bar for its time on the run and its milliseconds. Steps the run never reached are listed after. Choose a step to load its input, its output and the lines that changed; while PHI is masked, masked values show as •••, a changed one is still marked and counted in the diff, and console lines are hidden. A step that failed on an API call shows API response: the HTTP status, method and host, the content type, retry and request id headers, and the body the API sent (up to 8 KB), masked until Show PHI. Open execution opens the run. The run's log is under Log.
DeliveryFor each send step, a timeline per destination, such as Queued → Sent → 201, or Queued → Attempt 1 · timeout → Next probe. Then the host, the status, and for operators and admins the request and response headers and bodies.
RawThe message as received. Copy raw waits for Show PHI, so masked text is never copied.

A four-step message's Trace tab in the message panel (map, JavaScript, template, MLLP send): the JavaScript step is open with PHI masked: its input and output side by side and the diff below, each showing the mrn and name fields with masked values, the diff marking the changed name line (Changes · +1 −1), and a note that console lines are hidden while PHI is masked

On Delivery, credentials (authorization, cookie, API-key, token and signing headers, and secret query-string values) are replaced with [redacted] before anything is stored. Each body is stored up to 64 KB, less if EXECUTION_NODE_RESULT_MAX_BYTES is lower. A Generic REST request also shows its Correlation id. See Correlation id.

Keep PHI showing for a while

If your admin has turned on reveal windows, Show PHI also asks how long: This view only, or For the next 15 minutes and longer. Pick a length with your reason, and PHI shows on every message you open, and in run details, samples and step tests, without asking again. A chip reads, for example, "Showing PHI · 24 min left · Hide now". Choose Hide now to mask everything at once. When the time runs out, PHI is masked again. A reload keeps the window, and each message you read under it is still recorded in the audit log with your reason. See PHI handling.

The footer has Open in builder, which opens the workflow's Build tab with this message as the test input, then Replay and Edit & replay. A failed message also has Ask the agent why.

Replay and Edit & replay

Replay and Edit & replay open the replay dialog. Nothing is delivered until a dry run has passed: the footer reads "Dry run first: nothing is delivered until you confirm."

SettingWhat it does
Run onv4 · live, and v5 · draft when a newer version is saved. A replay runs only on the live version: on a draft, the dialog says to deploy it first. The dry run can try either.
Rate10 / s, 50 / s or 200 / s. The replays are paced at that rate.
Approval"Not needed under 1,000 messages", or "Needs a second admin (over 1,000 messages)".
  1. The dry run runs each message, up to 200 within 20 seconds, through the chosen version. Adapters report what they would send; nothing is sent or stored.
  2. It answers, for example, "3 of 3 would send", with a line per change: + added, ~ changed, = unchanged or why it would not send. "0 of 3 would send · nothing would change" keeps the replay button hidden.
  3. The dry run is a preview: under its result the dialog says "Preview only — nothing was sent yet." Send 3 replays on v4 (Send replay on v4 for one message, Send edited copy for Edit & replay) sends them; focus is already on it. Close without sending leaves without sending anything. Changing the version or the edit asks for a new dry run.
  4. The done line reads, for example, "Replayed 3 on v4 at 10 / s · logged by CJ".

A replay sends only to the destinations that failed or haven't received the message yet. A message with an attempt still running, or an automatic retry waiting, can't be replayed until it settles; Replay says why in its title.

Edit & replay works on HL7 v2 messages. Change any field, and the note names it, for example "PV1.3 changed: 4W → 5W · the edited copy links to the original". The original is kept and the edited copy is linked to it. While PHI is masked you can still change the fields that are not patient fields; the box says "Show PHI to edit patient fields" for the rest. A patient field's change is named without its values. The done line reads "Edited copy DEMO0004-e1 sent · logged by CJ".

Edit & replay also works on JSON messages: a webhook's JSON body, an item read by a polling trigger, or a FHIR subscription's resource. Use it when a destination rejects a record because of a bad value, for example a REST API that refuses an order whose status it doesn't accept. The box opens on Fields, one row per value with its path (data.status, lines[1].qty), and Raw JSON shows the same edit as text. The note names the paths you changed, never their values, for example "data.status changed · the edited copy links to the original".

  • While PHI is masked you can change any value that is shown in full. A value shown as •••, or a field added or removed, needs Show PHI first: the box says "Show PHI to edit patient fields" or "Show PHI to add or remove fields". After Show PHI you can edit the JSON freely.
  • Text that is not valid JSON is not sent: the box says why, for example "Not valid JSON: Unexpected end of JSON input", and Dry run waits until you fix it.
  • The edited copy runs with your corrected body in place of the original one. Everything else stays as received: the trigger, a webhook's headers and, for a polled item, when it was polled. A replayed polled item runs as input.item, like the original, and never moves the poll's cursor, so the poll neither re-reads nor skips anything because of it.
  • A text value stays text, and a number, true, false or null stays that kind while what you type reads as one.
  • The audit log records which paths changed (changedFields), never their values.

Over 1,000 messages, the dry run offers Request approval. The dialog then reads "Waiting for a second admin", and the request shows on the other admins' Needs you card on the dashboard. Another admin approves it; you can't approve your own replay. The approval is for the same messages, version and rate, lasts 24 hours and is used once.

Every replay is audited twice, before anything is queued and once it is queued, with who, how many, the version and the rate, never message content.

To replay a search's results, press Enter on the Stream, pick the workflow in the Workflow chip, then choose Replay {n}. It replays the results loaded on screen, with the same dry run. To reprocess every match, or through another workflow, use the API. See Reprocess a search.

Needs action

Needs action holds the last 7 days' failed messages and the destination queues that are not delivering, folded into groups by cause. Failures of one workflow with the same error, ignoring ids, numbers and hosts, are one group. Each group card shows its count, its title, its workflow, its kind and when it started.

Needs action: one AE · rejected group of three messages for ADT to bed board, selected, with the Agent · cause and fix card, Replay 3 and Open versions, and the three messages with Edit & replay

KindMeansActions
Queued · retryingA destination queue is down and its messages wait.Retry now (Probing… while a probe runs), Pause destination, Open queue
Queued · pausedSomeone paused a queue with messages waiting.Resume queue, Open queue
AE · rejectedThe destination answered with an error.Replay {n} and Open versions. When a draft was saved after the first failure: Dry run {n} on v{draft} and Open v{draft}
AR · rejectedThe destination refused the messages.Edit & replay first, Skip both (logged) or Skip {n} (logged)
Error · authThe destination refused the credentials.Open adapter profile, and Resume queue when its queue is paused

The selected group opens with the Agent · cause and fix card: the cause in a sentence and the suggested fix, with the actions under it. The cause is worked out without a model, so the card reads the same when AI is off. A queue group says its messages wait in order and deliver on their own when the destination is back, so you don't need to replay them.

Below the card is the list of messages, with Select all, a checkbox per message and Edit & replay on each row. Replay all {n} becomes Replay {n} when you check some. Replays open the replay dialog with its dry run. Skip asks first, because it drops the messages, and is audited. A resolved group shows ✓ and stays listed, faded, with a note such as "Replay queued on v4 · 3 would send · logged by CJ", or Resolved after a skip.

Queues

Queues lists every destination set to Queue until delivered: Destination, Workflow, State, Depth, Oldest and Last error.

StateActions
DeliveringPause
Delivering · catching upPause
Retrying · breaker openRetry now, Pause
Probing · sending one messagenone
PausedResume
Blocked · needs decisionDecide
EmptyPause

A queue is catching up when it is delivering with more than 1,000 waiting. Click a row to expand it: Depth · last 3 h, the next try, and the first messages waiting with their attempts. Decide opens Needs action on the group that holds the blocked message. Pause, Resume and Retry now ask first and are audited. See Queue until delivered for what each state means.

Connections

Connections answers "is the organization connected?" without a shell on the listener. It refreshes every 5 seconds and shows addresses, times, counts and ACK codes only, never message content. Operators and admins see it; a viewer sees a note instead.

Inbound listeners has one card per MLLP listener a workflow of this workspace listens on, with those workflows linked. Each connected peer is a row:

ColumnWhat it shows
PeerThe sender's IP address and source port. Hover for the listener pod that holds the connection.
TunnelThe site-to-site tunnel whose remote subnets contain the address, linked, or — when none does.
ConnectedHow long the connection has been open.
Last receivedWhen the last complete message arrived.
Last sentWhen the last ACK (or answer) went back.
Last ACKThe code of that ACK: AA, AE, AR, or CA, CE, CR on an msh15 listener.
In 5 / 15 minMessages and bytes received in the last 5 and 15 minutes.
Out 5 / 15 minACKs and bytes sent in the last 5 and 15 minutes.
IdleTime since the last frame either way.

Recently closed under each card lists the last 10 connections that closed, with when. A card that reads "The listener has not reported in the last 20 seconds" means no listener pod is reporting: check that the MLLP listener is running.

Outbound destinations lists each MLLP connection (adapter profile) of this workspace that has sent since the engine started: its host and port, its state (Sending, Connected, idle, Not connected, a number of sends waiting for a connection, or Can't connect with the reason: refused, timed out, unreachable, name not found, reset, TLS failed, blocked by policy or all connections busy), its pooled connections (open, in use, idle), the tunnel, the last send, the last ACK and the traffic.

The engine and the listener can run several replicas. Each process publishes its own view every 5 seconds to Redis, and the page shows them all together. If Redis is unreachable the page says so and shows only what the engine process answering you sees. The same table is on each tunnel's Overview, filtered to that tunnel, and in the API as GET /api/mllp/connections.

Saved searches and Export

Saved searchQuery
Failed ADT todaytype:ADT^* status:failed since:24h
PACS queueworkflow:"…" status:queued, for the workflow of the workspace's busiest PACS queue
Patient by MRN (audited)Puts PID.3: in the box. Nothing runs until you type the MRN and press Enter.

Your saved searches

Under the three built-in searches, Yours lists the searches you saved. They are yours alone and belong to the workspace you saved them in: nobody else sees them, and another workspace has its own list.

  • Save this search… saves the Stream's last search. Run a search first, give it a name (up to 60 characters) and choose Save. You can keep up to 25 in a workspace.
  • Picking one of yours runs its query as you saved it, time window included.
  • × next to one deletes it.

A saved search can name a patient, such as PID.5:DOE*. The engine keeps only the name and the query, encrypted at rest, and never writes either to its logs or the audit log. Nothing is kept in your browser. Saving and deleting are audited as saved_search.created (with the field names the query uses) and saved_search.deleted. A viewer can save searches on the chips (type, workflow, status, ACK, source) but not on message content.

The API is GET, POST and DELETE /api/messages/saved-searches. See the API reference.

Export downloads the Stream's last search as CSV with the columns time,id,type,workflow,status,ack,result. There is no patient, MRN or content column for anyone, and it is not a PHI reveal. An export stops at 50,000 messages and is audited as message.export. See Audit log.

PHI on Messages

PHI is masked by default, for every role: the patient in the table, and the Fields, Input → Output, Trace, Delivery and Raw tabs. Masking keeps the message's shape: names keep their initials, ids their first two characters, dates read ••••-••-••. A step's console lines are hidden while masked.

To see the values, choose Show PHI in the message panel and pick a reason: Troubleshooting, Patient request or Audit. One reveal covers the table and every message you open until Hide PHI or you leave the page; a reload masks again. The footer reads "PHI visible · reason: Troubleshooting · logged".

  • Each reveal writes a phi.revealed audit entry with the reason and a keyed hash of the patient, never a value. If the entry can't be written, nothing is shown.
  • Opening a message writes message.viewed, and so does a signed-in person's raw read of a message through the engine API.
  • A patient search is audited as message.searched, with the MRN only as a keyed hash.

Every reveal and view shows on the audit log's PHI access tab. See Audit log.

Viewers

Viewers can look but not edit. A viewer sees every tab, the counts, the queues and each message's control ID, type, ACK and timings. The message panel says "Message content is hidden for viewers." in place of the content, and the patient column is empty. Show PHI, Replay, Edit & replay, Patient by MRN (audited) and the queue and Needs action buttons are disabled, with a title that names the role they need, such as "Replay and reprocess messages needs the Operator role." A viewer can't search on HL7 fields or free text; the chips still work.

Troubleshooting

What you seeWhy, and what to do
Values show as •••PHI is masked by default. Choose Show PHI with a reason.
The error reads "upstream body withheld, N chars"Error text never quotes what the API sent. Open the step on Trace: API response has the body.
Replay is disabledAn attempt is running or a retry is waiting, or you're a viewer. Its title says which.
Edit & replay is disabledThe message is not HL7 v2 or JSON (X12, CDA or plain text). Use Replay.
The replay button never appears after the dry runNothing would send, or you picked a draft version. Deploy the draft, or fix the cause first.
Replay {n} asks you to pick a workflowA replay runs on one workflow's versions. Pick it in the Workflow chip.
A queue reads Blocked · needs decisionThe head message may already be at the destination, or was refused. Decide, then replay or skip it.
A sender says it is connected but Connections has no rowIts connection ends at a load balancer or firewall, not at the listener, or it reaches another engine. Check the tunnel and the source ranges.
The Tunnel column is empty for a tunnel peerThe address is outside the tunnel's remote subnets, for example after NAT. Compare it with the tunnel's Remote subnets.

Reference