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

OML 033 parsing incorrectly. #56

Closed
EdwinVanVliet opened this issue Aug 10, 2016 · 1 comment · Fixed by #200
Closed

OML 033 parsing incorrectly. #56

EdwinVanVliet opened this issue Aug 10, 2016 · 1 comment · Fixed by #200
Labels
defect A deviation from the Requirements / Specification.

Comments

@EdwinVanVliet
Copy link

Using the following message I would expect two SPM segment after parsing.

MSH|^&|xxxx|homxtest_9||homxtest_9|20160205112211||OML^O33|000500006894|P|2.5|||NE|AL||8859/15
PID|1||1234567^^^Firstname
lastname^^^Firstname||Lastname&&Lastname^Firstname^B L J^^^^L||19991231|M|||Firstname^37^BE^^1234AB^nl|||||||||||||Y||||||N
SPM|1|1602050005&xxxx||EDTA^Paarse dop^xxxx||||||||3^ml&ml&xxxx|||||20160205111800|||N|||||||01^01^xxxx^paars^01
ORC|NW|1602-0006^xxxx|||IP||^^^20160205111800^^R||20160205112211||||^^^^^^^^^^xxxx
OBR|1|1602-0006^xxxx||Na^Natrium^xxxx|||20160421114000||0^ml&ml&xxxx||||||EDTA^Paarse dop&xxxx|||||||20160205112211||A|I||^^^20160205111800^^S
SPM|2|1602050004&xxxx||Citrate^Blauwe dop^xxxx||||||||0^ml&ml&xxxx|||||20160205111800|||N|||||||08^08^xxxx^blauw^08
ORC|NW|1602-0006^xxxx|||IP||^^^20160205111800^^R||20160205112211||||^^^^^^^^^^xxxx
OBR|2|1602-0006^xxxx||Na^Natrium^xxxx|||20160421114000||0^ml&ml&xxxx||||||Citrate^Blauwe dop&xxx|||||||20160205112211||A|I||^^^20160205111800^^S

As a result I get only 1 SPM segment. When looking at the source in PipeParser.cs in function DoParse it seems to override the previously created SPM segment.

Using version 2.5.0.5 nuget.

@milkshakeuk
Copy link
Member

@EdwinVanVliet this is fixed in PR #200.
It's the same issue as #55 but with a different message type, I wrote a test to check it has been fixed here too, and it has.

[Test]
public void Parse_V25_OML_033()
{
    var message =
        "MSH|^~\\&|xxxx|homxtest_9||homxtest_9|20160205112211||OML^O33|000500006894|P|2.5|||NE|AL||8859/15\r"
        + "PID|1||1234567^^^Firstname~lastname^^^Firstname||Lastname&&Lastname^Firstname^B L J^^^^L||19991231|M|||Firstname^37^BE^^1234AB^nl|||||||||||||Y||||||N\r"
        + "SPM|1|1602050005&xxxx||EDTA^Paarse dop^xxxx||||||||3^ml&ml&xxxx|||||20160205111800|||N|||||||01^01^xxxx^paars^01\r"
        + "ORC|NW|1602-0006^xxxx|||IP||^^^20160205111800^^R||20160205112211||||^^^^^^^^^^xxxx\r"
        + "OBR|1|1602-0006^xxxx||Na^Natrium^xxxx|||20160421114000||0^ml&ml&xxxx||||||EDTA^Paarse dop&xxxx|||||||20160205112211||A|I||^^^20160205111800^^S\r"
        + "SPM|2|1602050004&xxxx||Citrate^Blauwe dop^xxxx||||||||0^ml&ml&xxxx|||||20160205111800|||N|||||||08^08^xxxx^blauw^08\r"
        + "ORC|NW|1602-0006^xxxx|||IP||^^^20160205111800^^R||20160205112211||||^^^^^^^^^^xxxx\r"
        + "OBR|2|1602-0006^xxxx||Na^Natrium^xxxx|||20160421114000||0^ml&ml&xxxx||||||Citrate^Blauwe dop&xxx|||||||20160205112211||A|I||^^^20160205111800^^S";

    var parser = new PipeParser();

    var result = parser.Parse(message);

    var oulR22 = result as NHapi.Model.V25.Message.OML_O33;

    Assert.IsNotNull(oulR22);
    Assert.AreEqual(2, oulR22.SPECIMENRepetitionsUsed);
    Assert.AreEqual(1, oulR22.GetSPECIMEN(0).ORDERRepetitionsUsed);
    Assert.AreEqual(1, oulR22.GetSPECIMEN(1).ORDERRepetitionsUsed);
}

milkshakeuk added a commit that referenced this issue Apr 15, 2021
@milkshakeuk milkshakeuk added defect A deviation from the Requirements / Specification. and removed awaiting review labels Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A deviation from the Requirements / Specification.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants