Skip to content

Instantly share code, notes, and snippets.

@MikeLarned
Last active November 7, 2016 14:18
Show Gist options
  • Save MikeLarned/151110b443d5faec33e141f0b15472e8 to your computer and use it in GitHub Desktop.
Save MikeLarned/151110b443d5faec33e141f0b15472e8 to your computer and use it in GitHub Desktop.
Minimum MSH Segment for OML_O21
/*
MSH (Message Header)
V282_CH02_Control 2.14.9 pg. 59
https://www.hl7.org/fhir/terminologies-v2.html
*/
var parser = new PipeParser();
var oml = new OML_O21();
// DateTime of Message - Required DT: DTM
oml.MSH.DateTimeOfMessage.Value = DateTime.Now.ToString("yyyyMMddHHmmss");
var pipe = parser.Encode(oml);
Console.WriteLine(pipe);
// MSH|^~\&|||||20161107071653||OML^O21|||2.8.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment