External images in PACShow to sync them with the EHR
A study is a set of medical images. Every study needs an accession number: a unique ID that links the images to a request in the hospital system. Images that arrive from outside have none, so the two systems below swap messages to create one. Click any step in the diagram or the list, or use the arrow keys.
- DICOM
- HL7 v2
- Internal action
- Dashed = reply
Tip: click an arrow or box in the diagram to jump to that step. Time flows top to bottom.
Images land in PACS
Core stepWhat happens
Images made elsewhere (a CD, a patient portal, another hospital) are loaded into the PACS. The PACS stores them, but nobody here ordered them, so they are not linked to any request.
Why it is needed
Without an accession number the images float unattached. Radiologists cannot find them in a worklist and reports cannot be linked.
Technical details
- PatientID (0010,0020) = local MRN or to be reconciled
- AccessionNumber (0008,0050) = empty
- StudyInstanceUID (0020,000D) = 1.2.840....
PACS notifies the EHR with an IAN
Core stepWhat happens
The PACS sends a short DICOM message to the EHR: “new images are ready, and this is where to fetch them.” It is only a notification; no images travel in it.
Why it is needed
The EHR cannot look inside the PACS. This message is how it learns that something arrived.
Technical details
- SOP Class 1.2.840.10008.5.1.4.33
- Study Instance UID (0020,000D), Referenced Series Sequence (0008,1115)
- Referenced SOP Sequence (0008,1199): class and instance UIDs
- Retrieve AE Title (0008,0054): where to fetch them (given per referenced instance)
- Instance Availability (0008,0056): ONLINE, NEARLINE, OFFLINE or UNAVAILABLE
EHR creates the request and accession number
Core stepWhat happens
The EHR checks which patient the images belong to, creates an internal request for them and generates a new, unique accession number.
Why it is needed
The EHR owns accession numbers. Only the order system hands them out, so numbers never clash.
Technical details
- Patient match on MRN
- Order type = external images imported
- Accession number = EHR-generated, unique
- Keep StudyInstanceUID on the request
EHR sends HL7 ORM back to PACS
Key detailWhat happens
The EHR sends the new number back to the PACS as an HL7 text message. It also includes the Study Instance UID, which names the exact study.
Why it is needed
The accession number alone does not tell the PACS which study it belongs to. The UID removes the guesswork.
Technical details
- MSH ... ORM^O01
- PID = patient identity
- ORC-1 = NW, ORC-3 = filler order number
- OBR-18 = accession number (IHE; OBR-3 is the filler order number)
- ZDS-1 = Study Instance UID (IPC-1 and IPC-3 in the HL7 v2.5.1 option)
PACS reconciles the study
ConfirmationWhat happens
The PACS looks up the study by its UID, saves the accession number with it and, depending on the vendor, also writes it into the image headers.
Why it is needed
This is the moment the images are finally linked to the request.
Technical details
- Match StudyInstanceUID
- Set AccessionNumber (0008,0050)
- Optional: IOCM or study update to rewrite headers
- Forward the update to any downstream archive
PACS acknowledges
ConfirmationWhat happens
The PACS replies “done” (or “error”) to the EHR.
Why it is needed
Without a reply the EHR cannot know the PACS applied the number, and the two systems can silently drift apart.
Technical details
- MSH ... ACK^O01
- MSA-1 = AA (accepted) or AE / AR (error)
- Both systems now share the same accession number
All steps at a glance
Glossary
- PACS
- Picture Archiving and Communication System. The server that stores and serves medical images.
- EHR / EMR
- Electronic Health Record. The hospital system holding patients, orders and reports.
- Accession number
- The unique ID of one imaging request. It links an image study to its order and report.
- DICOM
- The standard for medical images and for the messages that move them between devices.
- HL7 v2
- The standard for text messages between hospital systems, such as orders and results.
- IAN
- Instance Availability Notification. A DICOM message saying “these images are now ready”.
- ORM / ACK
- ORM is an HL7 order message. ACK is the receiver’s reply: “got it” or “error”.
- Study Instance UID
- The globally unique ID of the image study itself. Used to match the right study.
- MRN
- Medical Record Number. The patient’s ID in the hospital.
Summary
- The IAN is a DICOM N-CREATE sent by PACS to the EHR. It is not an HL7 message.
- The EHR acts as order filler: it creates the internal request and generates the accession number.
- The EHR sends the accession number back as an HL7
ORM^O01withORC-1 = NW. The accession number goes inOBR-18(IHE;OBR-3is the filler order number). - Add a
ZDSsegment with the Study Instance UID (ZDS-1), so PACS can match the order to the study. - PACS reconciles the study and returns an HL7
ACK, so the EHR knows both systems agree. - Patient identity must match first. Vendor support for IAN varies. In the IHE HL7 v2.5.1 option the message is an
OMI^O23and the accession number and Study Instance UID are inIPC-1andIPC-3.
The 6 steps in plain text
Images land in PACS
Images made elsewhere (a CD, a patient portal, another hospital) are loaded into the PACS. The PACS stores them, but nobody here ordered them, so they are not linked to any request.
Why: Without an accession number the images float unattached. Radiologists cannot find them in a worklist and reports cannot be linked.
PACS notifies the EHR with an IAN
The PACS sends a short DICOM message to the EHR: “new images are ready, and this is where to fetch them.” It is only a notification; no images travel in it.
Why: The EHR cannot look inside the PACS. This message is how it learns that something arrived.
EHR creates the request and accession number
The EHR checks which patient the images belong to, creates an internal request for them and generates a new, unique accession number.
Why: The EHR owns accession numbers. Only the order system hands them out, so numbers never clash.
EHR sends HL7 ORM back to PACS
The EHR sends the new number back to the PACS as an HL7 text message. It also includes the Study Instance UID, which names the exact study.
Why: The accession number alone does not tell the PACS which study it belongs to. The UID removes the guesswork.
PACS reconciles the study
The PACS looks up the study by its UID, saves the accession number with it and, depending on the vendor, also writes it into the image headers.
Why: This is the moment the images are finally linked to the request.
PACS acknowledges
The PACS replies “done” (or “error”) to the EHR.
Why: Without a reply the EHR cannot know the PACS applied the number, and the two systems can silently drift apart.
Common questions
How do I synchronize external images in PACS with the EHR?
To give external images in PACS an accession number from the EHR, the PACS sends the EHR a DICOM IAN (Instance Availability Notification). The EHR matches the patient, creates an imaging request and its accession number, and sends the number back to the PACS in an HL7 ORM^O01 message that also carries the Study Instance UID. The PACS stores the number on the study and replies with an HL7 ACK, so both systems stay synchronized.
What is an IAN (Instance Availability Notification)?
An IAN is a DICOM N-CREATE message (SOP Class 1.2.840.10008.5.1.4.33) that the PACS sends to tell another system that images are available. It names the study, series and instances and says where to retrieve them. It is a DICOM message, not an HL7 message, and it carries no images.
Who creates the accession number for external images?
The EHR does. It acts as order filler: it matches the patient, creates an internal imaging request such as “external images imported” and generates a unique accession number. The PACS does not invent the number.
Which HL7 message sends the accession number back to the PACS?
An ORM^O01 with ORC-1 = NW. In the IHE Radiology profile the accession number goes in OBR-18 (the filler order number is a different number, in OBR-3) and a ZDS segment carries the Study Instance UID in ZDS-1. In the HL7 v2.5.1 option of IHE the message is an OMI^O23, and the accession number and the Study Instance UID move to the IPC segment (IPC-1 and IPC-3). Some interfaces are set up differently, so check the interface specification of both systems.
How does the PACS match the order to the right study?
By the Study Instance UID in the ZDS segment (IPC-3 in the HL7 v2.5.1 option). Patient identity has to match first, usually on the MRN. The PACS then stores the accession number with the study and, depending on the vendor, also writes it into the DICOM headers (AccessionNumber 0008,0050).
Why does the PACS send an ACK back to the EHR?
The HL7 ACK (ACK^O01, with MSA-1 = AA, AE or AR) tells the EHR whether the PACS applied the accession number. Without it the two systems can silently drift apart.
Does every PACS support IAN?
No. Vendor support for IAN varies. Check the DICOM conformance statements of your PACS and EHR: the PS3.2 template has a section "Instance Availability Notification Service" with an SCU part (the sender of the N-CREATE) and an SCP part (the receiver), including what the receiver does for each Instance Availability value. Some products start the same flow with a different trigger, such as an HL7 message or a study-received event.