Page Status: Outdated

Dispense - Cancel

Page index

Introduction

Sv: backa/kreditera uttag

This section describes the process of cancelling a dispatch (sv: backa/kreditera uttag)

The basic approach to achieve this use case is to use HTTP PUT on the MedicationDispense resource.

PUT [base]/fhir/MedicationDispense

Sequence diagram

The diagram below shows the typical sequence needed to TODO.

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.

See the generic example for other type of responses.

Examples

HTTP Header

Required authorization and provenance information.

TODO

Parameter Mandatory Comment
Authorization Yes
X-Access N/A
X-Purpose N/A
X-Provenance Yes activity.coding.code = BACKA_UTTAG
agent.type = enterer
agent.who = NLLPractitioner (at least name, identifier (user acronym) and workplace identifier must be defined. Make sure that the individual is the same as in the authorization ticket)
X-Request-ID
X-User-Agent
X-OrgInfo
X-PatientRef

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][1].

See HTTP Header and Authorization for generic information about the HTTP header.

Example 1

PUT [base]/fhir/MedicationDispense

{
  "resourceType": "MedicationDispense",
  "id": "de4e4ead-2d59-4971-a936-04a10ea60d6e",
  "meta": {
    "versionId": "1",
    "profile": [
      "http://electronichealth.se/fhir/StructureDefinition/NLLMedicationDispense"
    ]
  },
  "extension": [
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLActorDispatchId",
      "valueString": "1"
    },
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLDispatchId",
      "valueString": "10175979334"
    },
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLNumberOfPackagesDispensed",
      "valuePositiveInt": 1
    },
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLBenefitChoiceCode",
      "valueCoding": {
        "system": "http://ehalsomyndigheten.se/fhir/ValueSet/benefit-choice-codes",
        "code": "U"
      }
    },
    {
      "url": "http://electronichealth.se/fhir/StructureDefinition/NLLDeductedQuantity",
      "valueQuantity": {
        "value": 0.0,
        "system": "http://unitsofmeasure.org"
      }
    }
  ],
  "identifier": [
    {
      "system": "http://electronichealth.se/fhir/NamingSystem/dispenseIdOR",
      "value": "15904"
    }
  ],
  "status": "completed",
  "medicationCodeableConcept": {
    "coding": [
      {
        "system": "http://medication.ehm.se/nplpackid",
        "code": "10010101108564"
      }
    ]
  },
  "authorizingPrescription": [
    {
      "reference": "MedicationRequest/2f227c87-2737-4017-b000-c250d1b85dc7/_history/1"
    }
  ],
  "quantity": {
    "value": 30.0
  },
  "whenHandedOver": "2020-04-29T10:11:44Z",
  "note": [
    {
      "text": "My note"
    }
  ],
  "substitution": {
    "wasSubstituted": false
  }
}