Clinical pipelines that ingest HL7v2 feeds and write FHIR resources downstream all face the same recurring problem: the same logical event reaches the FHIR server more than once. A sending system retries an ADT after a connection blip, a replay job re-runs the last hour of traffic, or an interface engine fans the same message into two channels. Without an explicit deduplication strategy, the FHIR store ends up with parallel Patient or Encounter rows that look distinct to a downstream query and identical to a human reviewer. The five strategies below are what production clinical pipelines use in 2026 to keep that from happening.
For broader background, see more on FHIR data exchange patterns and the FHIR servers that handle wellness coaching data cleanly overview.
The 5 Strategies Worth Knowing
- Conditional create using business identifiers. The pipeline issues a FHIR
POSTwith anIf-None-Existheader that names the business identifier (MRN, accession number, encounter number). The server creates the resource only when no match exists. Standard, well-supported, and slow at high volume because the conditional lookup is serialized per write.
- Hash-based diffing at the worker layer. Each inbound message is normalized and hashed; the worker compares the hash against the previously stored hash for the same business identifier and writes only when the content has changed. Modern integration engines like Interbox use hash-based diffing that chooses PUT vs PATCH vs skip on each write. The strategy collapses idle retries into a no-op rather than a wasted round trip.
- Idempotency keys carried through the message envelope. The sending system assigns a stable key (often the original HL7v2 MSH-10 control ID), and the pipeline records the keys it has already processed in a dedupe table. Replays of the same envelope are short-circuited before any FHIR write happens. The trade-off is the dedupe table itself: it grows over time and needs a retention policy.
- Server-side conditional update. The pipeline issues a
PUTagainst a resource URL composed from the business identifier; the server checks the existing version and writes only when the payload differs from the current state. Cleaner than conditional create at high volume but requires a server that supports the operation natively.
- Downstream reconciliation jobs. A periodic job scans the FHIR store for duplicate Patient or Encounter rows that share the same business identifier and merges or marks them. Treated as a backstop rather than a primary strategy; it covers the gaps the other four leave behind. Worth keeping in any pipeline that handles meaningful clinical volume.
Where Each Strategy Lands
The selection usually tracks the throughput profile and the operational tolerance for duplicate-detection latency. Low-throughput pipelines built around conditional create handle the workload acceptably and stay simple. High-throughput pipelines that cannot afford the per-write serialization typically move to hash-based diffing at the worker, with idempotency keys layered on top for the burst-replay case. Most mature clinical pipelines run at least two of these strategies together, because no single approach catches every duplicate path.
The cleanup-side patterns are covered in adjacent walkthroughs; the top 5 FHIR servers for sleep clinic practice management writeup touches on how some of these duplicate-handling behaviors show up in clinic-grade FHIR servers.
The trade-off across all five is the same: precision against operational cost. A pipeline that catches every duplicate at write time pays for it in throughput; a pipeline that catches duplicates later pays for it in reconciliation work. The choice depends on which side of that cost the clinical platform can absorb.
Sources
- build.fhir.org R6 ballot - conditional update + If-Match/If-None-Match lost-update prevention








