Page Status: updated 2022-10-31
Multi dose dispensing (Basic) - Fetch
Page index
Introduction
Sv. Hämta dosunderlag.
This page describes how to fetch the resource Basic of type MultiDoseDispensingBasis for a patient by a few examples.
A MultiDoseDispensingBasis can be fetched in different ways. See MultiDoseDispensingBasis query operations for information about all options.
In short, a query request is either a read, that is, a retrieval via the resource ID, or a search via a search condition. The result differs between a read and a search. A search results in a Bundle being returned containing all matching resources. If there are no hits, an empty Bundle is returned. A read results in the requested resource being returned or an error if no resource with the requested ID exists. If a system error occurs both searches and reads result in an error (i.e. an OperationOutcome).
Fetching a Basic of type MultiDoseDispensingBasis is done by one of the following operations.
GET [base]/Basic/[id]
GET [base]/Basic?code=multidosedispbasis&[search parameters]
A set of HTTP headers must be provided in order to fetch a MultiDoseDispensingBasis. See HTTP Header and Authorization for more information about the various headers used by the National Medication List.
See NLLMultiDoseDispensingBasis for more information about the MultiDoseDispensingBasis resource.
Before a MultiDoseDispensingBasis can be retrieved and presented to the user other information is needed from the National Medication List. For more information on different scenarios and what information is required for each scenario, see Handbok för vård- och apotekstjänster: Verksamhetsområden.
Examples
HTTP Headers
See HTTP Header and Authorization for generic information about all HTTP headers used by the National Medication List including information about authorization, purpose and access type. The authorization token is translated to an authority role. The authority role together with the purpose and type of access is used by the National Medication List to determine what actions a user may perform and what information the user may access.
Header | Comment |
---|---|
authorization | The users's security token |
prefer | Type of returned content |
x-access | The cause for the call |
x-context-id | An ID to group a sequence of requests |
x-org-info | Information about the users's organisation |
x-patientref | The logical ID of the patient |
x-provenance | A provenance resource with information about the user interacting with NLL |
x-purpose | The purpose of the call |
x-request-id | A random and unique ID |
x-user-agent | Information about the calling system |
Example 1 - Fetch a new multi dose dispensing basis
This example shows how to fetch a newly created multi dose dispensing basis, (Create a multi dose dispensing).
The request is made as a read by the logical id,
GET [base]/Basic/88943897-1d83-4041-b1d4-d91e38ff7228
.
HTTP headers
Header | Value | Comment |
---|---|---|
authorization | {...,"LEGITIMATIONSKOD":"920007","APOTEKSID":"7350046611966","YRKESKOD":["AP"],"loa":3} |
Selected information from the OAuth2-ticket in decoded form |
prefer | ||
x-access | UTAN_KRAV_SAMTYCKE |
|
x-org-info | ||
x-patientref | b00a0407-b781-43e8-983b-74fdfb8eb97d |
|
x-provenance | ||
x-purpose | EXPEDIERING |
|
x-request-id | 7076b765-9f77-4c11-9b26-d8ea5de7299a |
|
x-user-agent | {"name":"Test system testaren","version":"0.01010101010.1 beta"} |
Decoded value |
HTTP body: Fetch MultiDoseDispensingBasis
Example 2 - Fetch an updated multi dose dispensing basis
This example shows how to fetch a multi dose dispensing basis were the pharmacy has been added, (Update a multi dose dispensing).
The request is made as a search by the logical id of the patient, b00a0407-b781-43e8-983b-74fdfb8eb97d
GET [base]/Basic?code=multidosedispbasis&patient._id=b00a0407-b781-43e8-983b-74fdfb8eb97d
.
HTTP headers
Header | Value | Comment |
---|---|---|
authorization | {...,"LEGITIMATIONSKOD":"920007","APOTEKSID":"7350046611966","YRKESKOD":["AP"],"loa":3} |
Selected information from the OAuth2-ticket in decoded form |
prefer | ||
x-access | UTAN_KRAV_SAMTYCKE |
|
x-org-info | ||
x-patientref | b00a0407-b781-43e8-983b-74fdfb8eb97d |
|
x-provenance | ||
x-purpose | EXPEDIERING |
|
x-request-id | 7076b765-9f77-4c11-9b26-d8ea5de7299a |
|
x-user-agent | {"name":"Test system testaren","version":"0.01010101010.1 beta"} |
Decoded value |
HTTP body: Fetch MultiDoseDispensingBasis