Page Status: updated 2023-11-22

MedicationRequest

Page index

Introduction

In the Swedish National Medication List, the MedicationRequest resource, shown in the profile NLLMedicationRequest, represents a prescription. This resource is used when prescribing medicinal products and medical consumables.

The profile is used for both ordinary packaged prescriptions (sv helförpackningsförskrivning) and for dose dispensed prescriptions (sv: dosdipenserad förskrivning).

A prescription can be issued to a patient identified with a Swedish personal identity number or by name and birth date.

When the patient has a Swedish personal identity number (sv: personnummer) the "subject" element is a literal reference to the Patient. If the perscription is issued to a patient identified by name and birthdate, the "subject" element is an inline reference to a Patient, i.e. a contained Patient, and the prescription must be adressed to a specific pharmacy (by the element nllReceivingPharmacy).

The prescriber (the "requester" element) is always handled as a contained Practitioner.

When a prescription is renewed (sv: förnyad), replaced (sv: ersatt) or when a new parallell prescrioption is registered (sv: registrera), the new prescription is linked to the preceeding prescription in a prescription chain. (More information about parallell prescriptions is available in this section below: Parallell prescriptions in a prescription chain).
All prescriptions in a prescription chain have the same prescription chain-id (in the element nllPrescriptionChain).

For every change in a patient's medication list (medication requests, medication dispenses, multi dose dispenses, multi dose consents) meta data about the change is saved as a Provenance.

Overview

