Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting exceptions when trying to parse hl7 messages containing large data in obx-5 #594

Open
AlexFJaxFL opened this issue Sep 17, 2024 · 10 comments

Comments

@AlexFJaxFL
Copy link

getting the following exception when parsing files containing large embedded images:

Parse error in DoEDieIn: NHapi.Base.DataTypeException: Failed validation rule: Maxumim size <= 65536 characters
at NHapi.Base.Model.Varies.fixOBX5(ISegment segment, IModelClassFactory factory)
at NHapi.Base.Parser.PipeParser.Parse(ISegment destination, String segment, EncodingCharacters encodingChars)
at NHapi.Base.Parser.PipeParser.DoParse(String message, String version)
at NHapi.Base.Parser.ParserBase.Parse(String message, String version)
at EPDHL7ListenerSvc2.EPDHL7ListenerSvc2.TryParseMessage(String HL7Message).

not sure if this limitation is to be expected or maybe it will be resolved in future versions

Regards,
Alex

@milkshakeuk
Copy link
Member

hi @AlexFJaxFL do you have any example code?

@milkshakeuk
Copy link
Member

also @AlexFJaxFL might be worth checking #105 to see if this issue is similar or not?

@AlexFJaxFL
Copy link
Author

hi @AlexFJaxFL do you have any example code?

Public Shared Function ParseHL7Messages(HL7Messages As String, FType As FeedType) As Boolean
Dim MsgType As String = ""
Dim SendingApp As String = ""
Dim iEPDFacNo As Integer = 0

    Try
        FieldSeparator = HL7Messages(3)
        ComponentSeparator = HL7Messages(4)

        Dim HL7MessageName As String = ""

        If Not HL7Messages.StartsWith("MSH") Then
            If blnInService = True Then 'if running in the service
                WriteEventLog("Error in ParseHL7Messages: does not start with MSH " & vbCrLf & HL7Messages, EventLogEntryType.Error)
            Else
                Dim ex As New Exception("Error in ParseHL7Messages: does not start with MSH " & vbCrLf & HL7Messages)
                Throw ex
            End If
        End If

        Dim prsr As New Parser.PipeParser()
        Dim imsg As Model.IMessage = Nothing
        Dim trsr As Util.Terser
        Dim blnFilterOut As Boolean = False

        For Each strMsg In HL7Messages.Split(New String() {"MSH|"}, StringSplitOptions.RemoveEmptyEntries)
            strMsg = "MSH|" & strMsg 'add the split chars back on.

            'If prsr.GetMessageStructure(strMsg) = "ORU_R01" Then
            strMsg = SetOBX2DataType(strMsg) '
            'End If

            Try
                imsg = prsr.Parse(strMsg)
            Catch ex As Exception
                Try
                    EPDnHapi.SetPtrnFindReplace(strMsg)
                    imsg = prsr.Parse(strMsg)
                Catch ex1 As Exception
                    If strMsg.Contains("ORU^R01") OrElse strMsg.Contains("ORM^O01") Then ' for IB ORU/ORM clearing OBR-13 since not needed 
                        EPDnHapi.ClearField(strMsg, "OBR|", 13)  ' and causing problems for parser (AF)
                        Try
                            imsg = prsr.Parse(strMsg)
                        Catch ex2 As Exception
                            imsg = prsr.Parse(strMsg, "2.4")
                        End Try
                    End If
                End Try
            End Try

@AlexFJaxFL
Copy link
Author

also @AlexFJaxFL might be worth checking #105 to see if this issue is similar or not?

i can see there is certain correlation between my issue and discussion that took place in #105,
my data looks like this:

image

@AlexFJaxFL
Copy link
Author

maybe this structure does not match what your engine parser is expecting ..

@milkshakeuk
Copy link
Member

Hi @AlexFJaxFL we have some unit tests showing how it should look,

+ "OBX|1|ED|PDF^Display format in PDF^AUSPDI||^TX^PDF^Base64^JVBERi0xLjcNJeLjz9MNCjI0IDAgb2JqDTw8L0xpbmVhcml6ZWQgMS9MIDExMjQxNi9PIDI2L0UgNTQ2MTkvTiAyL1QgMTExODE2L0ggWyA5NzYgMjk3XT4+DWVuZG9iag0gICAgICAgICAgICAgICAgDQp4cmVmDQoyNCAzNA0KMDAwMDAwMDAxNiAwMDAwMCBuDQowMDAwMDAxMjczIDAwMDAwIG4NCjAwMDAwMDE0NDUgMDAwMDAgbg0KMDAwMDAwMTg5OSAwMDAwMCBuDQowMDAwMDAyNDgwIDAwMDAwIG4NCjAwMDAwMDI1MTUgMDAwMDAgbg0KMDAwMDAwMjYyOCAwMDAwMCBuDQowMDAwMDAyODgzIDAwMDAwIG4NCjA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14k+PTijYjkdoJIdbJXlvQbZQ9O/g+1gnFu2vbYxV3Ns+zUMBHZMY6AtyoRF9BfiMTThlLU8OqQ1qZ9b9VtdyXbq8+fQjMZBdebtUgvx36QW2aulXluEvxgX|||A|||F|||201411201536\r"

There is also this blog which might help.
http://healthbase.info/blog/?p=376

@AlexFJaxFL
Copy link
Author

AlexFJaxFL commented Oct 1, 2024

Ok, this information is very helpful indeed and will be used for .pdf related feeds which we have plenty.
What approach should I use if incoming hl7 message contains .rtf content in obx-5 the way I demonstrated above ?

@milkshakeuk
Copy link
Member

@AlexFJaxFL I think you can use a similar approach to the pdf for rtf files.

@AlexFJaxFL
Copy link
Author

@AlexFJaxFL I think you can use a similar approach to the pdf for rtf files.

ok, data does not come in to us in the same format so i will have to do some custom programming to adjust accordingly and then will go from there

@AlexFJaxFL
Copy link
Author

AlexFJaxFL commented Oct 28, 2024

it appears other data types in OBX-2 (like ST, TX and ED which is used in your example above) work with nhapi parser just fine,
however, in our case, we are getting type FT [formatted text] and for this type nhapi for me does not always work as expected.

data comes in like this: OBX|1|FT|^EDIE_VISIT_HISTORY||{\rtf1{\info{\

planning to override FT and make it ST or TX unless perhaps you might provide some other recommendations

@AlexFJaxFL AlexFJaxFL reopened this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants