Identify the event type from MSH-9.2 (trigger event) — S12 indicates a new appointment notification; related events include S13 (modify), S14 (cancel), and S15 (discontinue), each requiring different handling
Extract the schedule control ID and filler appointment ID from the SCH segment, which is the primary segment for scheduling information including appointment start/end times and duration
Parse the PID segment for patient demographics and correlate with your internal patient record using your site's matching strategy (MRN in PID-3, name in PID-5)
Extract resource information from AIG (general resource), AIL (location resource), and AIP (personnel resource) segments to identify the provider, room, and equipment assigned to the appointment
Map the appointment reason from SCH to your internal scheduling codes and store the appointment in your system with appropriate status tracking
Generate and return an ACK message acknowledging receipt; for SIU messages the standard response is an ACK, not an SIU response
Known gotchas
SIU messages do not use a query/response pattern — they are unsolicited notifications; your system must be registered as a subscriber with the sending scheduling system
Appointment time fields in SCH use HL7v2 DTM format (YYYYMMDDHHMMSS[+/-ZZZZ]); always parse timezone offset explicitly or you risk booking appointments in the wrong local time
Different EHR vendors populate SCH sub-fields inconsistently; test against actual message samples from your trading partner before assuming field positions
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp