Interoperability: DICOM, HL7 FHIR, and Integration Standards

The technical standards that govern how AI tools exchange data with imaging systems, electronic health records, and clinical infrastructure. What researchers need to know about DICOM and FHIR.


A hospital runs on dozens of separate software systems bought from different vendors over a couple of decades. The scanners, the image archive, the radiology information system, the electronic health record and the lab system all have to pass information to one another, and they do it through a small set of standards.

An AI tool that wants to work in that environment has to speak the same standards, both to get its inputs and to deliver its results. You don't need to be able to implement any of them. You do need to know what each one is for, because they explain a lot about what is in your research data, what gets lost when it is exported, and what your engineers mean when they say integration will take three months.

The systems you'll hear about

The PACS (picture archiving and communication system) stores the images and serves them to viewers. Radiologists read from it.

The RIS (radiology information system) manages orders, scheduling and reports for the imaging department. In many hospitals its functions now live inside the EHR.

The EHR (electronic health record) holds the patient's chart: demographics, orders, notes, lab results, medications.

A VNA (vendor-neutral archive) is long-term image storage that isn't tied to one PACS vendor.

Imaging speaks DICOM. Nearly everything else speaks HL7, in an older and a newer version.

DICOM

DICOM (Digital Imaging and Communications in Medicine) is the standard for medical images. It grew out of a joint effort by the American College of Radiology and the manufacturers' association NEMA in the 1980s, and it took its current name in 1993. Every CT, MRI, ultrasound and digital X-ray machine you will meet produces it.

DICOM is two things, which is the first point of confusion. It is a file format and it is also a set of network services for moving those files around.

What is in the file

A DICOM file contains the pixel data and a header of data elements describing it. Each element has a numeric tag written as two four-digit hexadecimal numbers, a name and a value. The tag (0010,0010) is the patient's name, (0008,0060) is the modality, (0028,0030) is the pixel spacing. There are thousands of standard tags, covering the patient, the study, the equipment and the acquisition settings. Vendors also add private tags of their own, whose contents are not publicly documented and which sometimes hold things you would not expect, including patient information.

Images are organized in a four-level hierarchy: patient, study, series, instance. A study is one imaging visit. A series is one acquisition within it, such as a single MRI sequence. An instance is usually one image, so a CT series of 300 slices is traditionally 300 files, though newer "enhanced" objects can hold a whole series in one. Each study, series and instance has a unique identifier (UID), a long string of numbers and dots that is meant to be unique in the world.

A few things follow for research:

  • The header is where the scanner manufacturer, model, software version, slice thickness and reconstruction settings live. This is the metadata that 2.6 Multi-Site and Multi-Device Data asked you to keep.
  • The header is also where most of the patient identifiers are, which is why de-identification is done tag by tag (see 2.7 De-Identification, Privacy, and Regulatory Compliance for Research Data).
  • The header says how to interpret the pixels: the rescale slope and intercept, the bit depth, whether the greyscale is inverted (see 2.5 Data Preprocessing and Augmentation).
  • Research formats such as NIfTI, PNG or NumPy arrays keep the pixels and discard most or all of the header. Converting is fine for training. Just make sure the header information is saved somewhere first, since you can't get it back from a PNG.

How it moves

The classic DICOM network services have terse names. C-STORE sends an object from one system to another. C-FIND queries an archive for studies matching some criteria. C-MOVE asks an archive to send studies somewhere. Systems identify each other by an "application entity title" and have to be configured to know about one another, which is a job for the hospital's PACS administrator.

The newer web version is called DICOMweb, and it does the same jobs over ordinary web protocols: QIDO-RS to query, WADO-RS to retrieve and STOW-RS to store. Cloud platforms and newer products mostly prefer it.

In a typical deployment, the PACS or a routing system is configured to forward studies of the relevant kind to the AI system as they arrive. The AI system processes them and sends results back as new DICOM objects attached to the same study.

How results come back

This part deserves more attention than it usually gets, because the form of the result decides what the radiologist can do with it. There are several kinds of DICOM object an AI tool can produce.

A secondary capture is a picture: the original image with marks burned into it, or a summary page. Every PACS can display one, which is why it is the most common choice. Its weakness is that it is only a picture. Nobody can toggle the marks off, edit them, or query the findings later.

A Structured Report (SR) holds findings as coded data: a measurement, a location, a probability, each with a standard code. It is the right container for results that other software should be able to read.

A Segmentation object (SEG) holds outlines as a mask aligned to the original images, so that a viewer can overlay it and switch it on and off.

A presentation state holds annotations to display over an image without altering the image.

