Reputation: 100657
The problem is that the Inbound Message Template is expecting different type than I want to specify or work with. The requirement is to have a SINGLE channel convert HL7 v2 to v3, call a web service, then convert the SOAP resulting XML, and convert that to HL7 v2.x and send it back to the original caller. This must be done asynchronously.
Setup: Consider the situation in a Mirth channel:
4 Destinations (in order):
the PostProcessor generates a custom Acknowledgement to send back to the HCIS.
Problem: The Inbound Message Template expects HL7 v2.x because it inherits the datatype from the Source. I need to map an HL7 v3 template to an Outbound Message Template. The Outbound Template is working fine, as it's not bound to anything.
tmp['PID']['PID.5']['PID.5.1'] = msg['controlActProcess']['subject']['target']['identifiedPerson']['name']['family'].toString();
I have tested this setup in another channel with HL7 v3 as the incoming datatype, and it works perfectly.
Question: How can I force Mirth to recognize my Inbound Message Template as HL7 v3 instead of inheriting the channel's incoming data type?
Upvotes: 2
Views: 5414
Reputation: 441
Okay, I'm writing this two and a half years after you posted the question, so by now you've dealt with it somehow. But, for the sake of making the information available, here's a reply.
You have an output connector whose input is HL7 v2.x. You need the input data in XML format (HL7 v3 is XML) so that you can manipulate it with E4X.
Solution: Mirth Connect handles this automatically. Whenever the connector has a filter or a transformer, Mirth transforms the input message to XML. You said that this connector has transformers, so the XML representation of the HL7 input message should be available to you.
If you are using a channel with no filters and no transformers, you can force the transformation by adding a filter where the condition is always true.
Upvotes: 1
Reputation:
A little late, I know, but could you break it into 2 channels: a HL7 v2.x to a channel writer, and then another set up as a channel reader to HL7 v3.x?
If you've solved this, I'd be curious to know how.
Upvotes: 3