microsoft / microsoft/fhir-server
Prefer: return=representation not respected
Nobody has claimed this yet.
- Dominant language
- TSQL
- Stars
- 1.4k
- Forks
- 592
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 41
Description
When I send a HTTP POST request to `/Patient` with a `If-None-Exist` and `Prefer: return=representation` headers then the current server implementation doesn't return me an existing patient in the response. The server only responds with a `200 OK` and an empty HTTP body, but my understanding is that I should get back the entire Patient resource as well.
I am using the official .NET FHIR client which has support for a [conditional create](https://docs.fire.ly/projects/Firely-NET-SDK/client/crud.html?highlight=Create#conditional-interactions) which is supposed to do exactly that according to the FHIR spec. It seems the microsoft fhir server doesn't implement this correctly at the moment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the server's conditional-create handling for POST /Patient and compare the existing-resource response when Prefer: return=representation is present with the FHIR behavior described. Trace the request through the relevant endpoint handling and verify that an existing Patient is returned in the HTTP response body rather than only a 200 OK status.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100