Page Status: Outdated

Create consent for dose dispensing

This section describes how to create a consent for a patient that should start receiving prescriptions in dose dispense bags (sv: dospatient).

The scenario is based on creating a Consent resource referring to the profile NLLMultiDoseDispConsent and the correct category.

POST [base]/fhir/Consent

Interaction diagram

This interaction shows a sequence where a client wants to create a consent for a patient to start getting prescriptions dispensed in dose bags (sv: bli dospatient). This consent must be available before any MedicationRequests for dose dispensing can be created. The interactions are initiated with the client fetching the logical id of the patient in question. The sequence is finalized with a POST request where the patient is referenced with its logical id and the correct category is defined.

Examples

This example shows how to create a consent for a patient that should start receiving prescriptions for medication in dose dispense bags (sv: bli dospatient). To create a consent for a person, it is required to first fetch the Patient resource for that person in order to find its logical id.

Header: required authorization and provenance information

Parameter Mandatory Comment
Authorization Yes Bearer [valid OAuth2 token]
X-Access N/A -
X-Purpose N/A -
X-Provenance Yes Must be provided with information as described below
activity.coding.code : REGISTRERA_DOSSAMTYCKE
agent.type : enterer/author and enterer .
agent.who : NLLPractitioner At least name, identifier, workplaceName must be defined. Make sure that the individual is the same as in the authorization ticket.

An example of a full provenance json structure can be seen in General information about Use Cases

POST [base]/fhir/Consent
{
    "resourceType": "Consent",
    "meta": {
        "profile": [
            "http://electronichealth.se/fhir/StructureDefinition/NLLMultiDoseDispConsent"
        ]
    },
    "category": [
        {
            "coding": [
                {
                    "code": "consent-dose-disp",
                    "system": "http://electronichealth.se/fhir/ValueSet/consent-types-1"
                }
            ]
        }
    ],
    "patient": {
        "reference": "Patient/0e5b86db-82ba-479c-bdbb-53e84c187d47"
    }
}

Comment: patient reference is the logical id from the patient fetched in the previous search query