I need to know if MIRTH (or anyone) has an example channel for reading a x12 (837) file and creating an HL7 message.
I see that in the Source Transformer I can set the Inbound Message Template to EDI / X12 and the Outbound Message Template to HL7 v2.x.
Do I need to have a bunch of field mapping in there? I assumed I would create a Javascript transformer with something like where tmp = the outbound HL7 and the msg = the inbound X12:
//Map the fields
tmp['MSH']['MSH.3']['MSH.3.1'] = msg['GS']['GS.02']['GS.02.1'].toString(); //Sending Appl
tmp['MSH']['MSH.4']['MSH.4.1'] = msg['GS']['GS.03']['GS.03.1'].toString(); //Sending Facility
tmp['MSH']['MSH.7']['MSH.7.1'] = msg['GS']['GS.04']['GS.04.1'].toString() + msg['GS']['GS.05']['GS.05.1'].toString(); //Date and time of Message
tmp['MSH']['MSH.10']['MSH.10.1'] = msg['GS']['GS.06']['GS.06.1'].toString(); //Message conrtol ID
Has anyone created a channel to map the fields? I don't want to reinvent the wheel if there is help available...and I was given this today and basically have 2 weeks to get it into production.
I see that in the Source Transformer I can set the Inbound Message Template to EDI / X12 and the Outbound Message Template to HL7 v2.x.
Do I need to have a bunch of field mapping in there? I assumed I would create a Javascript transformer with something like where tmp = the outbound HL7 and the msg = the inbound X12:
//Map the fields
tmp['MSH']['MSH.3']['MSH.3.1'] = msg['GS']['GS.02']['GS.02.1'].toString(); //Sending Appl
tmp['MSH']['MSH.4']['MSH.4.1'] = msg['GS']['GS.03']['GS.03.1'].toString(); //Sending Facility
tmp['MSH']['MSH.7']['MSH.7.1'] = msg['GS']['GS.04']['GS.04.1'].toString() + msg['GS']['GS.05']['GS.05.1'].toString(); //Date and time of Message
tmp['MSH']['MSH.10']['MSH.10.1'] = msg['GS']['GS.06']['GS.06.1'].toString(); //Message conrtol ID
Has anyone created a channel to map the fields? I don't want to reinvent the wheel if there is help available...and I was given this today and basically have 2 weeks to get it into production.
x12 to HL7 channel template??
0 commentaires:
Enregistrer un commentaire