Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHIR Bundle.entry.response.status is missing response code (display only) #26

Open
reinkrul opened this issue Feb 10, 2025 · 0 comments

Comments

@reinkrul
Copy link

reinkrul commented Feb 10, 2025

It now only shows, for instance, "Created" instead of "204" or "204 Created".

According to the spec, the response status field must start with the numeric status code:

The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.

(https://hl7.org/fhir/R4/bundle-definitions.html#Bundle.entry.response.status)

Steps to reproduce

Request:

POST http://localhost:57715/fhir/r4
Content-Type: application/fhir+json

{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "request": {
        "method": "POST",
        "url": "Patient"
      },
      "resource": {
        "resourceType": "Patient",
        "id": "example"
      }
    }
  ]
}

Yields:

HTTP/1.1 200 OK
Content-Type: application/fhir+json
Date: Mon, 10 Feb 2025 06:27:33 GMT
Server: Kestrel
Transfer-Encoding: chunked

{
  "resourceType": "Bundle",
  "id": "5b0fbbe3-646f-4788-ba79-593b7f01e06f",
  "type": "transaction-response",
  "entry": [
    {
      "resource": {
        "resourceType": "Patient",
        "id": "f53ed2c1-72bb-4e18-964e-793bc004df6f",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2025-02-10T06:27:34.312553+00:00"
        }
      },
      "response": {
        "status": "Created",
        "location": "http://localhost:5826/fhir/r4/Patient/f53ed2c1-72bb-4e18-964e-793bc004df6f",
        "etag": "W/\"1\"",
        "lastModified": "2025-02-10T06:27:34.312553+00:00",
        "outcome": {
          "resourceType": "OperationOutcome",
          "id": "dc16f15a-5c77-45da-ba9c-32fc421817cb",
          "issue": [
            {
              "severity": "information",
              "code": "success",
              "diagnostics": "Created Patient/f53ed2c1-72bb-4e18-964e-793bc004df6f"
            }
          ]
        }
      }
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant