Can I successfully use both Mapper steps and Javascript steps in the same channel?
I have been using Mirth for a while, but all mapper steps. I would now like to add fields from IN1 (repeating) segments.
I have used NShaik's code:
var i = 0;
// Check if the InsuranceCarrierID existwhile (msg['ADT_A01.INSURANCE']['IN1']['IN1.3']['CX.1'][i] != null) {
// Get the insurance carrier id
tempInsuranceCarrierID = msg['ADT_A01.INSURANCE']['IN1']['IN1.3']['CX.1'][i].toString();
if (tempInsuranceCarrierID.length > 0) { ... }
// increment index to process the next patient insurance, if any
i = i + 1;}
and ChrisL's
suggestion to Use connectorMap.put('tempInsuranceCarrierID', tempInsuranceCarrierID);
but I can't seem to make this work. I'm sure it is my lack of Java knowledge.
I am going from a file to a database and all else works until I try to add these multiple IN1 segments. Unfortunately, I am still missing the piece to have the repeating fields populate my database.
Is there a way to use the javascript to have the fields listed in the Destination Source Mappings list or do I need to change everything to Javascript and INSERT directly into the table from there as described in the WIKI?
Any help is greatly appreciated.
I have been using Mirth for a while, but all mapper steps. I would now like to add fields from IN1 (repeating) segments.
I have used NShaik's code:
var i = 0;
// Check if the InsuranceCarrierID existwhile (msg['ADT_A01.INSURANCE']['IN1']['IN1.3']['CX.1'][i] != null) {
// Get the insurance carrier id
tempInsuranceCarrierID = msg['ADT_A01.INSURANCE']['IN1']['IN1.3']['CX.1'][i].toString();
if (tempInsuranceCarrierID.length > 0) { ... }
// increment index to process the next patient insurance, if any
i = i + 1;}
and ChrisL's
suggestion to Use connectorMap.put('tempInsuranceCarrierID', tempInsuranceCarrierID);
but I can't seem to make this work. I'm sure it is my lack of Java knowledge.
I am going from a file to a database and all else works until I try to add these multiple IN1 segments. Unfortunately, I am still missing the piece to have the repeating fields populate my database.
Is there a way to use the javascript to have the fields listed in the Destination Source Mappings list or do I need to change everything to Javascript and INSERT directly into the table from there as described in the WIKI?
Any help is greatly appreciated.
Comment