PDS FHIR API – Removing / Adding in a single PATCH request

We are seeing an issue when updating patient nominations using the PDS FHIR API.

When we remove a Nominated Pharmacy and add a Medical Appliance Supplier in the same PATCH request, the request is rejected with the following error:

{

*"issue": \[*

    *{*

        *"code": "structure",*

        *"details": {*

            *"coding": \[*

                *{*

                    *"code": "INVALID_UPDATE",*

                    *"display": "Update is invalid",*

                    *"system": "https://fhir.nhs.uk/R4/CodeSystem/Spine-ErrorOrWarningCode",*

                    *"version": "1"*

                *}*

            *\]*

        *},*

        *"diagnostics": "Invalid update with error - cannot replace a pharmacy type when it does not exist - add one instead for type 'https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicalApplianceSupplier'",*

        *"severity": "error"*

    *}*

*\],*

*"resourceType": "OperationOutcome"*

}

Could you please confirm whether changing the nomination type (for example, removing a Nominated Pharmacy and adding a Medical Appliance Supplier) is supported within a single PATCH request, or whether this must be performed as two separate PATCH requests?

Thanks,

I think that the documentation in “Special considerations for removals” on Personal Demographics Service - FHIR API - NHS England Digital should cover this.

A remove followed by an add?

If you log a Service Desk ticket with request ids, datetimes and nhsnumber (for PTL test data) that will help understand it.

We are performing “remove and add” (i.e removed nominated pharmacy and added medical appliance) in the same patch request. Is it even allowed? Test is performed against INT sandpit

NHSNumber = 9738507758

send Date Time = 2026-07-27T15:16:52

request ID= 776062FF-3BC4-4332-9540-E75F9267E515

Incident ref no= CS1565769