Smile CDR v2024.08.PRE
On this page:

4.1.1Processing HL7 v2.x Feeds


Smile CDR includes the ability to receive native HL7 v2.x messages, convert them into a FHIR transaction containing a number of appropriate FHIR resource types, and store those resources in the database.

This can be used, for example, to populate a Smile CDR instance in real-time, near real-time, or even by batch uploads using messages transmitted by an EHR/EMR system.

This is described further in the HL7 v2.x documentation. This page provides a quick taste of how this works.

4.1.2Transmitting to Smile CDR


The primary use case for HL7 v2.x processing is to have an EHR/EMR transmit data in real-time or near real-time to Smile CDR. This is typically done using an interface engine, although direct connections are also possible.

To simulate this, several sample messages are shown below. In order to transmit these, you need a system that can transmit using MLLP (HL7 Minimal Lower Layer Protocol). One such tool is the HAPI TestPanel, which is a free tool for sending and receiving HL7 v2.x messages. Simply copy and paste a given message into TestPanel then transmit it to the appropriate address.

Configuring an HL7 v2.x endpoint is beyond the scope of this tutorial. However, we have provided the target URLs below. If you would like such an endpoint configured or if you would like instructions to do this yourself, please contact us.

– For the public test server, you would normally transmit to

– For a self-hosted instance, you would normally transmit to http://localhost:7000.

– For the could-hosted demo instance, you would normally transmit to something like

4.1.3ORU (Observation Result) Messages


Smile CDR is able to receive and process ORU messages containing lab results, clinical notes, and other similar types of data.

The following is a sample ORU^R01 message that conforms to the Smile CDR HL7 v2.x specification: MSH|^~\&|||||||ORU^R01^ORU_R01|A001|P|2.5
PID|||7000135^^^^MR~01238638267^^^^SB||Smith^John^Q^Jr^^^L||19650322|M|||342 Evergreen Terrace^2nd Floor^Springfield^NI^12345^USA^H||1(333)555-1234^PRN^PH||ENGLISH|I|UNKNOWN~AGNOSTIC^Agnostic^urn:test:source:religion|||||||||||||N
PV1||I|Acme Hospital^3rd Floor Room 124^6^^^^^^124 Bed 6^124 6&||||||||||||||||4736455^^^^VN|||||||||||||||||||||||||20160122094430-0400|20160122094431-0400
OBR||54321^||5500-1^Blood Panel^|||201602131000-0400|201602131100-0400|||||||||||||||||F
OBX||NM|9477-3^Sodium (Plasma)^||150|mmol/L^mmol/Liter^|0.2-333||||F
OBX||DT|3472-2^Fasting Date^||20160213||||||F|||20160101121314.1234-0400
NTE|||Comment Line 1~Comment Line 2
OBX||ST|17464-1^Text Comment^||line 1~line 2
OBX||ST|17464-1^Text Comment^||line 3~line 4

4.1.4ADT (Admission/Discharge/Transfer) Messages


Smile CDR can also receive and process ADT messages. These will be mapped into an appropriate set of FHIR resources and stored in a similar manner to ORU messages.

The following is a sample ADT^A01 message that conforms to the Smile CDR HL7 v2.x specification: MSH|^~\&|||||||ADT^A01^ADT_A01|A001|T|2.5
PID|||7000135^^^^MR~01238638267^^^^SB||Smith^John^Q^Jr^^^L||19650322|M|||342 Evergreen Terrace^2nd Floor^Springfield^NI^12345^USA^H||1(333)555-1234^PRN^PH||ENGLISH|I|UNKNOWN~AGNOSTIC^Agnostic^urn:test:source:religion|||||||||||||N
ROL||||777^Jones^Lisa^Frances^^^^^|||||||123 Brewer Street^^Buffalo^NY^98765^USA^W|1(837)555-1978^WPN^PH
PV1||I|Acme Hospital^3rd Floor Room 124^6^^^^^^124 Bed 6^124 6&||||||||||||||||4736455^^^^VN|||||||||||||||||||||||||20160122094430-0400|20160122094431-0400
ROL|||ADM^admitter^|3622^Hawkins^Finnie^^^^^^|||||||20 Canal St^^Buffalo^NY^98222^USA^W|1(837)555-2133^WPN^PH
ROL|||ATND^attender^|7452^May^Sadie^^^^^^|||||||313 Fleet Street^^Cheektowaga^NY^28366^USA^W|1(837)555-6624^WPN^PH
IAM|||256259004^Pollen (Substance)^|SV^^|Wheezing~Puking Guts Out||88344^||||||20170204||||C^^
OBX||NM|8302-2^Body Height^||51|cm^cm^|||||F|||201109031113-0400
OBX||NM|29463-7^Body Weight^||123.4|kg^kg^|||||F|||201109031113-0400
GT1||23323^^^|Smith^Fannie^Foo^Jr^^^L||313 Fleet Street^^Cheektowaga^NY^28366^USA^W|1(333)555-1234^PRN^PH||19000102|M
IN1||449988^^|443322^^^|InsurerCo|342 Evergreen Terrace^2nd Floor^Springfield^NI^12345^USA^W|||||||||||Smith^John^Q^Jr^^^L