Page Status: updated 2022-03-24

NLLDispensePaperPrescription (MedicationDispense)

Page index

Introduction

The MedicationDispense resource, shown in the profile NLLDispensePaperPrescription, is used when a dispense is made based on a paper prescription; i.e. the dispense is authorized by a prescription that currently is NOT electronically registered in the Swedish National Medication List.

Note that one major difference between the profiles NLLMedicationDispense (used for dispenses where the prescription is electronically registered in the National Medication List) and NLLDispensePaperPrescription is how data about the authorizing prescription is provided. NLLMedicationDispense has a reference to the prescription, whilst NLLDispensePaperPrescription has a set of attributes that contain prescription details.

Overview

idS Σ0..1System.String
versionIdS Σ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
securityΣ0..*CodingBinding
tagΣ0..*Coding
nllDispatchIdS I0..1Extension(string)
nllNumberOfPackagesDispensedS I0..1Extension(positiveInt)
nllActorDispatchIdS I0..1Extension(string)
nllDispatchRowNoS I0..1Extension(decimal)
nllBenefitChoiceCodeS I0..1Extension(code)Binding
url1..1System.StringFixed Value
valueDateTimedateTime
url1..1System.StringFixed Value
valueReferenceReference(NLLPractitioner)
url1..1System.StringFixed Value
valueCodecode
url1..1System.StringFixed Value
valueCodecode
url1..1System.StringFixed Value
valueBooleanboolean
url1..1System.StringFixed Value
valueDatedate
url1..1System.StringFixed Value
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemS Σ0..1uriFixed Value
valueS Σ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
url1..1System.StringFixed Value
url1..1System.StringFixed Value
valueDateTimedateTime
url1..1System.StringFixed Value
valueStringstring
url1..1System.StringFixed Value
identifier0..*Identifier
partOfI0..*Reference(Procedure)
statusS Σ ?!1..1codeBinding
statusReasonCodeableConceptCodeableConcept
statusReasonReferenceReference(DetectedIssue)
category0..1CodeableConceptBinding
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
subjectS Σ I1..1Reference(NLLPatient)
contextI0..1Reference(Encounter | EpisodeOfCare)
supportingInformationI0..*Reference(Resource)
function0..1CodeableConcept
actorI1..1Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson)
locationI0..1Reference(Location)
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemΣ I0..1uri
codeΣ0..1code
daysSupplyI0..1SimpleQuantity
whenPreparedΣ0..1dateTime
whenHandedOverS1..1dateTime
destinationI0..1Reference(Location)
receiverI0..*Reference(Patient | Practitioner)
note0..*Annotation
sequenceΣ0..1integer
textΣ0..1string
additionalInstructionΣ0..*CodeableConcept
patientInstructionS Σ1..1string
timingΣ0..1Timing
asNeededBooleanboolean
asNeededCodeableConceptCodeableConcept
siteΣ0..1CodeableConcept
routeΣ0..1CodeableConcept
methodΣ0..1CodeableConcept
typeΣ0..1CodeableConcept
doseRangeRange
doseQuantitySimpleQuantity
rateRatioRatio
rateRangeRange
rateQuantitySimpleQuantity
maxDosePerPeriodΣ I0..1Ratio
maxDosePerAdministrationΣ I0..1SimpleQuantity
maxDosePerLifetimeΣ I0..1SimpleQuantity
wasSubstitutedS1..1boolean
type0..1CodeableConcept
reason0..*CodeableConcept
responsiblePartyI0..*Reference(Practitioner | PractitionerRole)
detectedIssueS I0..*Reference(NLLDetectedIssue)
eventHistoryI0..*Reference(Provenance)

Contained resources

References to other resources are based on contained resources in the following cases.

Element Resource Case
subject Patient When a patient is identified by name and birthdate only
nllPrescriptionDetails.nllPrescriber Practitioner Allways

For more information about references and contained resources see Resources - References.

Details

Description of all elements can be found here, Element descriptions.

Mapping of FHIR element names to the National Medication List names can be found here, Element language mappings.

Dosage

For a dispense authorized by a paper prescription the dosageInstruction is limited to only one element, patientInstruction.

General information on how to use the elements in dosageInstruction (the BackBoneElement Dosage) is described on the page Dosage and in the Handbok för vård- och apotekstjänster. Message examples for dosages are available on the page Dosage - Create

Medication dispense statuses

The following statuses are used within NLL for dispenses.

ValueSet medication-dispense-status

Parameter Comment
Completed The dispensed product has been picked up (sv: Expedierat).
Cancelled The dispensed product is not picked up by the patient (sv: Borttaget).

