Skip to content

Defaulting to standard delimiters is surprising #64

@kvudata

Description

@kvudata

https://github.com/johnpaulett/python-hl7/blob/6d85f25d678e366d2617690d4ee1216bb8027db1/hl7/parser.py#L351-LL370

  • The current parser behavior is to fill in any missing MSH-2 delimiters with the standard ones

According to the HL7 2.3 spec though

At any given site, the subset of the possible delimiters may be limited by negotiations between applications. This
implies that the receiving applications will use the agreed upon delimiters, as they appear in the Message Header
segment (MSH), to parse the message.

So it should be valid to use less delimiters. The issue is that by assuming the standard delimiters, python-hl7 will incorrectly split fields when parsing if a standard delimiter character (such as "&") is used in the content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions