Sidebar

Validate Source File Type

0 votes
215 views
asked Feb 16, 2021 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.

 

answered Feb 16, 2021 by brandon-w-8204 (33,270 points)
...