Page Status: Outdated

Medication list info - Fetch

Page index

Introduction

Sv: användningsfall - hämta patientinformation (läkemedelslisteversion, särskilda läkemedel, spärrad information finns )

This section describes possible operations for the resource MedicationListInfo (MedicationList) which summarizes essential information about prescriptions and privacy information (sv: spärrar). This list is realized in the profile NLLMedicationListInfo The medication list resource should always be accessed before Medication Requests are created or changed.

GET [base]/fhir/Basic

It is not supported to fetch all resources. This means that a search operation always must include the id of the patient (logical id).

Sequence diagram

This interactions shows a sequence where the client is fetching a patient's medication list resource. The interaction requires a valid authorization token as an initial step, which is not shown in the diagram.

Note that the requests shown in the diagram doesn't include the full basepath. It only shows the last part of the http request including resource and possible search/query parameters.

Examples

Header: required authorization and provenance information

Parameter Mandatory Comment
Authorization Yes Bearer [valid OAuth2 token]
X-Access Yes Applicable type, e.g. UTAN_KRAV_SAMTYCKE
X-Purpose Yes Applicable type, e.g. VARD
X-Provenance N/A
X-Request-ID Yes UUID
X-User-Agent Yes
X-OrgInfo Yes Only applicapble for health care organizations
X-PatientRef Yes Logical ID (UUID) of the patient

This is an example of access and purpose type. The type must reflect the given situation. A full list of access and purpose types will be enclosed in the developer portal Confluence, EHM

Example 1, fetch list based on patient's logical id

Client has previously fetched the patient resource and can use the logical id of the patient to fetch the medication list.

Search-query: GET [base]/fhir/Basic?patient._id=6bb27f9c-852a-43ca-a425-6a0b4b40b2f6&code=NLLMedicationListInfo

Response

{
    "resourceType": "Bundle",
    "id": "1113255e-0f8e-4ab0-a23f-01ca23c76041",
    "meta": {
        "lastUpdated": "2020-11-11T09:13:48.651+01:00"
    },
    "type": "searchset",
    "total": 1,
    "link": [
        {
            "relation": "self",
            "url": "https://nll-fhir-server-nll-ext18-prj1.ext.ecp.receptpartner.se/fhir-server/fhir/MedicationListInfo?patient._id=21e495cf-aab6-482e-b630-cdd87b437cab"
        }
    ],
    "entry": [
        {
            "fullUrl": "https://nll-fhir-server-nll-ext18-prj1.ext.ecp.receptpartner.se/fhir-server/fhir/MedicationListInfo/d10e9a94-fbb8-4deb-b229-37a664d359dc",
            "resource": {
                "resourceType": "Basic",
                "id": "d10e9a94-fbb8-4deb-b229-37a664d359dc",
                "meta": {
                    "profile": [
                        "http://electronichealth.se/fhir/StructureDefinition/NLLMedicationListInfo"
                    ]
                },
                "extension": [
                    {
                        "url": "http://electronichealth.se/fhir/StructureDefinition/Version",
                        "valueInteger": 8
                    },
                    {
                        "url": "http://electronichealth.se/fhir/StructureDefinition/NLLControlledDrugs",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://electronichealth.se/fhir/StructureDefinition/NLLPrivacyLock",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://electronichealth.se/fhir/StructureDefinition/NLLMigratedRecordsLF",
                        "valueBoolean": false
                    }
                ],
                "code": {
                    "text": "Medication List Information"
                },
                "subject": {
                    "reference": "Patient/21e495cf-aab6-482e-b630-cdd87b437cab"
                }
            }
        }
    ]
}