Thanks Chris. I get it now. Your solution worked.
How to instantiate a PRT segment for a A01 transaction
Can't I create PR1_11_1 field in HAPI v281?
PR1-REPETITION PROBLEM TERSER
Pr1 field repetition with Terser
Thank you Chris, your idea solved my problem. You may close this ticket.
Hi Chris, I tried with the method message.addNonstandardSegment(String name, int index) too, but how do I let the method know exactly after which standard segment I need to place the custom segment. As an example I tried setting message.addNonstandardSegment("ZPV",20); to the code, but it does not comes after PV1. What should I do to acheive this?
Bypass HL7 data type exceptions on creating a new message