5

Hi All i am new in mirth.

i want to know the best way to store hl7 message in mysql database in a table where it store only one column as hl7 message or in row and columns like sending application column ,receiving application column etc..

I am unable to find a suitable answer so help me.

Thanks in advance.

Arvind Singh
  • 75
  • 2
  • 6
  • So what do you finally want? Whole HL7 in one field (that's easy) or really make a field for each individual HL7 segment? – Philipp Jan 16 '13 at 13:49

2 Answers2

3

Parsing the HL7 and storing each HL7 segment in an individual field would be an overkill for the database (HL7 has a hierachical structure and changes from each version to the other).

I would recommend to store really just the attributes you need (IDs, Sending Applications, Timestamp, ...) and put the original HL7 as text(or xml) in one field. You can then take the HL7 and parse it again when you need it.

Philipp
  • 4,645
  • 3
  • 47
  • 80
0

It's also worth noting that in Mirth Connect 3.0, you will have the ability to add custom metadata columns on a per-channel basis, which are stored in the database and indexed on. So for example, you might add a "Sending Application" column to your channel, and use a transformer to pull the data out of MSH.3.1. In addition to storing this value in a separate database column, you could then view that column easily for each message in the Channel Messages screen, and even -search- on that column. It's especially useful for things like patient IDs, names, accession numbers, etc.

The 3.0 GA will be released later this year, but the first beta has already been released: http://www.mirthcorp.com/community/forums/showthread.php?t=8126

Nick Rupley
  • 1,028
  • 7
  • 8
  • Thanks Nick Rupley for your rapid response. I Think its the best way to store and retrieve hl7 messages from database, But in my application i have to search patient from received hl7 message, For this purpose is it best. – Arvind Singh Jan 18 '13 at 09:30
  • @ArvindSingh I have similar situation my requirement is to save most field(20 field) of segments Like OBR,OBX,RXE,RDE,ORC, PV1,PID ...how are you string them...are you able to query them as well. – Vikram Ranabhatt May 27 '20 at 14:12