简体   繁体   中英

NHapi: Add multiple ORDER/ORC segments

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)?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM