My first thought would be to copy the inbound HL7 variant that you are using to a new outbound HL7 variant.
Then use a copy of the MSH segment to create a new segment HDR segment in your case.
Do the same with the PID to create the new PAT segment.
Then use the Xlate to copy all the fields from the MSH segement to the HDR segment.
Do the same to Xlate the PID fields to the PAT segment.
etc… until you have copied across all the segments/fields that you will need.
If Cloverleaf does not have any built in assumptions I think this will work.
If Cloverleaf does have built in assumption then you might have a challenge with the MSH segment.
I would have to try it before I know if such assumptions exist that might get in the way.
Here is an example of how I would do this quickly if I was using the standard HL7 2.3 as my input varinat and xcelra_adt as my outbound variant in a site called test_xcelera.
First use the IDE to create the new HL7 2.3 xcelera_adt variant, then close the IDE
At the AIX command line do the following
cd $HCIROOT/formats/hl7/2.3/segments
cp MSH $HCIROOT/test_xcelera/formats/hl7/2.3/xcelera_adt/segments/HDR
cp PID $HCIROOT/test_xcelera/formats/hl7/2.3/xcelera_adt/segments/PAT
#ect…
Sorry time for another meeting, I’ve got to go but you get the idea.
Russ Ross
RussRoss318@gmail.com