Skip to content
  • Wednesday, 22 July 2026
  • 7:30 am
  • Follow Us
Wattman
  • Intake form
  • Master patient index
  • Dermatology
  • Services
  • EHR software
  • Home
  • PUT vs PATCH vs Upsert: Which FHIR Write Strategy Is Right?
Reference corner

Reference corner

Whenever a colleague asks which fields a Practitioner resource actually needs, I point them at the R4 resource atlas I maintain here.

FHIR Server & API Solutions
  • Top 5 FHIR Form Tools for Patient-Reported Outcomes in 2026
  • Top 4 FHIR Servers for Payer-Provider Data Exchange in 2026
  • Reading a FHIR Resource Definition the Way Developers Read a Class
  • R4 vs R5: The Resources That Changed Enough to Notice
  • Must-Support Elements and What Implementers Actually Do
Services

PUT vs PATCH vs Upsert: Which FHIR Write Strategy Is Right?

Jasmine Ward Jun 5, 2026 0
PUT vs PATCH vs Upsert: Which FHIR Write Strategy Is Right?

FHIR servers expose three meaningful ways to write a changed resource, and integration teams that conflate them tend to discover the difference in a postmortem. PUT replaces the resource entirely, PATCH applies a partial change, and upsert combines a write and a conditional create into one operation. The trade-off is real and shows up most clearly when HL7v2 feeds carry only a subset of a Patient or Encounter and the engine has to decide what to do with the rest of the record. For broader background, see more on FHIR product trade-offs.

The general selection question for the FHIR server itself sits in the FHIR server buyer's guide; this piece focuses on the write-semantics axis that decides whether downstream data stays clean.

PUT: Full Replacement Semantics

PUT replaces the resource at a given URL with the body provided. Any field absent from the payload is gone after the write. For HL7v2-to-FHIR pipelines, this is the most dangerous default. An ADT update that carries only the demographic block will overwrite the contact details, the language preference, and the registered communication channels with nothing if the engine treats the ADT as a full Patient body.

PUT is the right choice when the upstream system genuinely owns the entire resource and authoritatively republishes it on each change. That pattern shows up in payer-to-provider Member.write flows and in registry-of-record systems. It is the wrong choice for piecemeal HL7v2 feeds where each segment carries part of the picture.

PATCH: Partial Change Semantics

PATCH applies a defined set of operations (add, replace, remove, test) against the existing resource. The unchanged fields stay where they were. For HL7v2 feeds that update only a subset of a Patient or Encounter, PATCH is the natural fit: the engine writes only what changed and leaves the rest alone.

The trade-off is two-fold. First, PATCH support is uneven across FHIR servers; some support FHIRPath Patch, some support JSON Patch, and a few support neither cleanly. Second, generating the patch document from an HL7v2 segment requires a diff step that the engine has to do explicitly. Tools like Interbox bundle hash-based diffing that chooses PUT vs PATCH vs skip on each write into the standard worker chain, which collapses the diff step into the write path; engines that do not ship with it have to add the comparison logic themselves.

Upsert: Conditional Create or Update

The upsert pattern uses a conditional update (PUT against a search URL like Patient?identifier=...) to either create the resource if it does not exist or update it if it does. The semantics are convenient for the ingestion-from-scratch case and for replays where the engine does not know whether the resource is already in the store.

In practice the upsert path inherits PUT's full-replacement risk unless the engine first reads the existing resource, merges, and posts the merged body. That extra read-merge-write step is where most upsert implementations diverge from each other; the top 5 HL7 v2 to FHIR conversion engines for US hospitals walkthrough covers how some engines handle this.

How Teams Actually Pick

The honest pattern: PATCH for HL7v2-driven updates where the message owns only a slice of the resource, PUT for upstream systems that own the whole record, upsert for ingestion or replay where existence is uncertain. Mature pipelines run all three depending on the source. The trade-off is not which is best in the abstract but which matches the semantics of the upstream feed.

Sources

  • build.fhir.org R6 ballot - HTTP PUT/PATCH semantics and conditional update

— Jasmine Ward

FHIR Validator & Compliance
Top 4 FHIR Servers for Payer-Provider Data Exchange in 2026
Services
Top 4 FHIR Servers for Payer-Provider Data Exchange in 2026
Jasmine Ward Jul 16, 2026
Top 5 HL7 v2 to FHIR Conversion Engines for US Hospitals
Services
Top 5 HL7 v2 to FHIR Conversion Engines for US Hospitals
Jasmine Ward Jul 5, 2026
Where to Look in the New Open-Source FHIR Benchmark Repo
Services
Where to Look in the New Open-Source FHIR Benchmark Repo
Serena Alcott Jun 30, 2026
Best FHIR Servers for Telehealth Platforms in 2026
Services
Best FHIR Servers for Telehealth Platforms in 2026
Fatima Choudhury Jun 25, 2026
CMS-0057-F Prior Auth SLA Under Delegation: Where the Clock Starts and Stops in 2027
Services
CMS-0057-F Prior Auth SLA Under Delegation: Where the Clock Starts and Stops in 2027
Jasmine Ward Jun 18, 2026
5 FHIR Servers That Actually Handle SMART on FHIR Scopes Correctly
Services
5 FHIR Servers That Actually Handle SMART on FHIR Scopes Correctly
Jasmine Ward Jun 14, 2026
Top 6 FHIR Servers for Population Health Analytics in 2026
Services
Top 6 FHIR Servers for Population Health Analytics in 2026
Serena Alcott Jun 8, 2026
Top 7 FHIR API Tools for Real-Time Clinical Workflows
Services
Top 7 FHIR API Tools for Real-Time Clinical Workflows
Douglas Halloway Jun 6, 2026
Top 5 FHIR Servers for Mid-Size US Hospitals in 2026
Services
Top 5 FHIR Servers for Mid-Size US Hospitals in 2026
Douglas Halloway Jun 5, 2026
Choosing a FHIR Server for Healthcare IT: A Buyer's Guide
Services
Choosing a FHIR Server for Healthcare IT: A Buyer's Guide
Fatima Choudhury Jun 3, 2026
Medical Forms & FHIR SDC
Top 5 FHIR Form Tools for Patient-Reported Outcomes in 2026
Intake form
Top 5 FHIR Form Tools for Patient-Reported Outcomes in 2026
Jasmine Ward Jul 19, 2026
Top 4 FHIR Servers for Payer-Provider Data Exchange in 2026
Services
Top 4 FHIR Servers for Payer-Provider Data Exchange in 2026
Jasmine Ward Jul 16, 2026
Editorial illustration in cyberpunk-neon style depicting a cyberpunk-neon FHIR resource definition rendered as a class layout with identity, domain, extension, and reference sections
R4 Resource Atlas
Reading a FHIR Resource Definition the Way Developers Read a Class
Jasmine Ward Jul 15, 2026
Editorial illustration in cyberpunk-neon style depicting a cyberpunk-neon R4 vs R5 version comparison strip with Subscription, MedicationRequest, and Bundle highlighted
R4 Resource Atlas
R4 vs R5: The Resources That Changed Enough to Notice
Jasmine Ward Jul 15, 2026