This topic contains 3 replies, has 2 voices, and was last updated by  Jeff Drumm 2 years, 2 months ago.

Best was to identify the HL7 version of an incoming message

  • Hi,

    What is the best way to identify the version of an incoming HL7 message?

    I am expecting 2.3 & 2.3.1 messages coming in on a single channel and need to process the message versions differently (mainly PID segment).

    Thanks
    Gavin.

    Is the version being properly supplied in MSH-10? You could either create a separate message type in the VMD via Chameleon using the HL7 version as part of the Identification, or you could simply evaluate the contents of MSH-10 in a conditional:

    if Msg.MSH[10]:S() == "2.3" then
        -- do the version 2.3 stuff
    else
        -- do the version 2.3.1 stuff
    end

    Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com

    Thanks Jeff,

    This is assuming I have a vmd file that can parse both 2.3 & 2.3.1 messages. I am currently using the supplied vmd files for 2.3 & 2.3.1 and I would assume that if I tried using the 2.3.1 vmd to parse a 2.3 ADT message I would get an error as there is no patient identifier list field in 2.3.

    I will try to make a vmd file to just map the MSH (same as the catch all in the demo.vmd) and see how I go from there.

    Thanks
    Gavin.

    You won’t get an error parsing a 2.3 message with a 2.3.1 VMD. PID-3 is defined identically for both versions in the VMD library; the only difference is the name.

    Jeff Drumm ◊ VP and COO ◊ HICG, LLC. ◊ http://www.hicgrp.com

You must be logged in to reply to this topic.