Skip to content

Wrong response for conflict on update #152

@szymonp-kainos

Description

@szymonp-kainos

When doing update with id on conlict:

SELECT fhir_update_resource('{"ifMatch": "4df606bd-3642-4e07-9111-701389381d5e", "resource": {"resourceType":"Patient","id":"4df606bd-3642-4e07-9111-701389381d5e","meta":{"versionId":"4df606bd-3642-4e07-9111-701389381d5e"},"identifier":[{"use":"official","system":"Hospital Number","value":"6b574482-8d13-4186-a6a8-c2bd41e6fb66"}],"name":[{"use":"official","family":["!family!"],"given":["Gordon"]}],"gender":"male","active":"true"}}');

fhirbase returns operation outcome with code 409 instead of conflict as stated in http://hl7.org/fhir/2016May/valueset-issue-type.html

{
    "resourceType": "OperationOutcome",
    "issue": [
        {
            "severity": "error",
            "code": "409",
            "diagnostics": "Newer than [4df606bd-3642-4e07-9111-701389381d5e] version available [de9abe99-d4d2-41ef-a9a3-10c529c63f84]",
            "extension": [
                {
                    "url": "http-status-code",
                    "valueString": "409"
                }
            ]
        }
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions