- 
                Notifications
    You must be signed in to change notification settings 
- Fork 162
Configuration Options
The escape sequence for line feed \n and carriage return \r are configurable to 1 of 3 values each respectively.
Possible values for lineFeedHexadecimal are X0A, X00A and X000a (they map to an enum)
Possible values for carriageReturnHexadecimal are X0D, X00D and X000d (they map to an enum)
If the configuration isn't specified in the App.config the default values are X0A for line feed and X0D for carriage return.
Please note: the defaults prior to 3.0.0 where
X0Afor lineFeedHexadecimal andX000dforcarriageReturnHexadecimal.
You need to update the project's app.config <configSections> element to include the 'EscapingConfiguration' configuration section.
And then you need to add a EscapingConfiguration section that details the hexadecimal escaping configuration options you desire.
example App.config configuration:
<configSections>
  <section name="EscapingConfiguration" type="NHapi.Base.Model.Configuration.EscapingConfigurationSection, NHapi.Base"/>
</configSections>
...
<EscapingConfiguration>
  <HexadecimalEscaping lineFeedHexadecimal="X0A" carriageReturnHexadecimal="X0D"/>
</EscapingConfiguration>You can create your own custom HL7 versioned object models (messages, segments, data types etc) and have nHapi parse HL7 messages into it.
You need to update the project's app.config <configSections> element to include the 'Hl7PackageCollection' configuration section.
And then you need to add a Hl7PackageCollection section that details the namespace and custom version name so that the PipeParser can find the custom definitions.
example App.config configuration:
<configSections>
  <section name="Hl7PackageCollection" type="NHapi.Base.Model.Configuration.HL7PackageConfigurationSection, NHapi.Base"/>
</configSections>
...
<Hl7PackageCollection>
  <HL7Package name="NHapi.Model.V22_ZSegments" version="2.2.CustomZ"/>
</Hl7PackageCollection>You need to pass the version you defined above into the PipeParser along with the HL7 message.
var parser = new PipeParser();
var parsed = parser.Parse(message, "2.2.CustomZ");