MajwareMAJWARE
ERR-3 = 204ErrorTable 0357

HL7 204 — Unknown key identifier

Code 204 means a key the receiver looked up — such as a patient identifier, visit number, or order number — was not found in the receiving system.

When you see 204 (Error Condition Code)

Raised for update/result/order messages that reference an existing record the receiver cannot locate, such as an ORU result for a patient or order that was never registered downstream.

Common causes

  • An ADT update (A08) or result (ORU) arrives before the original admit/registration (A01/A04) created the record.
  • Patient identifier (PID-3) or visit number (PV1-19) mismatch between systems.
  • Out-of-order delivery — the create message is queued behind the update.
  • Identifier assigning-authority mismatch so the same patient looks like two different keys.

How to fix it

  1. 1Confirm the referenced record exists in the receiver and that the identifier and its assigning authority match exactly.
  2. 2Check message sequencing — ensure create messages (A01/A04, new orders) are processed before updates/results that depend on them.
  3. 3Add identifier cross-referencing (EMPI/MRN mapping) if the two systems use different patient identifiers.

Example ACK message

A representative acknowledgment carrying ERR-3 = 204. Open it in the HL7 Viewer to inspect every field.

HL7 v2.x Message
1MSH||^~\&|RECEIVER|HOSP|SENDER|HOSP|20260310143520||ACK^R01^ACK|ACK00024|P|2.5.1
2MSA||AE|MSG00001|Unknown key identifier
3ERR||||204^Unknown key identifier^HL70357|E|||PID.3 MRN '123456' not found

Related codes

Frequently asked questions

What causes HL7 error code 204?

Code 204 (Unknown key identifier) means the receiver could not find a referenced record — typically a patient MRN or visit number. It often happens when an update or result arrives before the create message, or when identifiers/assigning authorities mismatch between systems.

Debug your ACK in the viewer

Paste the ACK (or original message) and get instant segment parsing, MSA/ERR decoding, and validation. Free, client-side, no signup.

Open HL7 Message Viewer →

All HL7 error & ACK codes

Browse every acknowledgment code (Table 0008) and error condition code (Table 0357) with causes, fixes, and examples.

HL7 Error Code Reference →