← Example Projects

Query & Response – QRY^A19

QRY^A19ADR^A19OutboundHL7 v2.x

Sometimes you need to ask a remote system for patient demographics rather than wait for it to notify you. This example covers both sides: generating an outbound QRY^A19 query from your database, and configuring ZiKiT to return a custom ADR^A19 response – useful for testing an interface before the real remote system is available.

The Messages

The outbound query, generated from a seeded database row:

MSH|^~\&|Sending test|Sending test facility|Receiving test|Receiving test facility|20120904084103.000|SECURITY|QRY^A19|12345||2.5.1|||
QRD|20120904084103.000|R|I|123|||1^RD|2295044|DEM||||

A sample ADR^A19 response, used to test how ZiKiT processes an answer:

MSH|^~\&|Sending test|Sending test|Receiving test|Receiving test|20120628063531||ADR^A19|60|P|2.3|||
MSA|AA|60|TEST||Patient Found|
QRD|20120628063531|R|I||||1|2295044^DOW^TESTING^^^^|||||
PID|1||2295044||DOW^TESTING^^^Not Specif^||19810519|M|||123  AnyStreet^^^^||||||||||

How ZiKiT Handles It

  1. Seed the database with one record and open the built-in outbound mapping rule for QRY^A19 in ZiKiT Mapper, in outbound mode.
  2. Run an outbound test to generate the query message and save it to a file for inspection.
  3. To test the response side, start ZiKiTReceiver, stop listening, and use Override ACK to load a custom ADR^A19 message – then restart listening. This lets you validate how your interface handles a real response before the remote system is connected.
  4. Send the query with the ZiKiT Runtime Service running against your chosen database; once the service polls and processes the response, check the N_PATIENT table for the new entry.

Try It Yourself

The query, the override-ACK response, and the mapping rules all ship with every ZiKiT evaluation copy.

← Previous: Results Reporting (ORU^R01)  |  Back to Example Projects →

DICOM and HL7 are registered trademarks.