The structured forms are better, and support for displaying them varies a lot between PACS products, so vendors often send a secondary capture as well, to be safe. If you are planning a deployment, find out early what the site's viewer can display.

HL7 version 2

HL7 is the standards organization for clinical and administrative data outside imaging. Its version 2 messaging standard dates from the late 1980s and is still the workhorse inside hospitals.

An HL7 v2 message is a few lines of text with fields separated by vertical bars. Messages are sent when something happens. An ADT message announces an admission, discharge or transfer. An ORM message carries an order. An ORU message carries a result, such as a lab value or a finished radiology report.

It is old and each hospital's implementation has local quirks, but it is everywhere. An AI tool might listen to order messages to find out why a scan was requested, or send its result as an ORU message so that it lands in the chart.

FHIR

FHIR (Fast Healthcare Interoperability Resources, pronounced "fire") is HL7's modern standard. It was designed to work the way web developers expect. Version R4, published at the end of 2018, was the first with parts declared stable, and it is the version most systems implement.

FHIR models clinical data as resources. Patient, Observation, Condition, MedicationRequest, DiagnosticReport and ImagingStudy are all resource types, each with a defined structure, usually exchanged as JSON over a web API. To get a patient's recent lab results, an application asks the server for Observation resources for that patient. In the United States, federal rules made under the 21st Century Cures Act require certified EHRs to offer FHIR APIs, which has made access far more uniform than it used to be.

FHIR doesn't replace DICOM. The ImagingStudy resource describes a study and points to the images, which stay in DICOM.

Two standards built on FHIR are relevant to AI tools:

  • SMART on FHIR is a way of launching a third-party application inside the EHR, with the user's login and the current patient passed along securely. It is how an AI tool can appear as a panel in the chart without being a separate program.
  • CDS Hooks lets the EHR call an outside service at defined moments, such as when a clinician opens a chart or signs an order, and display the advice that comes back as a card. It is the natural route for a risk model whose output should appear at a decision point.

For research, FHIR is increasingly how structured clinical data is extracted to go alongside images: diagnoses, lab results, outcomes.

Codes and profiles

Moving a message is half of interoperability. The other half is both ends agreeing on what the contents mean. That is the job of terminologies: SNOMED CT for clinical concepts, LOINC for lab tests and observations, RadLex for radiology terms, and ICD for diagnoses in billing and statistics. A finding sent as free text can be read by a person. A finding sent with a standard code can be counted, searched and acted on by software.

The standards also leave a lot of choices open, so two systems can each follow DICOM and still fail to work together. IHE (Integrating the Healthcare Enterprise) is an organization that publishes profiles, which are agreed recipes for using the standards to do a specific job. Its radiology group has published profiles specifically for AI, covering how results should be encoded and how AI processing fits into the imaging workflow. Vendors also publish a DICOM conformance statement for each product, listing what it supports. Your engineers will read those before promising anything.

What this means for a project

Integration is slow for reasons that have little to do with technology. Each connection needs the cooperation of the hospital's IT and PACS teams, a security review, a test environment and a place in somebody's work queue. Budget months, and involve those teams at the planning stage. They also know things about the local systems that aren't written down anywhere.

Train on what the clinical systems produce. If your model was developed on curated research files, it has never seen the scout images, the dose reports, the reformats and the oddly labelled series that fill a real study. The deployed system needs a step that picks out the right series, and that step needs testing as much as the model does.

Ask for structured outputs if you have any say. Results sent as coded data can be audited, compared with the final report and used for monitoring later (see 8.6 Monitoring AI Performance in Production). A burned-in picture can't.

And keep the identifiers consistent. The link between a research case and its original study UID, held securely at the source site, is what lets you go back for outcomes or missing metadata.

Key takeaways

  • Hospitals exchange data through a few standards. An AI tool has to use them to receive studies and return results.
  • DICOM is both a file format and a set of network services. The file header carries patient, equipment and acquisition metadata that research needs and that conversion to other formats throws away.
  • DICOM organizes images as patient, study, series and instance, each with a unique identifier.
  • AI results can go back as a secondary capture (a picture any PACS can show) or as structured objects such as Structured Reports and Segmentations (data other software can use). Viewer support varies.
  • HL7 version 2 is the older message standard for orders, results and admissions. FHIR is the modern web-based standard that models data as resources.
  • SMART on FHIR and CDS Hooks are how outside applications and decision support appear inside the EHR.
  • Standard codes and IHE profiles are what make the exchanged data mean the same thing at both ends.
  • Integration takes months and depends on hospital IT. Plan for it early.

This article is part of the AI in Clinical Research Knowledge Base.