FHIR Chat · Batch transaction with ifNoneExist filter · hapi

Stream: hapi

Topic: Batch transaction with ifNoneExist filter


view this post on Zulip Dexter (Mar 11 2021 at 10:00):

I'm trying to send a batch transaction, but want to POST a resource only ifNoneExist is satisfied. But ifNoneExist doesn't seem to work with _filter parameter. Is there an alternative?

view this post on Zulip Dexter (Mar 11 2021 at 10:43):

Something like this works,

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [
        {
            "resource": { /* Group resource */ },
            "request": {
                "method": "POST",
                "ifNoneExist": "member=25" // Works
            }
        }
    ]
}

but this doesn't

{
    "resourceType": "Bundle",
    "type": "transaction",
    "entry": [
        {
            "resource": { /* Group resource */ },
            "request": {
                "method": "POST",
                "ifNoneExist": "_filter=member eq 25"
            }
        }
    ]
}

// Error: Failed to parse match URL[_filter?member eq 25] - URL is invalid (must not contain spaces)"

So I tried "ifNoneExist": "_filter=member%20eq%2025" I get "Invalid match URL[_filter?member%20eq%2025] - URL has no search parameters"

view this post on Zulip Dexter (Mar 12 2021 at 10:01):

Does this mean filtering isn't a valid "search criteria" for conditional HTTP actions?


Last updated: Apr 12 2022 at 19:14 UTC