I try to reconstruct this Example from the v6.3 Reference Guide.
1.) At step "5." In the references Guide this Windows appears:
In my TOS DI 3.2.2 I get this window ( the left side is missing 😞
I am able to connect the MSH tFixedFlowInput component with the tHL7Output component
by clicking the save button "Save as generic Schema" and then loading it into the "MSH" component:
When I double click on the hHL7Output_1 component I see that both components are connected:
But If I run the Job I get the following error:
Starting job thl7out at 11:36 27/05/2020.
[statistics] connecting to socket on port 3528
[statistics] connected
Exception in component tHL7Output_1 (thl7out)
ca.uhn.hl7v2.HL7Exception: Can't encode message: MSH-1 (field separator) is missing
at ca.uhn.hl7v2.parser.PipeParser.doEncode(PipeParser.java:568)
at ca.uhn.hl7v2.parser.Parser.encode(Parser.java:239)
at ca.uhn.hl7v2.parser.PipeParser.encode(PipeParser.java:803)
at ca.uhn.hl7v2.model.AbstractMessage.encode(AbstractMessage.java:192)
at ukb.thl7out_0_1.thl7out.tFixedFlowInput_3Process(thl7out.java:1155)
at ukb.thl7out_0_1.thl7out.runJobInTOS(thl7out.java:1419)
at ukb.thl7out_0_1.thl7out.main(thl7out.java:1268)
[statistics] disconnected
Job thl7out ended at 11:36 27/05/2020. [exit code=1]
If I put a tLogRow in between, you can see that the HL7 fields are populated as in the reference Example:
[statistics] connecting to socket on port 3519
[statistics] connected
||^~\&||||||||||||||||ACK||MSGID66|P||2.3||||||||||||
So for me it looks like that the data from the "MSH" component is not successfully read by the "tHl7Output_1" component.
When I look at the java code it also looks like the msg_tHL7Output_1 Variable gets never filled with data:
It gets created and then assigned to an empty ACK Message Object and then the content gets read.
But
962 ca.uhn.hl7v2.model.Message msg_tHL7Output_1 = null;
...
1091 if (msg_tHL7Output_1 == null) {
msg_tHL7Output_1 = new ca.uhn.hl7v2.model.v23.message.ACK();
terser_tHL7Output_1 = new ca.uhn.hl7v2.util.Terser(
msg_tHL7Output_1);
util_tHL7Output_1.findSegments(msg_tHL7Output_1,
map2Seg_tHL7Output_1);
}
...
1153 String resultMsg_tHL7Output_1 = msg_tHL7Output_1.encode();