FHIR Chat · Conditional PUT not working · implementers

Stream: implementers

Topic: Conditional PUT not working


view this post on Zulip Dexter (Jul 01 2021 at 09:42):

How do I specify resource ID in PUT request of a bundle?

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [
        {
            "resource": {
                "resourceType": "Group",
                "id": "4812",
                // other fields
            },
            "request": {
                "method": "PUT",
                "url": "Group?identifier=3.5"
            }
        }
    ]
}

But this updates the resource which has the identifier 3.5 (4809). My intention is up update 4812 when there's no other resource that has the identifier 3.5

view this post on Zulip Dexter (Jul 01 2021 at 09:43):

I expected this to have happened

One Match, resource id provided but does not match resource found:
The server returns a 400 Bad Request error indicating the client id specification was a problem preferably with an OperationOutcome

view this post on Zulip Dexter (Jul 01 2021 at 09:56):

I just noticed that normal PUT request doesn't work too

view this post on Zulip Dexter (Jul 01 2021 at 10:05):

GET to /Group?identifier=3.5 returns 1 resource with ID 4809.

I'm trying to update resource 4812 only if there's no other resource with identifier 3.5.

PUT to /Group?identifier=3.5 updates 4809, even though a group with that identifier exists (4809)

Body is

{
    "resourceType": "Group",
    "id": "4812",
    // other fields
}

view this post on Zulip Lloyd McKenzie (Jul 01 2021 at 14:57):

What server are you hitting this issue on?

view this post on Zulip Dexter (Jul 02 2021 at 04:16):

Lloyd McKenzie said:

What server are you hitting this issue on?

If I'm not mistaken, both on the public hapi.fhir.org and the latest jpa hapi container

view this post on Zulip Lloyd McKenzie (Jul 02 2021 at 15:44):

Suggest raising it on #hapi

view this post on Zulip Dexter (Jul 05 2021 at 04:51):

Thanks, just posted that here

view this post on Zulip Dexter (Jul 05 2021 at 13:24):

(deleted)


Last updated: Apr 12 2022 at 19:14 UTC