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 ?
Should I try and add them as custom Z segments ?
You do not need to add those; those are there. You need to load them.
Just populating the message does not load the segment like
PIDin case ofREF^I12. Please refer to the hierarchy here:You need to load
Provider_Contactbefore loadingPRDsegment.You can do it something like below:
You need to repeat the same for all the segments those are not loading. I think
ORCis not the part of message; so this will not work with it.Please refer to the source code on GitHub:
If you add
Zsegment, it will be a Z segment. It will not be the segment you are expecting.