Skip to content

Bad Request error on PATCH operation for replace operation #565

@LumiProj

Description

@LumiProj

Describe the bug
I am encountering an issue with the PATCH operation in the FHIR server. While the PATCH operation works fine for adding operations, I consistently receive a "Bad Request" error (HTTP 400) when attempting to perform a replace operation using PATCH. I am providing a sample JSON payload below to illustrate the problem:

To Reproduce
Steps to reproduce the behavior:

  1. Go to Postman
  2. "resourceType": "Parameters",
    "parameter": [
        {
            "name": "operation",
            "part": [
                {
                    "name": "type",
                    "valueCode": "replace"
                },
                {
                    "name": "path",
                    "valueString": "Patient.identifier.where(system='urn:oid:1.2.36.146.595.217.0.2')"
                },
                {
                    "name": "value",
                    "valueIdentifier": {
                        "use": "official",
                        "type": {
                            "coding": [
                                {
                                    "code": "MR",
                                    "display": "Medical record number"
                                }
                            ]
                        },
                        "system": "urn:oid:1.2.36.146.595.217.0.2",
                        "value": "0-95941-01"
                    }
                }
            ]
        }
    ]
    

}


**Expected behavior**
The PATCH operation with a "replace" type should execute successfully, updating the specified resource in accordance with the provided JSON payload.

 

**Spark version**
  - Version:1.5.17.0

**Operating system + Database**
  - OS: Linux Ubantu focal
  - Database: [MongoDB]
 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions