{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":19506,"path":"healthcare-life-sciences/hl7-message-log-about.md","title":"HL7 message log","bundle":null,"doc_type":null,"release":"australia","body":"\n# HL7 message log\n\nThe HL7 message log stores every inbound HL7 v2.x message received by ServiceNow, along with its ACK response, extracted metadata, and processing status.\n\nWhen ServiceNow receives an HL7 v2.x message, it immediately creates a record in the HL7 message log \\(`sn_hl7_v2_message_log`\\). The log record captures the complete inbound message, the ACK response sent back to the integration engine, and key metadata fields extracted from the MSH segment.\n\n## What the message log stores\n\nEach message log record stores:\n\n-   The complete raw inbound HL7 message \\(`raw_payload`\\)\n-   The complete raw ACK response body \\(`ack_response`\\)\n-   The ACK code: AA \\(Application Accept\\), AE \\(Application Error\\), or AR \\(Application Rejection\\) \\(`ack_code`\\)\n-   Message type \\(MSH-9.1\\), trigger event \\(MSH-9.2\\), HL7 version \\(MSH-12\\), sending application \\(MSH-3\\), sending facility \\(MSH-4\\), message control ID \\(MSH-10\\), and message timestamp \\(MSH-7\\)\n-   The time the message was received by ServiceNow and the processing duration\n-   Processing status: Pending, Processing, Processed, or Failed\n-   An error message field for failure detail text and an additional notes field for non-MSH segment data\n-   The parsed message body as structured JSON \\(`parsed_data`\\), shaped by the matched parser configuration\n\n## Message log metadata as Flow Designer trigger conditions\n\nAll metadata fields on the message log record are queryable, sortable, and available as Flow Designer trigger conditions. A flow author can configure a flow to trigger when a message log record is created. The flow can filter using a condition such as \"ACK code = AA AND message type = ADT AND trigger event = A03 AND sending facility = MAIN\". Routing logic lives in the flow's trigger condition, not in custom scripts.\n\n## Parsing happens at reception\n\nWhen a message is received, ServiceNow looks up the active parser configuration that matches the message. It then parses the configured segment fields into the `parsed_data` JSON on the message log record, with no flow or action required. Downstream flows in consuming applications read `parsed_data` directly from the record rather than re-parsing the raw payload.\n\n## PHI and access control\n\nThe `raw_payload` field may contain protected health information \\(PHI\\). Access to this field is restricted by a column-level access control list \\(ACL\\) to the minimum necessary, consistent with HIPAA requirements. All tables in the HL7 integration application are restricted to the `sn_hl7_v2.admin` role, the only role the application defines.\n\n"}}