fhirbase / fhirbase-plv8

[DEPRECATED] Fhirbase 2.0 is an FHIR relational storage
https://health-samurai.io/fhirbase
Other
105 stars 39 forks source link

Wrong response for conflict on update #152

Open szymonp-kainos opened 8 years ago

szymonp-kainos commented 8 years ago

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"
                }
            ]
        }
    ]
}
Andrzej-Pietrzak commented 7 years ago

Thanks, this looks great! This issue can be closed imo