1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
375 views
by aritra-k-6337 (400 points)
Hi Team,

I would like to validate the Source file type before procedding for any transformation. Could you please help me how to set up a condition to check the source file type ; If the file type is .hl7 then  it would process to the mapping step, else discard.

Regards,

Aritra

1 Answer

0 votes

Use a condition node with the following code:

try {
   qie.parseHL7String(source.getNode('/'));
} catch (e) {
   return false;
}
return true;

 

Your source node would need to be set to text for this to work. If not then it will go to the error queue with a hl7 parse error.

 

by brandon-w-8204 (34.1k points)
...