Tutorial/Case study
The tutorial explains, step by step, the KMEHR message structure, using a simple case study.
- Step 1: Case study
- Step 2: Message overview
- Step 3: Core element identifiers
- Step 4: Type of the core elements
- Step 5: Patient and Healthcare Parties
- Step 6: Item contents
- Step 7: Resulting KMEHR message
Step 1: Case study
Suppose that we want to send the following contact report:
Dear Dr Jean-Pierre Rochet,
Your patient Jean Dubois came to our emergency unit on 01/10/2001.
He presented a serious infection of the left hand caused by a tropical insect bite.
I have performed a Tevax injection 0,5ml IM and prescribed Augmentin 3*500mg daily for 5 days.
Sincerely yours,
Dr Alain Juvenois
We will now see how to represent the sending of this contact report as a KMEHR message.
Step 2: Message overview
Let us first focus on the core elements.
A kmehrmessage contains one header and at least one folder. A folder gathers the information about a same patient.
A folder contains one patient element and at least one transaction.
A transaction contains at least one item or one heading.
In our example, we have only one folder because the message deals with only one patient.
We have only one transaction which is a contact report. We can identify several items (type of encounter, date of encounter, diagnosis, drug delivery, drug prescription). They could be sorted between 2 headings (assessment and treatment). We do not have nested headings.
Message skeleton
<?xml version="1.0" encoding="UTF-8"?> <kmehrmessage ... link to XSchema ... > <header> </header> <folder> <patient> ... identification of the patient ... </patient> <transaction> <item> ... type of encounter ... </item> <item> ... date of encounter ... </item> <heading> <item> ... diagnosis ... </item> </heading> <heading> <item> ... drug delivery ... </item> <item> ... drug prescription ...</item> </heading> </transaction> </folder> </kmehrmessage>
Step 3: Core element identifiers
Each key element of a message (header, folder, transaction, heading, item) should be identified by one 'official' id element (S attribute value is 'ID-KMEHR').
In addition to the official id element, it is allowed to associate multiple id's for each of those elements (S attribute value is 'LOCAL').
In our example
One official id has been added in each of the core elements (header, folder, transaction, heading, item).
The drug prescription item is uniquely identified as the second element of the fourth item/heading elements within the first transaction of the first folder of the message 1234567 of that emitting organisation (will be specified later on within this tutorial). A local identifier has also been sent to identify the transaction.
Message skeleton
<?xml version="1.0" encoding="UTF-8"?> <kmehrmessage ... link to XSchema ... > <header> <id S="ID-KMEHR" SV="1.0">71971801.1234</id> </header> <folder> <id S="ID-KMEHR" SV="1.0">1</id> <patient> ... identification of the patient ... </patient> <transaction> <id S="ID-KMEHR" SV="1.0">1</id> <id S="LOCAL" SL="MyADTSystem" SV="19">6754312</id> <item> <id S="ID-KMEHR" SV="1.0">1</id> ... type of encounter ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> ... date of encounter ... </item> <heading> <id S="ID-KMEHR" SV="1.0">1</id> <item> <id S="ID-KMEHR" SV="1.0">1</id> ... diagnosis ... </item> </heading> <heading> <id S="ID-KMEHR" SV="1.0">2</id> <item> <id S="ID-KMEHR" SV="1.0">1</id> ... drug delivery ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> ... drug prescription ... </item> </heading> </transaction> </folder> </kmehrmessage>
Step 4: Type of the core elements
Each transaction, item or heading should be typed according to a standardised dictionary. This is achieved by the use of the cd element.
The main recognized dictionaries for those elements are the following.
element | reference table | code | meaning |
---|---|---|---|
transaction | CD-TRANSACTION |
contact admission discharge ... |
contact report admission notification discharge notification ... |
heading | CD-HEADING | assessment treatment ... |
assessment treatment ... |
item | CD-ITEM | encounterdatetime encountertype healthissue ... |
date of encounter type of encounter diagnosis ... |
In our example
One element cd has been added in the example in transaction, heading and item.
Message skeleton
<?xml version="1.0" encoding="UTF-8"?> <kmehrmessage ... link to XSchema ... > <header> <id S="ID-KMEHR" SV="1.0">71971801.1234</id> </header> <folder> <id S="ID-KMEHR" SV="1.0">1</id> <patient> ... identification of the patient ... </patient> <transaction> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-TRANSACTION" SV="1.0">contact</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">encountertype</cd> ... value of the type of encounter ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">encounterdatetime</cd> ... value of the date of encounter ... </item> <heading> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-HEADING" SV="1.0">assessment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">healthissue</cd> ... value of diagnosis ... </item> </heading> <heading> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-HEADING" SV="1.0">treatment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">medication</cd> ... value of drug delivery ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">medication</cd> ... value of drug prescription ... </item> </heading> </transaction> </folder> </kmehrmessage>
Step 5: Patient and Healthcare Parties
Let us now represent the patient and the healthcare parties involved in the message. This is achieved by the use of patient and hcparty elements.
Required healthcare parties:
- sender and recipient at the header lever
- author at the transaction level
Many other healthcare parties can be referenced in healthcare messages: prescribers, performers, redactors. These could also be referenced at lower levels (within headings, items or even content).
In our example
If we suppose that the message is sent by the system 'Sim-Gateway' of the hospital 'CHU de Charleroi', the sender may be described as a combination of two hcparty elements.
The receiver must contain the physician 'Jean-Pierre Rochet'.
The author of the transaction is 'Alain Juvenois'.
The patient is 'Jean Dubois'. We suppose we have its INSS number as well as its birthdate and address.
Message skeleton
<?xml version="1.0" encoding="UTF-8"?> <kmehrmessage ... link to XSchema ... > <header> <id S="ID-KMEHR" SV="4.0">71071801.1234</id> <sender> <hcparty> <id SV="1.0" S="ID-HCPARTY">71071801</id> <cd SV="1.0" S="CD-HCPARTY">orghospital</cd> <name>Hôpital civil de Charleroi</name> </hcparty> <hcparty> <cd SV="1.0" S="CD-HCPARTY">application</cd> <name>Sim-Gateway</name> </hcparty> </sender> <recipient> <hcparty> <id S="ID-HCPARTY" SV="1.0">16464646004</id> <cd S="CD-HCPARTY" SV="1.0">persphysician</cd> <firstname>Jean-Pierre</firstname> <familyname>Rochet</familyname> </hcparty> </recipient> </header> <folder> <id S="ID-KMEHR" SV="1.0">1</id> <patient> <id S="ID-PATIENT" SV="1.0">32031011931</id> <firstname>Jean</firstname> <familyname>Dubois</familyname> <birthdate> <date>1932-03-10</date> </birthdate> <sex> <cd S="CD-SEX" SV="1.0">male</cd> </sex> <address> <cd S="CD-ADDRESS" SV="1.0">home</cd> <country> <cd S="CD-COUNTRY" SV="1.0">be</cd> </country> <zip>6044</zip> <city>ROUX</city> <street>Rue du coucou</street> <housenumber>6</housenumber> </address> </patient> <transaction> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-TRANSACTION" SV="1.0">contact</cd> <author> <hcparty> <id S="ID-HCPARTY" SV="1.0">15858558580</id> <cd S="CD-HCPARTY" SV="1.0">persphysician</cd> <firstname>Alain</firstname> <familyname>Juvenois</familyname> </hcparty> </author> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">encountertype</cd> ... value of the type of encounter ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">encounterdatetime</cd> ... value of the date of encounter ... </item> <heading> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-HEADING" SV="1.0">assessment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">healthissue</cd> ... value of diagnosis ... </item> </heading> <heading> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-HEADING" SV="1.0">treatment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">medication</cd> ... value of drug delivery ... </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">medication</cd> ... value of drug prescription ... </item> </heading> </transaction> </folder> </kmehrmessage>
Step 6: Item contents
We now complete the message by adding the contents of the items.
In our example
We want to express that:
- It was an emergency consultation (item 'encountertype'),
- that occurred on 01/10/2001 (item 'encounterdatetime').
- There was a diagnose of 'infection caused by a tropical insect bite' (item healthissue)
- situated 'on the left hand' (element site of the item),
- that is 'serious' (element severity of the item).
- A 'Tevas injection 0,5ml IM' was performed (item medication with lifecycle value set to 'administrated')
- 'Augmentin 3*500mg daily for 5 days' was prescribed (item medication).
In this example, we made the following choices.
- The 'type of encounter' has been qualified using a local code. The meaning of the code has been transferred in French in the DN attribute.
- The 'date of encounter' has been put in the date and time elements.
- The 'diagnosis' has been transferred as free text but the site and the severity have been placed in appropriate elements.
- The 'drug delivery' of Tevax uses the full medication element.
- The 'drug prescription' is transferred using pure free text.
Message skeleton
<?xml version="1.0" encoding="UTF-8"?> <kmehrmessage ... link to XSchema ... > <header> <id S="ID-KMEHR" SV="4.0">71071801.1234</id> <sender> <hcparty> <id SV="1.0" S="ID-HCPARTY">71071801</id> <cd SV="1.0" S="CD-HCPARTY">orghospital</cd> <name>Hôpital civil de Charleroi</name> </hcparty> <hcparty> <cd SV="1.0" S="CD-HCPARTY">application</cd> <name>Sim-Gateway</name> </hcparty> </sender> <recipient> <hcparty> <id S="ID-HCPARTY" SV="1.0">1.64646.46.004</id> <cd S="CD-HCPARTY" SV="1.0">persphysician</cd> <firstname>Jean-Pierre</firstname> <familyname>Rochet</familyname> </hcparty> </recipient> </header> <folder> <id S="ID-KMEHR" SV="1.0">1</id> <patient> <id S="ID-PATIENT" SV="1.0">32031011931</id> <firstname>Jean</firstname> <familyname>Dubois</familyname> <birthdate> <date>1932-03-10</date> </birthdate> <sex> <cd S="CD-SEX" SV="1.0">male</cd> </sex> <address> <cd S="CD-ADDRESS" SV="1.0">home</cd> <country> <cd S="CD-COUNTRY" SV="1.0">be</cd> </country> <zip>6044</zip> <city>ROUX</city> <street>Rue du coucou</street> <housenumber>6</housenumber> </address> </patient> <transaction> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-TRANSACTION" SV="1.0">contact</cd> <author> <hcparty> <id S="ID-HCPARTY" SV="1.0">15858558580</id> <cd S="CD-HCPARTY" SV="1.0">persphysician</cd> <firstname>Alain</firstname> <familyname>Juvenois</familyname> </hcparty> </author> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">encountertype</cd> <content> <cd S="LOCAL" SL="MyADTSYstem" SV="3.4" DN="Consultation en urgence" L="fr">EM</cd> </content> </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">encounterdatetime</cd> <content> <date>2001-10-01</date> </content> </item> <heading> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-HEADING" SV="1.0">assessment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">healthissue</cd> <content> <text L="en">infection due to tropical insect bite</text> </content> <severity> <cd S="CD-SEVERITY" SV="1.0">veryabnormal</cd> </severity> <site> <text L="en">left hand</text> </site> </item> </heading> <heading> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-HEADING" SV="1.0">treatment</cd> <item> <id S="ID-KMEHR" SV="1.0">1</id> <cd S="CD-ITEM" SV="1.0">medication</cd> <content> <medication> <cd S="CD-DRUG-CNK" SV="1999">0135418</cd> <tradename>Tevax amp 0,5ml</tradename> <presentation> <cd S="CD-DRUG-PRESENTATION" SV="1.0">solution</cd> </presentation> <strength> <decimal>0,5</decimal> <unit> <cd S="CD-UNIT" SV="1.0">ml</cd> </unit> </strength> <route> <cd S="CD-DRUG-ROUTE" SV="1.0">intramuscular</cd> </route> </medication> </content> <lifecycle> <cd S="CD-LIFECYCLE" SV="1.0">administrated</cd> </lifecycle> <quantity> <decimal>1</decimal> </quantity> </item> <item> <id S="ID-KMEHR" SV="1.0">2</id> <cd S="CD-ITEM" SV="1.0">medication</cd> <content> <text L="en">prescription of Augmentin 500mg 3x1caps/day during 5 days</text> </content> </item> </heading> </transaction> </folder> </kmehrmessage>
Step 7: Resulting KMEHR message
To finalize our message, we just need to reference the kmehr xsd file and add some basic elements such as
- the standard used (within the header element),
- the date and time (wihin the header and transaction element)
- ...
Resulting: tutorial message.