Medication dispense types

The following types are used within NLL for dispenses.

ValueSet dispense-types

Code Display
DD Dose dispensed fill (sv: Dosdispenserat uttag).
SP Standard packing fill (sv: Helförpackningsuttag).
TF Trial fill (sv: Startförpackning).

Supported operations

HTTP methods

Operation Supported Comment
Search (GET, POST) yes See below for supported search options.
Insert (POST) yes Create a new dispense. NB! When dispatching more than one dispense at the same occasion, a Bundle conforming to the NLLDispatch profile must be used.
Update (PUT) yes Change a dispense. Only a very limited set of attributes can be updated.
Delete (DEL) no
Operation (GET, POST) yes See below for supported extended operations.

When interacting with this resource a set of HTTP-headers must be included in the request, see HTTP Header and Authorization.

Query operations

Supported queries

Note that a search for MedicationDispense may return both dispenses authorized by electronic prescriptions and dispenses authorized by paper prescriptions. The recommended way to distinguish between the two is to examine the authorizingPrescription attribute, which will contain a reference to a prescription in the first scenario, but be empty in the second scenaio.

The following query alternatives are available for this resource.

  1. ../MedicationDispense/[id]
  2. ../MedicationDispense/[id]/_history{/[vid]}
  3. ../MedicationDispense/[id]/Provenance
  4. ../MedicationDispense?[parameters]
    Parameter chain:
    patient._id=[id]
    {&hasAuthorizingPrescription=false}
    {&nllDispatchId=[string]}
    {&whenhandedover=ge[date]}

Compartment searches

Supported searches on a compartment. This kind of search returns a bundle with the related resources.

  1. ../MedicationDispense/[id]/Provenance returns all related provenances.

Include & reverse includes

Include and revinclude are not supported by this resource.

For generic information about how to search in FHIR look here.

Search parameters

The table below shows all supported search parameters.

Parameter Description Comment
MedicationDispense/[id] A read based on the logical ID (UUID) of a detached dispense
../MedicationDispense/<uuid>
_history A vread to get all versions of a medication dispense
../MedicationDispense/<uuid>/_history
_history/[vid] A vread to get a specific version of a medication dispense
../MedicationDispense/<uuid>/_history/3
patient._id UUID of the patient
..?patient._id=<uuid>
hasAuthorizingPrescription Dispenses related to a paper-based prescription
..&hasAuthorizingPrescription=false
If not specified all type of dispenses are returned
nllDispatchId Id of a dispatch
..&nllDispatchId=123
whenhandedover Date, greater than or equal, when the medication was dispensed at the pharmacy
..&whenhandedover=ge2021-08-31
Required prefix: ge

Other operations

Operation Comment
$verify
NLLVerify

Invocations

URL: [base]/$verify

URL: [base]/MedicationRequest/$verify URL: [base]/MedicationDispense/$verify

This operation does NOT change content

Parameters (In)

NameCardinalityTypeDocumentation
resource0..1MedicationRequest(NLLMedicationRequest)

The MedicationRequest to be verified. This type of verification must be directed to the medication request end-point [base]/MedicationRequest/$verify.

resource0..1MedicationDispense(NLLMedicationDispense)

The MedicationDispense to be verified. This type of verification must be directed to the medication dispense end-point [base]/MedicationDispense/$verify.

resource0..1MedicationDispense(NLLDispensePaperPrescription)

The MedicationDispense to be verified. This type of verification must be directed to the medication dispense end-point [base]/MedicationDispense/$verify.

resource0..1Bundle(NLLDispatch)

A Bundle containing the MedicationDispenses to be verified. This type of verification must be directed to the service base end-point [base]/$verify.

Return Values (Out)

NameCardinalityTypeDocumentation
detectedIssues1..1boolean

Has the value 'true' if any AFF errors or warnings are detected, otherwise 'false'

issues0..1OperationOutcome(NLLOperationOutcome)

If the Automatic Format and Constitution Control (sv. Automatiska format- och författningskontroller AFF-kontroller) returns any errors or warnings, these are displayed as DetectedIssues in an OperationOutcome. No OperationOutcome will be returened if there are no issues.

Must be invoked with a HTTP POST. This operation is invoked on MedicationDispense and MedicationRequest resources to verify them according to the Automatic Format and Constitution Control (sv. Automatiska format- och författningskontroller AFF-kontroller). It is also possible to verify a set of MedicationDispenses by using $verify on the service base and providing a NLLDispatch. It is important that the content of the resource parameter matches the end-point of the request.

A Provenance object must be included in the HTTP header X-Provenance.