Hi,
Can someone help me with conditional create in transation bundle. I am adding
"request": {
"method": "POST",
"url": "Practitioner",
"resourceType ": "Practitioner",
"headers": {
"Content-Type": "application/fhir+json",
"If-None-Exist": "identifier=lifedot|35400"
}
}
to execute but getting status: 400,
statusText: 'Bad Request',
I am using nodejs client :
const bundleFile = 'bundle.json';
const parent = `projects/${projectId}/locations/${cloudRegion}/datasets/${datasetId}/fhirStores/${fhirStoreId}`;
const bundle = JSON.parse(fs.readFileSync(bundleFile));
const request = {parent, requestBody: bundle};
const resource =
await healthcare.projects.locations.datasets.fhirStores.fhir.executeBundle(
request
);
const textData = await resource.data.text();
const parsedData = JSON.parse(textData);
console.log(`Created FHIR resource with ID ${textData}`);
}
executeFhirBundleTxn().catch(console.error);
Attached the bundle.json
Thanks in advance,
Abhijit