0

I am using NHapi to generate a HL7 message. This is the sample message I want to create:

MSH|^~\&|EHR Application|EHR Facility|PH Application|PH Facility|20100929111444||VXU^V04^VXU_V04|NIST-100929111444875|P|2.5.1
PID|||97833566^^^MPI&2.16.840.1.113883.19.3.2.1&ISO^MR||Brown^Mark||19880617|M||2054-5^African American^HL70005|799 Newton Street^^Augusta^ME^04330^^M||^PRN^^^^207^9592228|||||||||N^Not Hispanic or Latino^HL70189
ORC|RE
RXA|0|1|201004051600|201004051600|33^Pneumococcal Polysaccharide^CVX|0.5|ml^milliliter^ISO+||||||||1039A||MSD^Merck^HL70227||||A
ORC|RE
RXA|0|1|201005261100|201005261100|15^"Influenza, split virus"^CVX|0.5|ml^milliliter^ISO+||||||||U6007||NOV^Novartis^HL70227||||A

I can create a message with one ORDER (ORC+RXA) segment. How do I add multiple of these? According to the documentation VXU_V04_ORDER Group can be repeated.

Can can this be done with C# and NHapi (or even Java)?

p.campbell
  • 98,673
  • 67
  • 256
  • 322
Abhi
  • 107
  • 3
  • 13

2 Answers2

1

It took me some time to figure it out. But, if you take the HAPI by example about how to populate the OBX segment and extrapolate to VXU_V04_ORDER then you can do it.

Catherine
  • 11
  • 1
  • 1
    Welcome to Stack Overflow, Catherine! It would be most helpful if you edited your answer and added a bit of details/example - your answer points in the correct general direction, thou! – qdot Sep 08 '12 at 08:46
1

VXU^V04 has a public getORDER(int rep) method to create or return the VXU_V04_ORDER segments in the group. Here rep is the index of the VXU_V04_ORDER segment in the order group.

Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46