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

POST Bundle url re-write incorrect #92

Open
chrisgrenz opened this issue Jun 30, 2018 · 0 comments
Open

POST Bundle url re-write incorrect #92

chrisgrenz opened this issue Jun 30, 2018 · 0 comments

Comments

@chrisgrenz
Copy link

chrisgrenz commented Jun 30, 2018

When posting a Bundle (transaction) with internal references, the server re-writes them correctly ONLY if the fullUrl's base is the test server's. Otherwise, the reference is not linked correctly.

This SHOULD work (works on HAPI):

{
  "resourceType": "Bundle",
  "entry": [
    {
      "request": {
        "method": "POST",
        "url": "Patient"
      },
      "fullUrl": "http://example.com/Patient/test-patient-1",
      "resource": {
        "resourceType": "Patient",
        "id": "test-patient-1",
        "managingOrganization": {
          "reference": "Organization/test-organization-1"
        }
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "Organization"
      },
      "fullUrl": "http://example.com/Organization/test-organization-1",
      "resource": {
        "resourceType": "Organization",
        "id": "test-organization-1",
        "name": "Clinical Lab",
      }
    }
  ]}

This does work:

{
  "resourceType": "Bundle",
  "entry": [
    {
      "request": {
        "method": "POST",
        "url": "Patient"
      },
      "fullUrl": "http://test.fhir.org/r3/Patient/test-patient-1",
      "resource": {
        "resourceType": "Patient",
        "id": "test-patient-1",
        "managingOrganization": {
          "reference": "Organization/test-organization-1"
        }
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "Organization"
      },
      "fullUrl": "http://test.fhir.org/r3/Organization/test-organization-1",
      "resource": {
        "resourceType": "Organization",
        "id": "test-organization-1",
        "name": "Clinical Lab",
      }
    }
  ]}
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