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,