Saturday 3 October 2020

I'm back

Sorry about the missing me...

I'm still doing this HL7 and FHIR Integrations but have been really busy with it.  Also, I'm now using Integration Host as my Integration Engine, so don't really have the pain anymore that required this blog.  However, I know it's helped a few of your out there, so I'll try and make sure I add in some of the steps I perform.  I've updated a couple of my old posts too as Mirth Connect is now called NextGen Connect.  I still use "Connect" at a number of sites, but avoid it when possible.  HL7 Soup's much cheaper when you add in your time, it's a no brainer (heck, even Lyniate's cheaper than "Mirth" when you include your time).


Double double-quotes in HL7

Firstly, what does it mean?

PID||""|564346^^^MRN^MR

The simple answer is that the value represents blank.  But that raises the next question:  Isn't that the same as just leaving it blank?

No.  In HL7, if nothing is between the pipes it means that the value wasn't provided, or that it isn't known by the sending system.  That means that if you receive an update patient message, for example, where the patient's surname name is not provided in the PID-5.1, you should leave your records as they are. It would be wrong to update your database to nothing in this instance.

However, if you receive an "" then the sending system is telling you to update your database value to nothing, even if you have a value.  Yep, it's a way to blank out your value.

To me it feels like an awkward extension to HL7, I can picture when some tech in the early '90s pointed out this need and it got fudged into the HL7 structure.  However, it is what it is...

But then the important question is how to deal with it?

Well, now that I do my integrations in HL7 Soup's Integration Host, things have become simpler (yeah, like everything else).

Any binding between messages or variables supports a right-click option to "HL7 Encode with Quotes" that will automatically add the quotes into any value if it's omitted. Great if you're converting data in your system or another file to HL7 and want to put in the "" when it's blank to update the other system (without having to write code all the time!)

And the reverse is there too.  Say you receive an HL7 message and don't have the capacity in your web services to handle the "" value, well, you can right-click and "HL7 Decode with Quotes" and any "" value will be converted to an empty string of text.  

Even better, these functions will also handle the & and pipes that may occur to.