idS Σ0..1string
id0..1string
extensionI0..*Extension
versionIdS Σ0..1id
lastUpdatedΣ0..1instant
sourceΣ0..1uri
profileΣ0..*canonical(StructureDefinition)
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ0..1code
displayΣ0..1string
userSelectedΣ0..1boolean
tagΣ0..*Coding
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
nllPatientTreatmentReasonS I0..1Extension(string)
nllPrescriptionChainS I0..1Extension(uuid)
nllPrescriptionFormatS I1..1Extension(code)Binding
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
url1..1uriFixed Value
nllRegistrationBasisS I1..1Extension(code)Binding
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
url1..1uriFixed Value
nllCompletePrescriptionChoiceS I0..1Extension(code)Binding
nllOrdinationsIdS I0..1Extension(decimal)
nllTidigareOrdinationsidS I0..1Extension(decimal)
modifierExtension?! I0..*Extension
id0..1string
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueStringstring
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valuePositiveIntpositiveInt
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valuePositiveIntpositiveInt
url1..1uriFixed Value
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemS Σ1..1uriFixed Value
valueS Σ0..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
statusS Σ ?!1..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ1..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textΣ0..1string
intentS Σ ?!1..1codeBindingFixed Value
category0..*CodeableConcept
priorityS Σ0..1codeBinding
doNotPerformΣ ?!0..1boolean
reportedBooleanboolean
reportedReferenceReference(Patient | Practitioner | PractitionerRole | RelatedPerson | Organization)
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
id0..1string
extensionI0..*Extension
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
id0..1string
extensionI0..*Extension
systemS Σ1..1uriFixed Value
versionΣ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
subjectS Σ I1..1Reference(NLLPatient)
encounterI0..1Reference(Encounter)
supportingInformationI0..*Reference(Resource)
authoredOnS Σ1..1dateTime
requesterS Σ I1..1Reference(NLLPractitioner)
performerI0..1Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson | CareTeam)
performerTypeΣ0..1CodeableConcept
recorderI0..1Reference(Practitioner | PractitionerRole)
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
reasonReferenceI0..*Reference(Condition | Observation)
instantiatesCanonicalΣ0..*canonical()
instantiatesUriΣ0..*uri
basedOnΣ I0..*Reference(CarePlan | MedicationRequest | ServiceRequest | ImmunizationRecommendation)
groupIdentifierΣ0..1Identifier
courseOfTherapyType0..1CodeableConcept
insuranceI0..*Reference(Coverage | ClaimResponse)
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueCodecode
authorStringstring
authorReferenceReference(Practitioner | Patient | RelatedPerson | Organization)
timeΣ0..1dateTime
textS Σ1..1markdown
id0..1string
nllObservandumDoseS I0..1Extension(boolean)
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueStringstring
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
nllSubSequenceS I0..1Extension(integer)
nllDosageTypeS I0..1Extension(code)
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
modifierExtensionΣ ?! I0..*Extension
sequenceS Σ1..1integer
textS Σ0..1string
id0..1string
extensionI0..*Extension
codingΣ0..*Coding
textS Σ0..1string
patientInstructionS Σ1..1string
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
eventΣ0..*dateTime
id0..1string
nllSubSequenceDurationS I0..1Extension(Quantity)
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..1codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1codeBindingFixed Value
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1codeBindingFixed Value
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1codeBindingFixed Value
countS Σ0..1positiveInt
countMaxΣ0..1positiveInt
durationS Σ0..1decimal
durationMaxΣ0..1decimal
durationUnitS Σ0..1codeBinding
frequencyS Σ0..1positiveInt
frequencyMaxS Σ0..1positiveInt
periodS Σ0..1decimal
periodMaxS Σ0..1decimal
periodUnitS Σ0..1codeBinding
dayOfWeekS Σ0..*codeBinding
timeOfDayS Σ0..*time
whenS Σ0..*codeBinding
offsetΣ0..1unsignedInt
codeΣ0..1CodeableConceptBinding
asNeededBooleanboolean
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemS Σ0..1uri
versionS Σ0..1string
codeS Σ1..1code
displayΣ0..1string
userSelectedΣ0..1boolean
textS Σ0..1string
id0..1string
extensionI0..*Extension
typeΣ0..1CodeableConcept
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1code
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1code
id0..1string
extensionI0..*Extension
valueS Σ0..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ0..1code
id0..1string
extensionI0..*Extension
valueS Σ0..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1code
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
valueS Σ0..1decimal
comparatorΣ ?!0..1codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1code
id0..1string
extensionI0..*Extension
valueS Σ0..1decimalFixed Value
comparatorΣ ?!0..1codeBinding
unitΣ0..1string
systemS Σ I0..1uriFixed Value
codeS Σ0..1codeFixed Value
maxDosePerAdministrationΣ I0..1SimpleQuantity
maxDosePerLifetimeΣ I0..1SimpleQuantity
id0..1string
nllNumberOfPackagesPrescribedS I0..1Extension(positiveInt)
nllDosePackagingS I1..1Extension(boolean)
nllPrescriptionCommunicableDiseasesActS I0..1Extension(boolean)
nllPatientPharmaceuticalBenefitsActS I1..1Extension(boolean)
nllConditionsPharmaceuticalBenefitsActS I0..1Extension(boolean)
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemΣ I0..1uri
codeΣ0..1code
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemΣ I0..1uri
codeΣ0..1code
url1..1uriFixed Value
id0..1string
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueBooleanboolean
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
valueΣ1..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemΣ I0..1uri
codeΣ0..1code
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
url1..1uriFixed Value
nllNumberOfFillsRemainingS I0..1Extension(unsignedInt)
nllReceivingPharmacyS I0..1Extension(Reference(NLLPharmacyLocation))
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
id0..1string
extensionI0..*Extension
useΣ ?!0..1codeBinding
typeΣ0..1CodeableConceptBinding
systemS Σ0..1uriFixed Value
valueS Σ1..1string
periodΣ I0..1Period
assignerΣ I0..1Reference(Organization)
nllSubstitutionOpposedS I0..1Extension(code)Binding
nllNumberOfDispensesAllowedS I0..1Extension(unsignedInt)
id0..1string
extensionI0..*Extension
url1..1uriFixed Value
valueDatedate
modifierExtensionΣ ?! I0..*Extension
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
id0..1string
extensionI0..*Extension
valueS Σ1..1decimalFixed Value
comparatorΣ ?!0..0codeBinding
unitS Σ0..1stringFixed Value
systemS Σ I0..1uriFixed Value
codeS Σ1..1codeFixed Value
durationI0..0Duration
id0..1string
extensionI0..*Extension
valueS Σ1..1decimal
comparatorΣ ?!0..1codeBinding
unitΣ0..1string
systemS Σ I0..1uri
codeS Σ1..1codeBinding
id0..1string
nllFirstDispenseBeforeS I0..1Extension(date)
startΣ I0..1dateTime
endS Σ I0..1dateTime
numberOfRepeatsAllowedS0..1unsignedInt
id0..1string
extensionI0..*Extension
valueS Σ0..1decimal
comparatorΣ ?!0..0codeBinding
unitΣ0..1string
systemΣ I0..1uri
codeΣ0..1code
expectedSupplyDurationI0..1Duration
performerI0..1Reference(Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
allowedBooleanboolean
reason0..1CodeableConcept
priorPrescriptionS I0..1Reference(NLLMedicationRequest)
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
requester Practitioner Always
dispenseRequest.nllReceivingPharmacy Location Always

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

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 request statuses

The following statuses are used within the National Medication List for prescriptions. For some updates additional information about the reason for change of status is automatically added, see value set Förskrivningsstatusorsak (medication-request-status-reasons).

Parameter Comment
active The prescription is available for dispatching (sv: Aktiv).
on-hold The prescription is NOT available for dispatching (sv: Parkerad).
cancelled MedicationRequest was faulty registered e.g. wrong medication or patient (sv: Makulerad).
completed All dispatches have been done for the MedicationRequest (sv: Slutexpedierad).
stopped MedicationRequest is no longer available for dispatches, e.g. due to the validity period dates have passed (sv: Avslutad).

See Value Set Förskrivningsstatus (medication-request-status).

Prescription chains

One of the features in the National Medication List is prescription chains. A prescription chain is a sequence of prescriptions where an old prescription has been terminated and replaced by a new prescription.

MedicationRequest.extension:nllPrescriptionChain is set by the National Medication List on all new prescriptions so from a technical point of view all precriptions are part of a chain. However the term prescription chain refers to when there are two or more prescriptions with the same chain ID.

A prescription chain is created when a prescription is replaced (sv. Ersätts) or renewed (sv. Förnyas). To replace or renew a prescription, it is required that the chain ID element, MedicationRequest.extension:nllPrescriptionChain, is included in the POST MedcationRequest request. The new prescription will then have the same chain ID as the old prescription and MedicationRequest.priorPrescription will be set to refer to the old prescription.

It is possible to fetch all prescriptions that are part of a chain via the prescription chain ID, ../MedicationRequest?nllPrescriptionChain=[UUID]. See below for more search options.

In order to sort all prescriptions in the chain in chronological order the element MedicationRequest.priorPrescription is used. It points at the prior prescription in the chain so the first prescription in the chain has no prior prescription, or a prior prescription that is missing because old records has reached end of life and have been removed. The second prescription in the chain points at the first one and so on. The chain may also include cancelled (sv. makulera) prescriptions, i.e. a prescription that was never used. It is therefore possible that more than one prescription points at the same prior prescription.

Below is an example of how a prescriptions in a prescription chain may be linked together:

prescription-chain-illustration

Parallel prescriptions in a prescription chain

There is a special case when two (and only two) prescriptions in the same prescription chain may have the statuses 'active', 'completed' or 'on-hold' during the same point in time. This means that there can be two prescriptions in the same prescription chain that may authorize dispensing at the same time.

A parallel prescription is created when a future change of a treatment is needed and two prescriptions are created in the same prescription chain. As the change is in the future the patient may need to be able to get dispenses authorized by both parallel prescriptions.

For parallel prescriptions, the usage start date of the new prescription must be on the following day compared to the usage end date of the prior prescription.

Read the Handbok för vård- och apotekstjänster for more details about parallel prescriptions. Also note that there are requirements about how parallel prescriptions are presented in the user interface.

Some scenarios regarding parallell prescriptions are supported by the profile NLLPrescriptionBundle which is described in this implementation guide NLLPrescriptionBundle

prescription-active-parallell

The active prescriptions in the picture above can be changed in different ways according to the rules described in the Handbok för vård- och apotekstjänster. One possible outcome is that the Active Prescription 3 could point at a cancelled prescription as its prior prescription, which would happen if prescription 2 in the picture is cancelled.

Annotations

The annotation element is profiled to handle four different type of notes: the prescriber's comment (sv förskrivarens kommentar), the pharmacy's comment (sv apotekets kommentar), legacy delivery message (sv leveransmeddelande) and legacy prescribers note (sv: notat förskrivare).

Supported operations

HTTP methods

Operation Supported Comment
Search (GET, POST) yes See below for supported search options.
Insert (POST) yes Create a new prescription.
Update (PUT) yes Change a prescription. Only a 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

The following query alternatives are available for this resource.

  1. ../MedicationRequest/[id]

  2. ../MedicationRequest/[id]/_history{/[vid]}

  3. ../MedicationRequest?[parameters]
    Parameter chains:

    Chain 1
    patient._id=[id]|nllPrescriptionChain=[UUID]
    {&status=[code]}
    {&authoredon=ge[date]{&authoredon=le[date]}}

    Chain 2
    nllReceivingPharmacy.identifier=[GLN]
    &birthdate=[date]|&authoredon=ge[date]{&authoredon=le[date]}
    {&birthdate=[date]}
    {&authoredon=ge[date]{&authoredon=le[date]}}
    {&status=[code]}

    Chain 3
    prescriptionSetId=[id]
    {&rowId=[id]{&productRowId=[id]}}

    Chain 4
    provenance._id=[id]

    Chain 5
    nllOrdinationsId=[id]

Compartment searches

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

  1. ../MedicationRequest/[id]/Provenance returns all related Provenances.
  2. ../MedicationRequest/[id]/MedicationDispense returns all related MedicationDispenses (only NLLMedicationDispense).
  3. ../Provenance/[id]/MedicationRequest returns all related MedicationRequests.
  4. ../Patient/[id]/MedicationRequest{?[parameters]} returns all related MedicationRequests for the specified patient matching the optional parameters.

Include & reverse includes

Supported usage of include and revinclude. This kind of search returns a bundle of both the base resource and the related resources specified in the parameter.

  1. ../MedicationRequest?[parameters]&_revinclude=MedicationDispense:prescription returns a medication request together with all related medication dispenses. See above for a list of valid parameters.

Example: ../Patient/[id]/MedicationRequest?status=active&_revinclude=MedicationDispense:prescription returns all active MedicationRequests including their MedicationDispenses for the specified patient.

  1. ../MedicationRequest?[parameters]&_revinclude=Provenance:target:MedicationRequest returns one or more MedicationRequests together with their Provenances. The Provenance returned is the one pointing at the returned version of the MedicationRequest. See above for a list of valid parameters.

Example: ../MedicationRequest?patient._id=<uuid>&status=active&_revinclude=Provenance:target:MedicationRequest returns the patient's active MedicationReqeusts including one provenance per medication request.

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

Search parameters

The table below shows all supported search parameters.

Parameter Description Comment
MedicationRequest/[id] A read based on the logical ID (UUID) of a medication request
../MedicationRequest/<uuid>
_history A vread to get all versions of a prescription
../MedicationRequest/<uuid>/_history
_history/[vid] A vread to get a specific version of a prescription
../MedicationRequest/<uuid>/_history/3
authoredon Authored date intervall of a prescription
..?authoredon=le2021-01-20&authoredon=ge2021-02-01
Supported prefix: le and ge.
When searching on nllReceivingPharmacy.identifier one of authoredon and patient.birthdate must be included.
birthdate Birthdate of a patient
..&birthdate=2021-01-20
When searching on nllReceivingPharmacy.identifier one of authoredon and birthdate must be included.
nllPrescriptionChain ID of a prescription chain (UUID)
..?nllPrescriptionChain=<uuid>
nllOrdinationsId OrdinationsId from OR (Receptdepå human).
..?nllOrdinationsId=25149
nllReceivingPharmacy.identifier A pharmacy's business identifier number (GLN)
..?nllReceivingPharmacy.identifier=1234567890123
A prescription is bound to a specific pharmacy if the patient has no identification number
patient._id Logical ID (UUID) of a patient
..?patient._id=<uuid>
prescriptionSetId ID on migrated prescription originally created in NEF/PIRR and OR
..?prescriptionSetId=<uuid>
productRowId Additional ID on some prescriptions originally created in NEF/PIRR and OR
..&productRowId=761456987
prescriptionSetId + rowId + productRowId is in some cases needed to identify a prescription in NLL
provenance._id Logical ID (UUID) of a provenance
..&provenance._id=<uuid>
rowId Additional ID on some prescriptions originally created in NEF/PIRR and OR
..&rowId=321654987
prescriptionSetId + rowId is in some cases needed to identify a prescription in NLL
status Comma separated list of prescription status
..&status=active,on-hold
Se above for a list of all statuses
_revinclude Related resources of the specified type to include in the response
..&_revinclude=MedicationDispense:prescription
See HL7 Include other resources for more information

Other operations

Operation Comment
$cancel-prescription

Invocations

URL: [base]/MedicationRequest/[id]/$cancel-prescription

This operation changes content

Return Values (Out)

NameCardinalityTypeDocumentation
result0..1boolean

In the case of a successfull call, the result is set to "true"

message0..1string

A message is returned in the case of a successfull call.

Can be invoked with a HTTP POST. This operation is used when it is not possible to fetch a patient's medication list, which is the case when the patient does not have a Swedish national identification number (sv personnummer), i.e. the prescription was created using birthdate instead of identity number. The only way to cancel a prescription of such type is to call this operation. N.B. In order to do so the ID of the prescription must be stored by the requestor when creating the prescription.

$print

Invocations

URL: [base]/MedicationRequest/[id]/$print

This operation changes content

Return Values (Out)

NameCardinalityTypeDocumentation
nllDispenseList0..*MedicationDispense

Prints additional dispenses made for this prescription that are not included on the pdf.

nllTreatmentEndDate0..1date

Last date for ending this treatment (sv: senaste datum för avslut)

nllTreatmentReviewDate0..1date

Last date for review (sv: senaste datum för uppföljning)

nllUsageEndDate0..1date

End date for dosage usage (sv: sista doseringsdag)

nllUsageStartDate0..1date

Start date for dosage usage (sv: första doseringsdag)

pdf1..1Binary

A Base64 encoded PDF file of the prescription original

Can be invoked with a HTTP POST.

This operation changes the format of the prescription (MedicationRequest) from digital to paper based. After a successful call, the returned PDF is printed out and serves as the prescription. Further dispenses will have to be made based on the information included on the printed prescription. Apart from the PDF, this operation will also return information about any dispenses that are not included on the printed prescription as a list of MedicationDispenses (the PDF only includes the 2 latest dispenses). In addition one of "treatment end date" or "treatment review date" may occur in the response.

Under certain circumstances, it is possible to generate a new PDF print-out from a paper based prescription that has already been printed. The new generated PDF will then contain the information "Receptkopia" (prescription copy) visible on the print-out.

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

$print-prescription-history

Invocations

URL: [base]/MedicationRequest/[id]/$print-prescription-history

This operation does NOT change content

Return Values (Out)

NameCardinalityTypeDocumentation
return1..1Binary

A Base64 encoded PDF file which includes a prescription's history and dispenses.

Can be invoked with a HTTP POST or GET. This operation is invoked on a MedicationRequest resource to initiate the creation of a pdf report which inludes the selected prescription's history and dispensed medications. This report is intended for pharmacists, not patients. NB! The response containes a Binary resource without the parameter format.

$restore

Invocations

URL: [base]/MedicationRequest/$restore

This operation changes content

Parameters (In)

NameCardinalityTypeDocumentation
resource1..2Reference(NLLReference)

Reference to the MedicationRequest(s) that should be restored to previous versions. Shall contain version specific reference to the resource version that will be restored on the following format: MedicationRequest/[id]/_history/[vid].

Return Values (Out)

NameCardinalityTypeDocumentation
result1..2MedicationRequest

The restored MedicationRequests.

Can be invoked with a HTTP POST. This operation is used for restoring one or two (if parallell) MedicationRequests to their previous versions.

$verify

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.