How to build a Kmehr-Bis message

We strongly advise you to first read the tutorial.


In the root kmehrmessage element,you should place: bold means mandatory
italic means optional

confidentiality
Use this element only if you want to restrict the access to the content of the message including its header. A Kmehr-Bis certified IT system will restrict the access to the hcparties explicitly listed within the confidentiality element.
header
The header is mandatory. It must be composed as follows:
confidentiality
Use this element only if you want to restrict the access to the content of the header.
standard
You must specify here the version of the Kmehr-Bis specification your message complies with. You must use a value from CD-STANDARD.
id(s)
You must assign a unique message number according to the ID-KMEHR convention. The value of the message.id is the concatenation of the id of the first hcparty of the sender element, a dot, and a unique message number within your own system. This latest can be easily implemented through a timestamp like YYYYMMDDHHMMSSmmm.
In addition to this, you can always add your own local message identifiers.
date
This is the date of creation of the message.
time
This is the time of creation of the message.
sender
The sender can contain a combination of hcparty(s) to specify the sending organisation, medical specialty and/or physical person.
hcparty(s)
There must be at least one hcparty. It must be composed as follows:
id(s)
If the hcparty is a person or an organisation it should have a national identifier according to the ID-HCPARTY convention. If you do not have one, you must place an empty id element with S='ID-HCPARTY' to clearly notify that you did not omit this but you did not know it. In that case the Kmehr-Bis IT certified system will not be able to ensure the recognition of that hcparty but will probably try to match the following elements.
You can always add your own local hcparty identifiers (your medical services for example).
If the hcparty is a medical specialty, there is no need for an id.
cd(s)
It is always mandatory to specify the type of hcparty using a value from CD-HCPARTY. You can always add your own local hcparty types.
name
to specify the name of an organisation. It is allowed to place accents, lowercase and uppercase letters within names. It is the role of local IT systems to manipulate (and replace) these to improve name matching during import process.
firstname
It the hcparty is a person you could specify its firstname. It is allowed to place accents, lowercase and uppercase letters within names. It is the role of local IT systems to manipulate (and replace) these to improve name matching during import process.
familyname
It the hcparty is a person you could specify its family name. It is allowed to place accents, lowercase and uppercase letters within names. It is the role of local IT systems to manipulate (and replace) these to improve name matching during import process.
address(es)
You can specify as many addresses as suited.
telecom(s)
You can specify as many telecom(s) as suited.
recipient(s)
The recipient can contain a combination of hcparty(s) to specify the receiving organisation, medical specialty and/or physical person. It must contain at least one hcparty. By convention, the first recipient is the main addressee of the message. The following recipients are considered as cc (carbon copy). Kmehr-Bis certified IT systems should use this information to route the message. Recipients are built in the same way as sender.

The recipient is always known. It is at least the organisation managing the messages (the S3 server for example). If you want to limit the access to the message to a category of people (hospitals, pharmacists, radiologists, psychiatrists,...) you have to place the appropriate CD-HCPARTY in the confidentiality element of the transaction (for example).

urgency
You could specify the urgency of your message using a value from CD-URGENCY.
acknowledgment
You could specify the acknowledgment that you wish using a value from CD-ACKNOWLEDGMENT.
text(s)
You could use text element to comment your message.
lnk(s)
You could use lnk element to establish links with your message.
  • To replace a message, the new message should refer to the message that it replaces through the lnk element using the value isanewversionof from CD-LNK. To cancel a message, use the same principle with a message that explains the reason of cancellation as free text. To cancel an item, use the cancelled value for the lifecycle of that particular item within the replacing transaction.
  • To manage order/result relationship, use the value isareplyto from CD-LNK.
folder(s)
The message must contain at least one folder.
confidentiality
Use this element only if you want to restrict the access to the content of the folder.
id(s)
Each folder must have an id which is its sequential position within the message according to the ID-KMEHR convention.
In addition to this, you can always add your own local folder identifiers.
patient
The folder must contain one patient element.
In the future we could support other subjects of care (animal, emergency case, ...).
The patient element is composed as follows:
id(s)
The patient should have a national identifier according to the ID-PATIENT convention. If you do not have one, you must place an empty id element with S='ID-PATIENT' to clearly notify that you did not omit this but you did not know it. In that case the Kmehr-Bis IT certified system will not be able to ensure the recognition of that patient but will probably try to match the following elements. You can always add your own local identifiers.
first-name
This is mandatory. It is allowed to place accents, lowercase and uppercase letters within names. It is the role of local IT systems to manipulate (and replace) these to improve name matching during import process.
family-name
This is mandatory. It is allowed to place accents, lowercase and uppercase letters within names. It is the role of local IT systems to manipulate (and replace) these to improve name matching during import process.
birthdate
This is optional.
sex
This is mandatory.
address(es)
You can specify as many addresses as suited.
telecom(s)
You can specify as many telecom(s) as suited.
usuallanguage
You can specify the usual language of the patient using the W3C language codes.
transaction(s)
The folder must contain at least one transaction. The transaction is built as follows:
confidentiality
Use this element only if you want to restrict the access to the content of the transaction.
id(s)
Each transaction must have an id which is its sequential position within the folder according to the ID- KMEHR convention.
In addition to this, you can always add your own local transaction identifiers.
cd(s)
You must specify the type of the transaction using a value from CD-TRANSACTION. You can always add your own local codes.
...
From here, you should consult the Kmehr transactions cookbook.
text(s)
You could use text element to comment the folder.
lnk(s)
You could use lnk element to establish links with your folder.