Others can be added via the standard ‘using’ syntax.
System,, System.Linq, System.Text, and HL7Soup.Integrations The following using statements are included in all scripts but are not shown in the editor. is the 1st and is the 2nd item in the CSV. Just use the 0 based index in a square bracket. It should be noted that in HL7 Soup, you can always right-click on text within an HL7 message and select ‘Copy Path’ to copy that text’s path to the clipboard. It is common to use an HL7 path as an argument in the above API. As they are passed as strings of text, it is possible to construct or manipulate the path in the code before they are used. They allow you to refer to different groupings of these parts with varying levels of precision depending on their objective. Paths define the location of the different constituent parts that comprise a message. Converts | to \F\, ^ to \S\, ~ to \R\, & to \T\, \ to \E\ and crlf to the value of the CarriageReturnEscapeCharacter setting in the app config file. Converts \F\ to |, \S\ to ^, \R\ to ~, \T\ to & and \E\ to \.Įncodes text so it can be inserted into an HL7 message when it contains reserved HL7 characters. HL7 Dates typically have the format yyyyMMddHHmmss, but if you don’t pass a format automatically adjusts to the required precision depending on the date.ĭecodes text from HL7 into plain text. HL7 dates generally look like yyyyMMddTHHmmss, but all HL7 date formats are accepted by this method.Ĭonverts a string containing a date or a DateTime into a string containing an HL7 date. Specifically converting between date or encoding\escaping HL7 structure characters.Ĭonverts a string containing an HL7 Date into a DateTime. The HL7 Helpers are a set of helper functions that simplify HL7 in a C# environment. Note that the base interface of all these types is IHL7Part.
How to write computer code repeating segment how to#
The examples below also show how to read, add, and loop over them etc. We won’t document the functions here as they are basically the same as IHL7Message, and by using IntelliSense you get a pretty good idea of what can be done. IHL7Field belong to IHL7Segment, and IHL7Component belong to IHL7Fields. These are the all available from the IHL7Message and can be located in the same ways as documented above for IMessage where it finds segments. IHL7Segment, IHL7Field, IHL7Component, IHL7Subcomponent The message will then reload the changes. Must be followed with an EndUpdate call or changes will not be reflected in the message. Used for integrations so the message can be updated by an activity without it having to recalculate its content after each update, which improves the performance. The path might look like PID-5, or OBX-5.2
IHL7Segment, IHL7Field, IHL7Component, or IHL7SubComponent. This can then be cast to the parts type interface. Gets any part from the message by its path, E.G. Removes the segment from the current message. Multiple segments can be separated by a "\r" in the string. PID, or OBX.Īdds one or more segments to the end of the current message. Gets a specific segment by its location code or path. passing OBX returns a list of all the OBX segments. A segment header can be passed as an argument to get a list of all the segments using that specific header. Gets a list of all the segments in the HL7 message.