I encountered an issue while using the client.execute() method for performing conditional updates in my code.
When I provide parameters in the path directly, the operation creates a new resource after each call instead of performing the expected conditional update.
However, when I pass the parameters as arguments using the params parameter, the condition update works as expected.
Exsample:
# Issue - Creates a new resource instead of conditionally updating
await client.execute(
path="/fhir/Encounter?identifier=external-ehr|test-encounter-1",
method="PUT",
data=data
)
# Working Solution - Performs conditional update as expected
await client.execute(
path="/fhir/Encounter",
params={"identifier": "external-ehr|test-encounter-1"},
method="PUT",
data=data
)
I encountered an issue while using the
client.execute()
method for performing conditional updates in my code. When I provide parameters in the path directly, the operation creates a new resource after each call instead of performing the expected conditional update. However, when I pass the parameters as arguments using theparams
parameter, the condition update works as expected.Exsample: