nhapi 3.2.2

Prefix Reserved
dotnet add package nhapi --version 3.2.2                
NuGet\Install-Package nhapi -Version 3.2.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nhapi" Version="3.2.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add nhapi --version 3.2.2                
#r "nuget: nhapi, 3.2.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install nhapi as a Cake Addin
#addin nuget:?package=nhapi&version=3.2.2

// Install nhapi as a Cake Tool
#tool nuget:?package=nhapi&version=3.2.2                


Build Status Codacy Badge Codacy Badge Nuget Badge

NHapi is a .NET port of the original Java project HAPI.

NHapi allows Microsoft .NET developers to easily use an HL7 2.x object model. This object model allows for parsing and encoding HL7 2.x data to/from Pipe Delimited or XML formats. A very handy program for use in the health care industry.

This project is NOT affiliated with the HL7 organization. This software just conforms to the HL7 2.x specifications.

Key Benefits

  • Easy object model
  • Microsoft .NET 3.5 and netstandard2.0 library that conforms to HL7 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.5, 2.5.1, 2.6, 2.7, 2.7.1, 2.8 and 2.8.1 specifications
  • Can take a pipe delimited or XML formatted HL7 2.x message and build the C# object model for use in code
  • Can take the C# HL7 object model and produce pipe delimited or XML formatted HL7
  • FREE! (You can't beat that price) and open source
  • Fast


NHapi currently targets .NET Framework 3.5 and netstandard2.0 which aims to provide support for projects which target .NET Framework 3.5 and above as well as .NET Core 2.0 and above.

Getting Started

The easiest way to get started using nHapi is to use the NuGet package 'nHapi':

Package Manager Console

Using the package manager console within visual studio, simply run the following command:

PM > Install-Package nhapi


From your console of choice assuming you have dotnet core installed.

> dotnet add package nhapi

For more options please read the Getting Started page of the wiki.

Change Log

nHapi 3.2.0 Announcement

nHapi 3.2.0 has been released - see Full Change Log for details.

If you use nHapi you may find the following projects useful:

  • NHapiTools - Many useful extension methods, helper methods for listening on MLLP/TCP, generating ACK messages, custom segments, validation rules, too many features to list here.
  • HL7Fuse - HL7 Message Hub / Integration Engine
  • HL7-dotnetcore - Lightweight library for building and parsing HL7 2.x messages, for .Net Standard and .Net Core. It is not tied to any particular version of HL7 nor validates against one.
  • Reimers IHE Communication - Provides support for both client side and server side HL7 transaction management.

Should you know of any other projects that use or improve nHapi please let me know or send a pull request with a link to the project and I'll be happy to add it to the list.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net35 is compatible.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on nhapi:

Package Downloads

The NHapiTools are tools that will make using NHapi (the open source .Net HL7 implementation) easier. NHapi has a steep learning curve and not everything works as easy as it should. NHapiTools aims to improve that without tampering with NHapi source code.


Allows SanteDB iCDR to accept HL7 messages.


HL7 engine for Synlab services


Library for sending observations in the form of HL7v2 ORU^R01^ORU_R01 messages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.2.2 184,804 1/24/2023
3.2.0 8,056 1/20/2023
3.1.1 175,466 2/19/2022
3.1.0 32,049 1/1/2022
3.0.4 38,965 8/11/2021
3.0.3 6,797 8/10/2021
3.0.2 53,842 8/9/2021
3.0.0 20,550 6/28/2021
3.0.0-preview.3 305 6/2/2021
3.0.0-preview.2 1,266 1/30/2021
3.0.0-preview.1 7,546 11/2/2020 520,068 9/13/2016 13,965 7/27/2016 7,415 7/15/2016 8,635 7/15/2016 9,511 7/15/2016 96,535 7/13/2016 1,763 7/13/2016 1,901 7/13/2016 1,800 7/12/2016 1,765 7/12/2016 2,911 6/10/2016 2,121 6/9/2016 2,287 5/19/2016 4,629 4/6/2016 63,087 4/23/2015 3,582 3/12/2015 1,820 3/2/2015 1,809 3/2/2015 2,056 2/21/2015 2,089 2/21/2015 1,728 2/19/2015 4,608 2/9/2015 3,246 1/28/2015 1,791 1/28/2015 13,135 4/9/2014
2.4.0 38,131 4/7/2014
2.0.0 2,101 4/7/2014