Questions tagged [nhapi]

NHapi is an HL7 2.x parser for the .NET Framework. NHapi is open-source, and enables .NET developers to programmatically create and modify HL7 messages.

NHapi (pronounced "n-happy") is an HL7 API. It's an open-source, object-oriented HL7 2.x parser for the .NET Framework.

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.

NHapi was ported from the original HAPI Java project.


Useful links


Related tags

47 questions
4
votes
1 answer

Parsing an HL7 without a priori messageType knowledge

In NHapi, how can we parse a message if we don't know what messageType (MSH#9) it is? var parser = new NHapi.Base.Parser.PipeParser(); IMessage parsedMessage = parser.Parse(SampleMessage); parsedMessage is a NHapi.Base.Model.GenericMessage.V25 at…
Jason Kleban
  • 20,024
  • 18
  • 75
  • 125
4
votes
3 answers

considering using NHapi

I am considering using NHapi in some HL7 related projects. Usually when I decide to use any open source library in a project, I have two criteria: the broadness of the user base. the quality of support. Looking at the NHapi forum on SourceForge,…
imak
  • 6,489
  • 7
  • 50
  • 73
3
votes
1 answer

How to send HL7 ACK message as a TCP response?

I'm receiving HL7 messages via TCP connection. Those messages will always be of type ADT. I'm using Kestrel to listen for thise messages and the NHAPI package to deal with them. I took David Fowler's Kestrel sample code to setup a TCP listener. So…
user13755987
3
votes
1 answer

ORU^R01 - Version 2.2 and 2.3 (can't get repetition 2 from field 5 - maximum repetitions is only 1 reps.: segment: obx (rep 0) field 5)

I am getting this Error While Parsing the message . pipeparser.Parser(message) ---> It throws exception at this line. Error : can't get repetition 2 from field 5 - maximum repetitions is only 1 reps.: segment: obx (rep 0) field 5 Message…
Himanshu
  • 67
  • 1
  • 2
  • 12
3
votes
2 answers

How to tell if a segment actually exists in a HL7 message via NHAPI?

I have an SIU S12 message that does not contain a PV2 segment. However, when I get the parsed message from NHAPI, the parent group for PV2, the SIU_S12_PATIENT group, return 1 for currentReps ("PV2"), which means the PV2 is present. var parser =…
Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46
2
votes
1 answer

How to Create Query message nHaPI

Hi I am starting to work with HL7 project where in I need to create a new message from the database values. I got the nHAPI project on from the internet and have no idea how to work with this. Any Help in this regards is welcome Thanks
Rakesh
  • 310
  • 3
  • 19
2
votes
1 answer

How to parse a HL7 message string properly?

I'm using the NHAPI package to parse incoming message strings to HL7 IMessage interfaces using the PipeParser. Based on the HL7 Minimum Layer Protocol (MLP) definition the HL7 message is always wrapped by some characters, 0x0b at start and 0x1c,…
user13755987
2
votes
1 answer

HL7 - Parsing Specimen Source (OBR-15) using nHapi in c#

I was wondering if any wonderful person with experience of using nHAPI in C# would be able to help a newbie out with the OBR-15 field (Specimen Source) of an HL7 message? I've dug around and I can't find any documentation online to help me out, so…
2
votes
2 answers

Extract PDF from HL7

I am writing a program in C# that will parse the HL7 message and will write the data to a Text File. The HL7 also contains an embedded PDF in base64 format. I have to decode the base64 encoded pdf and it too. string fileLocation =…
Samin Khan
  • 61
  • 12
2
votes
1 answer

Parsing HL7 message with newest nHapi parser version - C#

I'm starting to work with nHapi C#. I've tried to parse some message of HL7 2.6 version with NHapi 2.8.1 model but is not working. How can I parse an HL7 message of a previous version (say 2.6) with a newer HL7 nHapi version (say 2.8)? There some…
rmpt
  • 606
  • 1
  • 4
  • 24
2
votes
2 answers

Unable to Parse Multiple IN1 Segment in HL7 using HAPI TERSER

I am receiving HL7 messages version 2.5.1. MSH|.. PID|.. PV1|.. ORC|.. IN1|1|... IN1|2|.... So in the above example IN1 is repeating, however when i try to Parse the second IN1 segment with TERSER it throws an exception "Can't create repetition #1…
Rolwin Crasta
  • 4,219
  • 3
  • 35
  • 45
2
votes
1 answer

OBR Repitions on HL7 ORM_o01 nHapi

Hi I am trying to parse HL7 ORM_o01 Messages but I get an error stating that I cannot get OBR repititions. I'm parsing using HL7 2.3 and this format according to the standard does allow OBR repitions. Below is the HL7 message I'm trying to parse…
ArcX
  • 687
  • 8
  • 20
2
votes
2 answers

Nhapi Parsing Issue

I am new to Nhapi and using it to parse the HL7 message . The issue i am facing is i am parsing the ADT^A03 message but always i get the PV1 segment as null. I am attaching the Sample Message and my Code . Sample Message …
Himanshu
  • 67
  • 1
  • 2
  • 12
1
vote
1 answer

nHapi Add Non-Standard Segments to REFI12 Message

I'm using nHapi to create & read HL7 REF_I12 messages in HL7 V2.3 and V2.4. The standard nHapi REF_I12 Message is missing several segments I need - PRD, OBR, PV1, PV2, ORC and OBX. How do I add these segments to the standard nHapi REF_I12 Message…
Chris C.
  • 908
  • 1
  • 10
  • 19
1
vote
0 answers

HAPI to NHAPI code conversion

I am supposed to convert HL7 message to XML format using NHApi in (C#, .net). I somehow understood this code which does the same using HApi in Java. I want the same code for NHApi in C#,.net import ca.uhn.hl7v2.DefaultHapiContext; import…
Sayan Sen
  • 1,654
  • 3
  • 16
  • 26
1
2 3 4