An ECG without an orderfrom a PDF on disk to PACS and EHR
The ECG is recorded first and nobody ordered it. The cart saves a PDF on a server disk, a tool watches that folder and stores the PDF in the PACS, and the EHR creates the order afterwards. It is the external-images flow, used inside the hospital. 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.
The ECG is saved as a PDF on a server disk
Core stepWhat happens
The ECG is recorded without an order in the hospital system. The cart (or the ECG management system) writes a PDF to a folder on a server disk. Nothing in the PACS or the EHR knows about it yet.
Why it is needed
This is the difference with a normal exam. There is no worklist entry, so the PDF carries no accession number and no Study Instance UID.
Technical details
- File = ECG report as PDF (sometimes with an XML or text file beside it)
- Patient ID and name = in the file name, the PDF text or a sidecar file
- Accession number = none
A watcher tool finds the file
Core stepWhat happens
A separate tool monitors the folder. When a new PDF has been written completely, it reads the patient data, creates a new Study Instance UID and wraps the PDF in a DICOM Encapsulated PDF object.
Why it is needed
The PACS speaks DICOM, not file shares. The tool is the bridge, and it must invent the identifiers the PDF does not have.
Technical details
- SOP Class = Encapsulated PDF Storage 1.2.840.10008.5.1.4.1.1.104.1
- Encapsulated Document (0042,0011) = the PDF bytes
- MIME Type of Encapsulated Document (0042,0012) = application/pdf
- Document Title (0042,0010) = for example "ECG report" (may copy the PDF Title entry)
- Modality (0008,0060) and Series Instance UID (0020,000E) are required (type 1)
- Burned In Annotation (0028,0301) = YES when the PDF text identifies patient and date
- PatientID (0010,0020), StudyInstanceUID (0020,000D) = new
- AccessionNumber (0008,0050) = empty
The tool stores the PDF in PACS
Core stepWhat happens
The tool opens an association to the PACS and stores the object with C-STORE. The PACS stores it like any other study, but it is not linked to a request.
Why it is needed
From here the PACS sees an ordinary study without an accession number, the same situation as images from outside the hospital.
Technical details
- The PACS must accept the Encapsulated PDF SOP Class (check its conformance statement)
- Patient ID must exist in the PACS, or be reconciled later
- AccessionNumber (0008,0050) = empty
PACS confirms the store
ConfirmationWhat happens
The PACS answers with a status. Only on Success should the tool mark the file as done, for example by moving it to a "processed" folder. On any failure it keeps the file and retries.
Why it is needed
If the tool deletes the file before the PACS has confirmed, an ECG can be lost without anyone noticing.
Technical details
- Status 0000 = Success
- Any other status: keep the file and retry
- Move the file to a processed or archive folder, do not delete it at once
PACS notifies the EHR with an IAN
Core stepWhat happens
The PACS sends the EHR an Instance Availability Notification: “new images are ready, and this is where to fetch them.” It is only a notification; no document travels in it.
Why it is needed
The EHR cannot look inside the PACS. This is how it learns that an ECG exists that nobody ordered.
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
- 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 ECG belongs to, creates an internal request for it (an ECG done without a prior order) and generates a unique accession number.
Why it is needed
The EHR owns accession numbers. Creating the order afterwards gives the ECG a place in the record, and in billing and reporting.
Technical details
- Patient match on MRN
- Order type = ECG, done without a prior order
- 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 to the PACS as an HL7 text message, together with the Study Instance UID that 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 object headers.
Why it is needed
This is the moment the ECG is linked to its request and can be found from the patient record.
Technical details
- Match StudyInstanceUID
- Set AccessionNumber (0008,0050)
- Optional: study update to rewrite the headers
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
- Watcher tool
- A small service that monitors a folder, picks up each new file and sends it on. It is not part of the DICOM standard; every site builds or buys its own.
- Encapsulated PDF
- A DICOM object that carries a PDF file as its payload, so a document can be stored, queried and shown in the PACS like an image study.
- IAN
- Instance Availability Notification. A DICOM message saying “these objects are now ready”.
- Accession number
- The unique ID of one imaging request. It links a study to its order and report.
- Study Instance UID
- The globally unique ID of the study. Here the watcher tool creates it, because the PDF has none.
- ORM / ACK
- ORM is an HL7 order message. ACK is the receiver’s reply: “got it” or “error”.
- MRN
- Medical Record Number. The patient’s ID in the hospital.
Summary
- The ECG is recorded without an order, so the PDF has no accession number and no Study Instance UID.
- A watcher tool creates the Study Instance UID, wraps the PDF in an Encapsulated PDF object (
1.2.840.10008.5.1.4.1.1.104.1) and sends it withC-STORE. - The tool moves or deletes the file only after the PACS answers with status
0000. - From the
IANonward the flow is the same as for external images: the EHR creates the request and the accession number and returns it in an HL7ORM^O01. - The accession number goes in
OBR-18(IHE) and the Study Instance UID inZDS-1; in the HL7 v2.5.1 option the message is anOMI^O23withIPC-1andIPC-3. - The weak spot is patient identity: if the ECG cart has a wrong or mistyped Patient ID, the order is created for the wrong patient or cannot be matched.
The 9 steps in plain text
The ECG is saved as a PDF on a server disk
The ECG is recorded without an order in the hospital system. The cart (or the ECG management system) writes a PDF to a folder on a server disk. Nothing in the PACS or the EHR knows about it yet.
Why: This is the difference with a normal exam. There is no worklist entry, so the PDF carries no accession number and no Study Instance UID.
A watcher tool finds the file
A separate tool monitors the folder. When a new PDF has been written completely, it reads the patient data, creates a new Study Instance UID and wraps the PDF in a DICOM Encapsulated PDF object.
Why: The PACS speaks DICOM, not file shares. The tool is the bridge, and it must invent the identifiers the PDF does not have.
The tool stores the PDF in PACS
The tool opens an association to the PACS and stores the object with C-STORE. The PACS stores it like any other study, but it is not linked to a request.
Why: From here the PACS sees an ordinary study without an accession number, the same situation as images from outside the hospital.
PACS confirms the store
The PACS answers with a status. Only on Success should the tool mark the file as done, for example by moving it to a "processed" folder. On any failure it keeps the file and retries.
Why: If the tool deletes the file before the PACS has confirmed, an ECG can be lost without anyone noticing.
PACS notifies the EHR with an IAN
The PACS sends the EHR an Instance Availability Notification: “new images are ready, and this is where to fetch them.” It is only a notification; no document travels in it.
Why: The EHR cannot look inside the PACS. This is how it learns that an ECG exists that nobody ordered.
EHR creates the request and accession number
The EHR checks which patient the ECG belongs to, creates an internal request for it (an ECG done without a prior order) and generates a unique accession number.
Why: The EHR owns accession numbers. Creating the order afterwards gives the ECG a place in the record, and in billing and reporting.
EHR sends HL7 ORM back to PACS
The EHR sends the new number to the PACS as an HL7 text message, together with the Study Instance UID that 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 object headers.
Why: This is the moment the ECG is linked to its request and can be found from the patient record.
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 get an ECG PDF from a folder into PACS?
When an ECG is made without an order, a watcher tool picks up the PDF from the server folder, wraps it in a DICOM Encapsulated PDF object with a new Study Instance UID and stores it in the PACS with C-STORE. From there the flow is the same as for external images: the PACS sends the EHR an IAN, the EHR creates the missing request and accession number, and sends it back in an HL7 ORM^O01 with the Study Instance UID. The PACS stores the number on the study and replies with an HL7 ACK.
Which DICOM object holds an ECG PDF?
The Encapsulated PDF Storage SOP Class (1.2.840.10008.5.1.4.1.1.104.1). The PDF is the Encapsulated Document (0042,0011), and the MIME type (0042,0012) must be application/pdf, the only value this IOD allows. This stores the report as a document. It is not the ECG signal: a recording with the waveform itself uses a waveform SOP Class such as 12-lead ECG Waveform Storage (1.2.840.10008.5.1.4.1.1.9.1.1).
Why does the PACS send an IAN if the tool already knows the study?
The tool only talks to the PACS. The EHR has no idea that an ECG without an order exists until the PACS tells it. The IAN is the trigger for the EHR to create the request. Some sites let the watcher tool notify the EHR directly instead, or start the flow with an HL7 message.
What can go wrong with a watched folder?
The tool may read a file that is still being written, so wait until it is complete. A PDF can be sent twice after a restart, so the tool needs a record of what it has already done. The tool must not delete a file before the PACS confirms the store. And the Patient ID taken from the file name or PDF text must be checked, because a wrong ID makes the order land on the wrong patient.
Why not order the ECG first, so there is a worklist entry?
When the ECG is ordered first, the cart can use the modality worklist and the study gets its accession number at the start, as in the worklist lesson. This lesson covers the case where the exam happens first, which is common for bedside and emergency ECGs.
Is the accession number in OBR-3 or OBR-18?
In the IHE Radiology profile the accession number is in OBR-18 and OBR-3 is the filler order number. In the HL7 v2.5.1 option it is in IPC-1. Some interfaces are set up differently, so check the interface specification of both systems.