This topic contains 3 replies, has 3 voices, and was last updated by  Can 3 years, 8 months ago.

FHS Header from ORU Files

  • Hi Guys,

    We have ORU files with FHS as the first segment, when i try and parse the data into Iguana it pops up saying “The header segment ‘MSH’ was not found.” I have verified my VMD file has FHS and MSH.

    Does anyone have any ideas on how to get around this?

    Cheers
    Fraser

    this is what i used to get around the issue, any feedback much appriciated.

    function main(Data)
       Data = (Data:sub(Data:find("MSH")+1,-1))
       trace(Data)
       Data = string.gsub(Data,"SH|^~\\&","MSH|^~\\&")
       trace(Data)
       local Orig = hl7.parse{vmd='OBX.vmd', data=Data}

    Have you tried to remove MSH from VMD file or make MSH optional in VMD?

    Yup – the methodology is fine. hl7.parse is for parsing a discrete HL7 transaction – that normally starts with an MSH segment.

    It’s perfectly valid to break up a batch of messages into a list of messages in Lua code – they are all just tools for specific problems.

Tagged: 

You must be logged in to reply to this topic.