I am trying to merge two FHIR patient resources using the C# Firely SDK.
Unfortunately, this always fails with an error
Invalid request. Query parameter sourcePatientId is missing
although it is provided.
Does someone know what I am doing wrong?
Using the same endpoint and parameters in Postman works.
string baseURL = "...";
string targetPatientID = "123-234-5";
string sourcePatientID = "1234-4321-1";
FhirClientsettings settings = new(); // added some headers for auth, etc.
FhirClient client = new(baseURL, settings);
var parameters = new Parameters
{
{ "sourcePatientId", new FhirString(patSource) },
{ "targetPatientId", new FhirString(patTarget) }
};
var uri = new Uri($"{baseUrl}/Patient/$merge", UriKind.Absolute);
Resource mergeResult = await client.OperationAsync(uri, parameters);