Skip to content

Aggregation

Concepts

Term Definition References
Medication plan (current medication) The medication plan is the documentation of all the medication information for a patient at a certain point of time.
The medication plan can be presented as a medication card or as an eMediplan (eMediplan is not supported by the service, it is another way of displaying the medication plan).
See IHE Pharmacy Community Medication List (PML) and IPAG’s definition (FR, DE), § 2.1 and § 2.5.
Medication treatment A medication treatment corresponds to one single medication the patient was planned to take in the past or is planned to take presently or in the future, including its name, dosage, frequency of intake, etc.
Medication treatments are created every time an MTP document is received.
This service considers two kinds of medication treatments: “simple” and “prescribed”.
Simple medication treatments are created with just one MTP document (by the patient or a healthcare professional).
Prescribed medication treatments are created by healthcare professionals only, with an MTP document followed by a PRE document.
See IHE Pharmacy MTP supplement, as well as HL7’s Medication Treatment Plan FHIR document.
Medication treatment instance A medication treatment instance is a concept of this eMedication service.
A medication treatment can change over time: the dosage, medication, active substance, comments, etc. can be updated.
The medication treatment instance represents the state of a medication at a current point of time.
Medication treatment instance creation depends on the type of medication treatment. For “simple” (ie. not prescribed) treatments, a single medication treatment instance is created when the MTP document is received.
For prescribed medication treatments (ie. medication treatments for which there is a MTP document and at least one PRE document), a new instance is created every time a PRE document is received.
Each medication treatment instance appears in a single line within the medication card. Instances associated with the same treatment are visually grouped.
-
Medication statement A medication statement represents a given medication (form, dosage, GTIN/ATC, ingredients etc.) See the definition in the implementation guide.
Aggregation The aggregation is the process of determining the current state of each medication treatment within a patient’s medication plan, based on the existing medication treatment instances.
This is done depending on the document triggering the aggregation, either by updating existing medication treatments / medication treatment instances, or by creating new medication treatment instances
-

Triggers

Aggregation occurs when:

Scope

When triggered, aggregation occurs for the medication treatment referenced by the triggering document.

When the triggering document is a PRE, it might reference several medication treatments (multi-prescription). In this case the service applies the aggregation process to each referenced medication treatment.

Aggregation process

Overview

The table below shows an overview of the elements updated or created during the aggregation process.

Document triggering the aggregation MTP PRE DIS PADV
Attribute Description Reference on medication card COMMENT OK SUSPEND CHANGE CANCEL REFUSE
Target MTP Target any other document Target MTP Target PRE Can only target MTP Target MTP Target PRE Target MTP Target PRE Target MTP Target PRE
Medication treatment Operation Create new Medication Treatment. Retrieve instance(s) associated with referenced treatment and patient. Retrieve instance associated with referenced treatment and patient.
Validate that the incoming dispense references a prescription if the medication treatment is in prescribed state.
Retrieve instance associated with referenced treatment and patient.
comments The list of comments made on the treatment itself (referencing the MTP entry). Prescription comments will be recorded on the medication treatment instance. 7 - - - Add comment from PADV. - Add comment from PADV. - Add comment from PADV. Add comment from PADV. - Add comment from PADV. - Add comment from PADV. -
dispenses The list of dispenses targeting the MTP associated with this treatment, or any of its related PRE. - - - Add new dispense entry referencing incoming DIS document. - - - - - - - - - - -
instances The list of medication treatment instances associated with this medication treatment. - Add new instance. Add new instance if the treatment is "prescribed" (ie. There is already a Medication treatment instance related to a PRE associated with this medication treatment). - - - - - - - - - - - -
id Globally unique id of this medication treatment. - Initialize withg MTP treatment id. - - - - - - - - - - - - -
mpiPid Reference to patient. 1 Initialize with MTP's patient reference. - - - - - - - - - - - - -
mtpReference Reference to the MTP associated with this medication treatment. 4 Initialize with reference to incoming MTP. - - - - - - - - - - - - -
status Status of the treatment. Can be active, suspended, canceled or refused.
The status is not shown on the medication card, it is used to select the treatments to display.
- Initialize "active". Check value: must be active (not updated). - - - Set "active" if it was "active" or "suspended". - Set to "suspended" document referenced by PADV is a MTP and if it was in "active" state. Set "active" if previous value was "active" or "suspended". - Set "cancel" if previous value was not "active" or "suspended". - Set "refused" if previous value was not "active" or "suspended". -
startDate The date of the beginning of the treatment. Can be the dosage start date if it is defined, or the MTP effective time. - Initialize with the MTP's effective periode start time if defined, with the creation date of the MTP document otherwise. - - - - - - - - - - - - -
stopDate The date at which the treatment was stopped (canceled or refused). - - - - - - - - - - - Set PADV document date - Set PADV document date -
Medication treatment instance Operation Create new Medication Treatment instance.
  • Retrieve existing Medication Treatment instance if treatment is "simple" (ie. This is the first PRE for this treatment).
  • Create new Medication Treatment instance if treatment is "prescribed" (ie. There is already a PRE for this treatment).
  • If incoming DIS is associated with a prescription, retrieve the medication treatment instance of the medication treatment, associated with the DIS's prescription.
  • The first medication treatment instance of this medication treatment otherwise (ensure it exists).
