Page Status: Outdated

Prescription - Change

Sv: användningsfall - Ändra och uppdatera förskrivning

This section describes the process of changing a MedicationRequest for a patient.

The basic approach to achieve this use case is to use http PUT on MedicationRequest.

PUT [base]/fhir/MedicationRequest

Which parts of a MedicationRequest that can be changed are limited and are listed in the section below. This list will be completed with more parameters.

Elements that may be changed

Parameter Comment Implemented
dispenseRequest.dispenseInterval Minimum dispense interval (sv: absolut expeditionsintervall) x
dispenseRequest.initialFill (sv: startförpackning) x
dispenseRequest.validityPeriod.end Prescription validity date (sv: sista giltighetsdag) x
dispenseRequest.validityPeriod.nllFirstDispenseBefore Change when first dispense must be made x
dosageInstruction Corrections in dosage
nllTreatmentDates.treatmentReviewDate Change last day of treatment review (sv: sista datum för uppföljning) x
nllTreatmentDates.treatmentEndDate Change last day of treatment (sv: senaste datum för avslut) x
nllPatientTreatmentReason Change reason text (sv: behandlingsändamål) x
reasonCode Change reason for issuing the prescription (sv: behandlingsorsak) x
status Change the status of the prescription x
more to be added -

Elements not indicated in the column implemented above are not yet persisted in the data layer, meaning that a change on the element will not be present if the resource instance is fetched at a later point.

MedicationRequest status in NLL

Parameter Comment
Active The prescription is available for dispatching (sv: Förskrivningen är tillgänglig för expediering på apotek och potentiellt expedierbar)
On-hold The prescription is NOT available for dispatching (sv: spärrad. Förskrivningen har parkerats och kan inte expedieras)
Cancelled MedicationRequest was faulty registered e.g. wrong medication, patient and is not available. (sv: makulerad, förskrivningen var en felregistrering som dragits tillbaka innan expediering hunnit ske.)
Completed All dispatches have been done for the MedicationRequest (sv: slutexpedierad, förskrivningen är slutexpedierad och inga fler uttag kan göras)
Stopped MedicationRequest is no longer available for dispatches, e.g. due to treatment dates have passed (sv: avslutad, förskrivningen är inte längre giltig för expediering)

Sequence diagram

This interactions shows a sequence where the client needs to change a medication request previously created. The interaction requires a valid authorization token as an initial step, which is not shown in the diagram.

This example shows a sequence where the logical id of the medication request to cancel is already known and can be fetched by a direct GET. This requires that the logical id has been stored or is known due to a recent interaction.

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.


Example 1 - Change validity

This example shows how to change a prescription to give it a new last day of validity (sv: sista giltighetsdag). The interaction is based on http PUT on the MedicationRequest resource and it is required to first fetch the MedicationRequest and the List (Medication List) resource to get the latest version of both. The version of the List resource must be provided on the MedicationRequest and the reason is that the latest potential changes of the patient's medication list should have been considered before a new prescription is created or changed.

PUT [base]/fhir/MedicationRequest

    "extension": [
      "url": "",
            "valueInteger": 42
      "validityPeriod" : {
         "end" : "2020-02-29"

Example 2 - Cancel MedicationRequest

This example shows how to cancel a prescription (sv: makulera förskrivning). The interaction is based on http PUT on the MedicationRequest resource, changing the status to cancelled.

PUT [base]/fhir/MedicationRequest

  "resourceType": "MedicationRequest",
   "status": "cancelled",