**Page Status:** updated 2025-02-18
# NLLTransactionBundle (Bundle)
### Page index
* [Introduction](#intro)
* [Overview](#overview)
* [Details](#details)
* [Provenance details](#provenance-details)
* [Error handling](#error-handling)
* [A note on identities (Placeholder ids)](#placeholder-ids)
* [Supported operations](#operations)
* [HTTP methods](#http-methods)
* [Query operations](#query-operations)
* [Examples](#examples)
## Introduction {#intro}
The profile {{link: NLLTransactionBundle}} is used when managing multiple resources in a transaction. Supported profiles in an transaction bunlde are
- MedicationRequest (Sv. Förskrivning)
- NLLDataLock (sv.Spärr)
- NLLMultiDoseDispensingBasis (Sv. Dosunderlag)
- NLLMultiDoseDispConsent (Sv. Dossamtycke)
- NLLMedicationDispense (Sv. uttag)
- NLLDispensePaperPrescription (Sv. uttag pappersrecept)
More information about recommended scenarion is described in ["Resurssamling – Bundle, Handbok för vård och apoteksaktörer - Nationella läkemedelslistan.][5] and in [Examples](#examples)
Regarding information about how the "must support"-property is used in the Swedish National MedicationList, please refer to the page {{pagelink:Resources}}
In this use case the endpoint is `[base]` and not `[base]/Bundle`.
## Overview {#overview}
{{tree:NLLTransactionBundle, buttons}}
{{dict:NLLTransactionBundle}}
{{xml:NLLTransactionBundle}}
{{json:NLLTransactionBundle}}
{{table:NLLTransactionBundle}}
## Details {#details}
Description of all elements can be found here, [Element descriptions][2].
### Provenance details, activity and reason {#provenance-details}
The resource activities and for separate resaons. Therefore this data, which usually is provided in the header x-provenance, is now sent per resource within the bundle. This is done on the extension Bundle.entry.request.extension:nllProvenanceDetails {{link:NLLProvenanceDetails}} which gives the possibility to provide a unique "activity" and "reason"(when needed) for each reource.
### Error handling {#error-handling}
If an error is detected on one of resources in the bundle the requests are rejected with an HTTP status of 4xx. The returned {{pagelink:OperationOutcome}} will contain information about the detected issues and errors.
### A note on identities (Placeholder ids) {#placeholder-ids}
Normally, when creating a resource (e.g., a MedicationRequest), assigning a logical identity has no effect, as the system assigns the identity upon creation.
However, in the context of a TransactionBundle, it is required to set a "placeholder ID" if another resource needs to reference it before its final logical ID is known.
For further details on using placeholder IDs for NLLMedicationDispense and NLLDataLock, please refer to {{pagelink:Bundles-TransactionBundle.md}}
## Supported operations {#operations}
### HTTP methods {#http-methods}
| Operation | Supported | Comment |
|-
| POST | yes | See comment below |
Example:
A new resource is created by setting entry.request.method to POST. An existing resource is updated by setting entry.request.method to PUT.
The result is eighter a Bundle of type transaction-response with one entry per entry in the incoming Bundle or an OperationOutcome if the request was rejected.
When interacting with this resource a set of HTTP-headers must be included in the request, see {{pagelink:HttpHeaderAndAuthorization}}.
### Query operations {#query-operations}
*Search is not supported for this resource.*
## Examples {#examples}
See {{pagelink:Bundles-TransactionBundle.md}}
[1]: "HL7 FHIR Bundle"
[2]: "Element details"
[3]: "Element language mappings"
[4]: "Handbok för vård och apoteksaktörer - Nationella läkemedelslistan"
[5]: "Resurssamling – Bundle, Handbok för vård och apoteksaktörer - Nationella läkemedelslistan"