Open
Description
Describe the bug
When adding the X-Provenance
header to a POST of a Transaction Bundle, only the first resource that is created or updated will have a linked Provenance.
FHIR Version?
R4
Data provider?
SQL Server
To Reproduce
Steps to reproduce the behavior:
Add some resources in a Transaction:
POST https://server_url
content-type: application/json
X-Provenance: { "resourceType": "Provenance", "recorded": "2023-06-19T11:05:24+02:00", "agent": [ { "who": { "reference": "Device/Test" } } ] }
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Patient?identifier=urn%3Apatient%7C6108116119",
"resource": {
"resourceType": "Patient",
"identifier": [
{
"system": "urn:patient",
"value": "6108116119"
}
],
"name": [
{
"family": "Doe",
"given": [
"Jane"
]
}
]
},
"request": {
"method": "PUT",
"url": "Patient?identifier=urn%3Apatient%7C6108116119"
}
},
{
"fullUrl": "Encounter?identifier=urn%3Adossier%7C80554680",
"resource": {
"resourceType": "Encounter",
"identifier": [
{
"system": "urn:dossier",
"value": "80554680"
}
],
"status": "in-progress",
"class": {
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "IMP"
},
"subject": {
"reference": "Patient?identifier=urn%3Apatient%7C6108116119"
},
"period": {
"start": "2014-12-11T08:31:00+01:00"
}
},
"request": {
"method": "PUT",
"url": "Encounter?identifier=urn%3Adossier%7C80554680"
}
}
]
}
Only the patient will have a linked Provenance.
Expected behavior
Every Resource that has been created or updated by the transaction should have a linked Provenance.
Actual behavior
Only the first Resource created or updaten by the transaction has a linked Provenance.