General
This paragraph explains the general principles concerning the storage and consultation of a medication scheme.
When reading or updating the medication scheme, all this information should be displayed, validated and checked by the user in its entirety.
A medication scheme consists of
- 1 transaction MS (medicationscheme),
- 0 or more transactions MSE (medicationschemeelement) and
- 0 or more transactions TS (treatmentsuspension)
These transactions are named "a transaction set". This is reflected in the presence of the eHealth Interhub Webservices getTransactionSet and putTransactionSet.
Medication scheme
Read a medication scheme
The web service getTransactionList needs to be called in order to retrieve the id for the transaction MS.
A succesfull response will contain an <id S="LOCAL" SL="vitalinkuri"> whose value is needed as input for the next step in the reading of the medication scheme:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/> <soap:Body> <ns3:GetTransactionListResponse xmlns="http://www.ehealth.fgov.be/hubservices/core/v3" xmlns:ns10="urn:be:fgov:ehealth:metahub:protocol:v2" xmlns:ns2="http://www.ehealth.fgov.be/standards/kmehr/schema/v1" xmlns:ns3="http://www.ehealth.fgov.be/hubservices/protocol/v3" xmlns:ns4="urn:be:fgov:ehealth:metahub:core:v2" xmlns:ns5="http://www.w3.org/2001/04/xmlenc#" xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="urn:be:fgov:ehealth:safe:internal:v3" xmlns:ns8="urn:be:fgov:ehealth:safe:common:decryptor:v3" xmlns:ns9="urn:be:fgov:ehealth:safe:common:v3"> <response> ... </response> <acknowledge> ... </acknowledge> <kmehrheader> <folder> <patient> ... </patient> <transaction> <id S="ID-KMEHR" SV="1.0">1</id> <id S="LOCAL" SL="vitalinkuri" SV="1.0">/subject/72071135503/medication-scheme</id> <cd S="CD-TRANSACTION" SV="1.6">medicationscheme</cd> <cd S="CD-HUBSERVICE" SV="1.0">GetTransactionSet</cd> ... </transaction> </folder> </kmehrheader> </ns3:GetTransactionListResponse> </soap:Body> </soap:Envelope>
Reading the medication scheme is parsing the response of a getTransactionSet for a specific patient and with the id of the needed transaction MS.
Some Kmehr elements of the response have a meaning in the context of future manipulation of the medication scheme:
Transaction | Element | Meaning | Store for later use? | Extra information |
---|---|---|---|---|
MS | <id> | S="ID-Kmehr" This is a unique Kmehr-identifier for the transaction within the transactionset. | NO | |
S="LOCAL" SL="vitalinkuri" This is the unique Vitalink-identifier for the MS transaction. | YES | This is the same value as the Vitalink-identier retrieved with getTransactionList. | ||
MSE/TS | <id> | S="ID-Kmehr" This is a unique Kmehr-identifier for the transaction within the transactionset. | YES | |
S="LOCAL" SL="vitalinkuri" This is the unique Vitalink-identifier for the MSE transaction. | YES |
Update a medication scheme
Updating a medication scheme means doing putTransactionSet for a specific patient and with the id of the needed transaction MS.
In this set of transactions, MSE/TS transactions can be manipulated as follows:
Manipulation of MS/TSE transaction | Description |
---|---|
create | A new MS/TSE transaction is added to the set. Please refer to the paragraph below how created MS/TSE transactions are structured. |
delete | The MS/TSE transaction that needs to be deleted is not present anymore in the <kmehrmessage> of the putTransactionSetRequest. |
update | The MS/TSE transaction that needs to be updated is present in the <kmehrmessage> of the putTransactionSetRequest. Please refer to the paragraph below how updated MS/TSE transactions are structured. |
preserve | The MS/TSE transaction that needs to be preserved is present in the <kmehrmessage> of the putTransactionSetRequest, and is an exact copy of the earlier read transaction. |
The MS transaction itself must also be passed as input for the putTransactionSetRequest.
Element | Meaning | Extra information |
---|---|---|
<author> | The author of the manipulation of the transaction set. | It is good practice to provide the author information of the user of the application. However, the Vitalink gateway will reproduce this infirmation based on the used session certificates. |
<iscomplete> | This is not used in the Vitalink business flow. | It is good practice to hard code this to "true". |
<isvalidated> | This is not used in the Vitalink business flow. | It is good practice to hard code this to "true". |
<version> | The version of the medication scheme on which this manipulation is based. | An application must pass here the value that was earlier read in the reading sequence. |
Here an example of an updated MS transaction:
<transaction> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-TRANSACTION" SV="1.4">medicationscheme</cd> <date>2018-02-09</date> <time>10:21:13.603+01:00</time> <author> <hcparty> <id S="ID-HCPARTY" SV="1.0">18334780</id> <id S="INSS" SV="1.0">82051234978</id> <cd S="CD-HCPARTY" SV="1.1">persphysician</cd> <firstname>Hannes</firstname> <familyname>De Clercq</familyname> </hcparty> </author> <iscomplete>true</iscomplete> <isvalidated>true</isvalidated> <version>41</version> </transaction>
Delete a medication scheme
There is no explicit function to delete a medication scheme. A medication scheme is however implictly deleted by deleting all its MS/TSE transactions.
Create a medication scheme
There is no explicit function to create a medication scheme. A medication scheme is however implictly created by creating 1 or more MS/TSE transaction(s).
MSE/TS transaction
Read a MSE/TS transaction
Update a MSE/TS transaction
Delete a MSE/TS transaction
Create a MSE/TS transaction
The CRUD operations (Create, Read, Update, Delete) for the medication scheme can be looked at from 2 points of view:
- the medication scheme as a whole, i.e. the kmehrmessage
- the transactions MS, MSE and TSe
Read | Create | Update | Delete | |
---|---|---|---|---|
medication scheme | GetTransactionSet | PutTransactionSet | PutTransactionSet | not possible |
transaction MS | As transaction MS in the GetTransactionSetResponse. | The new transaction MS is present in the PutTransactionSetRequest | not possible | not possible |
transaction MSE | As transaction MSE in the GetTransactionSetResponse. | The new transaction MSE is present in the PutTransactionSetRequest. | The updated transaction MSE is present in the PutTransactionSetRequest. | The transaction MSE is absent in the PutTransactionSetRequest. |
transaction TS | As transaction TS in the GetTransactionSetResponse. | The new transaction TS is present in the PutTransactionSetRequest. | The updated transaction TS is present in the PutTransactionSetRequest. | The transaction TS is absent in the PutTransactionSetRequest. |
In the next paragraphs, a "Kmehr element" next table shows which values should be put in the Kmehr parent elements (create/update) or how they should be interpreted and used (read).
The "Vitalink element" table shows the input/output values for the Vitalink child elements, but only for those elements that influence the basic CRUD behaviour. The usage of the other elements should be clear when reading Medicationscheme Kmehr Structure.
Read the medication scheme kmehrmessage
Read the transaction MS
Read the transaction MSE
Read the transaction TS
Create the medication scheme kmehrmessage
Creating the medication scheme means that no transactions MSE or TS are present in Vitalink.
Create transaction MS
A transaction MS must be composed.
Kmehr Element | Input value |
---|---|
id | 1 id element should be provided:
For Vitalink, the id with S="vitalinkuri" is optional. However, if given, the SSIN part should match the id with S="ID-PATIENT" of the patient element in the kmehr folder. |
cd | S="CD-TRANSACTION" with value "medicationscheme" |
date | ? |
time | ? |
author | ? |
iscomplete | true VIM-147 - Getting issue details... STATUS |
isvalidated | true VIM-147 - Getting issue details... STATUS |
Vitalink Element | Input value |
---|---|
version | The are several ways to retrieve the correct input value:
|
Create transaction MSE
A transaction MSE must be composed.
Kmehr Element | Input value |
---|---|
id | 1 id element should be provided:
An id with S="LOCAL" should not be provided. Absence of this id means for Vitalink that this is a new transaction. |
cd | S="CD-TRANSACTION" with value "medicationschemeelement" |
date | ? |
time | ? |
author | ? |
iscomplete | true VIM-147 - Getting issue details... STATUS |
isvalidated | true VIM-147 - Getting issue details... STATUS |
Create transaction TS
A transaction TS must be composed.
Kmehr Element | Input value |
---|---|
id | 1 id element should be provided:
An id with S="LOCAL" should not be provided. Absence of this id means for Vitalink that this is a new transaction. |
cd | S="CD-TRANSACTION" with value "treatmentsuspension" |
date | ? |
time | ? |
author | ? |
iscomplete | true VIM-147 - Getting issue details... STATUS |
isvalidated | true VIM-147 - Getting issue details... STATUS |
Vitalink Element | Input value |
---|---|
lnk | The link to the corresponding transaction MSE, identified by its cd 'ID-KMEHR'. |
medication | The elements defining the medication information (Medicationscheme Kmehr Structure) should exactly match the medication information elements in the corresponding transaction MSE. |
Update the medication scheme kmehrmessage
A list of URI’s will be submitted with the response message. In this list you’ll find the active medication of the complete medication scheme. So these are the unchanged, added and modified medications.
RSW/RSB annotation
In the RSW and RSB implementations, only the ID of the medication scheme as a whole will be returned.
Update transaction MS
A transaction MS must be composed.
Kmehr Element | Input value |
---|---|
id | 2 id elements should be provided:
|
cd | S="CD-TRANSACTION" with value "medicationscheme" |
date | ? |
time | ? |
author | ? |
iscomplete | |
isvalidated |
Vitalink Element | Input value |
---|---|
version | The version of the transaction MS in the last succesfull GetTransactionSet should be passed. Vitalink will check this version to see if the update is based on the latest transaction MS. |
Update transaction MSE
A transaction MS must be composed.
Kmehr Element | Input value |
---|---|
id | 2 id elements should be provided:
|
cd | S="CD-TRANSACTION" with value "medicationscheme" |
date | ? |
time | ? |
author | ? |
iscomplete | |
isvalidated |
Create transaction MSE
Create transaction TS
Delete transaction MS
A transaction MS must be composed.
Kmehr Element | Input value |
---|---|
id | 2 id elements should be provided:
|
cd | S="CD-TRANSACTION" with value "medicationscheme" |
date | ? |
time | ? |
author | ? |
iscomplete | |
isvalidated |