- Retrieve existing medication treatment instance associated with PADV target document. - Retrieve existing medication treatment instance associated with PADV's target PRE. - Retrieves first medication treatment instance associated with target MTP. Retrieves instance associated with PADV's medication request if PADV targets a PRE. Retrieves all instances associated with MTP's medication treatment. Retrieve existing medication treatment instance associated with PADV's target PRE. Retrieves all instances associated with MTP's medication treatment. -
additionalDosages Additional entry of the dosage instruction. 6 Initialize with incoming MTP's medication additional dosages. Add PRE's medication request additional dosages. Checks if existing dosage is equal to incoming DIS dosage. Update additional dosages with DIS's medication dispense additional dosages if necessary. - - - - - Set PADV's medication statement additional dosage. Add PADV's medication statement additional dosage. - - - -
comments The list of comments associated with this medication treatment instance (PADV referencing the PRE associated with this instance). 7 - - - - Add PADV comment. - Add PADV comment. - - Add PADV comment. - Add PADV comment. - Add PADV comment.
entryReferences The list of entries (documents) that have been aggregated in this medication treatment instance. - Initialize with reference to incoming MTP. Add reference to incoming PRE. Add reference to incoming DIS. - - - - - - - - - - -
baseDosage The dosage instruction for this instance. 6
5 (start and end date of dosage)
Initialize with incoming MTP's medication base dosage. Set PRE's medication request base dosage. Checks if existing dosage is equal to incoming DIS dosage. Update base dosage with DIS's medication dispense dosage if necessary. - - - - - Set PADV's medication statement base dosage. - - - -
id Globally unique id of this medication treatment instance. - Initialize with MTP treatment id. Set PRE's medication request id. - - - - - - - - - - - -
inReserve Flag indicating whether this treatment is in reserve or not. 9 Initialize with value from MTP. Set to PRE's medication request "is as needed" value. - - - - - - Set PADV's medication as needed flag value. - - - -
lastInterveningAuthor The author of the last item entry (of any kind) in this treatment. This is the last intervening. - Initialize with MTP document author. Set PRE document author. Set DIS document author. Set PADV document author.
lastMedicalAuthor The author of the last item entry (of type MTP, PRE, or any type of PADV except COMMENT that apply to an MTP or PRE) in this treatment. This is the last "medical" participant. 2 Initialize with MTP's medication statement entry author. Set PRE medication request entry author. Set DIS medication dispense author. Set PADV comment author.
medication The medication associated with this treatment. 4 Initialize with incoming MTP medication. Set medication from PRE's medication request. Set medication from DIS's medication dispense. - - - - - Set PADV's medication. - - - -
preReference Reference to the PRE document associated with this instance. - - Set reference to incoming PRE. - - - - - - - - - - - -
preStartTime Prescription validity start time, inclusive (the first time the prescription may be dispensed). - - - - - - - - - - - - - - -
preStopTime Prescription validity stop time, inclusive.
the last time the prescription may be dispensed. No limit is implemented in this service.
- - - - - - - - - - - - - - -
reason The reason for the treatment. 7 Initialize with incoming MTP's medication reason code. Set PRE's medication request reason code. - - - - - - Set PADV's medication reason code. - - - -
status The status of the prescription associated with this instance. Can be submitted, provisional, active, canceled or refused.
The status is not shown on the medication card, it is used to select the treatment instances to display.
- Initialize "active". Set "submitted". - - - - Set "active" current status is not "submitted" or "provisional". - - Set "active" if previous value was "submitted". Set "cancel" if previous value was not "refused". Set "refused" if previous value was not "refused".
stopDate The date at which the treatment instance was stopped (canceled or refused). - - - - - - - - - - - Set PADV document date. Set PADV document date.
substitutionPermitted Flag indicating whether a substitute (generics) may be dispensed for this treatment or not. - Initialize "true". Set to "true" if PRE's medication request "resolve substitution" attribute is "equivalent". - - - - - - Set to "true" if PADV's medication request "resolve substitution" attribute is "equivalent". - - - -

Medication card

Medication card


This page was updated 2023-12-08