This topic contains 13 replies, has 5 voices, and was last updated by  pritam12140 1 month 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.

    I too am facing the same problem..any help would be appreciated

    Hello. Can you describe for me how your batch messages are being pulled into Iguana? In other words, what is the source component you are using?

    Have you explored a module in our repositories for processing batch files, which includes stripping those batch headers?

    https://help.interfaceware.com/v6/hl7-split-up-batch-file

    This was likely created since the date of the latest posting in this thread.

    Casey Trauer,
    Director, Client Education
    iNTERFACEWARE

    –Below is main.lua

    local JSON_TEMPLATE = [[
    {
    ‘patients’:
    {
    ‘patient-id’:”,
    ‘first-name’:”,
    ‘last-name’:”,
    ‘social-security-no’:”
    }
    }]]

    function main(Data)

    local Msg = hl7.parse{vmd = ‘example/demo.vmd’, data = Data}
    local Out = json.parse(JSON_TEMPLATE)

    Out.patients[“patient-id”] = Msg.PID[3][1][1]:nodeValue()
    Out.patients[“first-name”] = Msg.PID[5][1][2]:nodeValue()
    Out.patients[“last-name”] = Msg.PID[5][1][1][1]:nodeValue()
    Out.patients[“social-security-no”] = Msg.PID[19]:nodeValue()

    queue.push{data=Out}

    response=json.serialize{data=Out}
    trace(response)
    –net.http.respond{body=response}
    net.http.respond{
    body=response,
    entity_type=’application/json’
    }
    return

    end

    When I run the above piece of code, I could see the error as :- ‘The channel encountered an error’.

    Also, please let me know how to get the Access codes for the Iguana training series.

    I have used the source as ‘https’ and destination as ‘channel’.

    Below is the log generated:-
    [string “Creating_Rest_End_Points-FromHTTP-Sotbl9eRG…”]:15: The header segment ‘MSH’ was not found.
    Any help appreciated.

    Hi,

    I think there are two things you need to investigate here. First, you need to parse your HTTP request, as represented by your Data variable. This is not in the format of a JSON string, though the body of the message may be. If your body is in JSON, then you need to extract it from the request using http.parseRequest. Check out this help page: https://help.interfaceware.com/v6/creating-web-services

    I am assuming that you are embedding batch HL7 messages in a web service request. If that is the case, once you extract them, you need to split them up before applying the VMD to them through hl7.parse. Please refer to the documentation I linked to above to understand how to do that: https://help.interfaceware.com/v6/hl7-split-up-batch-file.

    Please contact your account manager if you would like access to the Iguana training series.

    Hope this helps.

    Casey Trauer,
    Director, Client Education
    iNTERFACEWARE

    Hi,

    Can we connect Iguana to PostgreSql db for accessing binary JSON data on a windows system? Please let me know how to connect if there is a way.

    Any help would be great.

    Thanks,
    Pritam

    The best reference I can give you is this help page:

    Working with Databases

    The best advice I can give is that, yes, you can connect to PostgreSql, and that yes, there are tools for converting binary data into other readable formats. I cannot confirm whether that ODBC driver for PostgreSql will allow Iguana to retrieve the binary data.

    Casey Trauer,
    Director, Client Education
    iNTERFACEWARE

    Hi,

    I have a webservice written in lua which exposes an endpoint for displaying some json data. Please let me know how to create the docker file for the same.

    Thanks,
    Pritam

    Hi,

    How to dockerize an Iguana application written in .lua?
    Any help appreciated.

    Regards,
    Pritam

    Hi guys,

    I have a requirement. The iguana listener should listen to HL7 events from some HL7 server.

    How to implement this? Any help appreciated.

    Regards,
    Pritam

Tagged: 

You must be logged in to reply to this topic.