We need to reject the result if any of the OBX 5 contains either '***' or '<>'. The no of OBX are random. There are no error message and the result is making it to destination. i have below code for it in my transformer i also tried to use in Filter but same result.

This is the sample message i use

MSH|^~\&|TEST|TEST|||20110529130917-04:00||ORU^R30^ORU-R30|1|P|2.6

PID|1|12349|123||E^A^B^III||19610615|M|||2222 HOMESTREET^^GREENSBORO^NC^27401-1020|GL|(555) 555-2004|(555)555-2004||S||PATID12345001^2^M10^ADT1^AN^A

ORC|NW|1234

PV1|1|I|2000^2012^01||||004777^ATTEND^AARON^A^titl e|||||||1||||||||||||||||||||||||||||||20070110230 0|200701102300

OBX|1||^HCT^LN||<10|%PCV|||||F|||||APOC3214|||2011 0529130917-04:00|MIX

OBX|2||41651-1^GLU^LN||28|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|3||^BUN^LN||139|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|4||^CREA^LN||15.5|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|5||^NA^LN||100|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|6||^K^LN||2.1|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|7||^CL^LN||76|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|8||^TCO2^LN||11|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|9||^ANGAP^LN||16|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|10||^ICA^LN||<>|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|11||^HB^LN||123|g/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

NTE|1|||Sample Type=MIX||20110529130917-04:00

NTE|2|||CPB=Yes||20110529130917-04:00

NTE|3|||DSN=314237||20110529130917-04:00

NTE|4|||HCT=LOW||20110529130917-04:00

I also tried below code but same result no error and result is processed instead of reject

Code:

for(var a=0; a<msg['OBX'].length();a++ ){ if (msg['OBX'][a]['OBX.5']['OBX.5.1'].toString() != '***' && msg['OBX'][a]['OBX.5']['OBX.5.1'].toString() != '<>') return true; { return false; } }

MSH|^~\&|TEST|TEST|||20110529130917-04:00||ORU^R30^ORU-R30|1|P|2.6

PID|1|12349|123||E^A^B^III||19610615|M|||2222 HOMESTREET^^GREENSBORO^NC^27401-1020|GL|(555) 555-2004|(555)555-2004||S||PATID12345001^2^M10^ADT1^AN^A

ORC|NW|1234

PV1|1|I|2000^2012^01||||004777^ATTEND^AARON^A^titl e|||||||1||||||||||||||||||||||||||||||20070110230 0|200701102300

OBX|1||^HCT^LN||<10|%PCV|||||F|||||APOC3214|||2011 0529130917-04:00|MIX

OBX|2||41651-1^GLU^LN||28|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|3||^BUN^LN||139|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|4||^CREA^LN||15.5|mg/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|5||^NA^LN||100|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|6||^K^LN||2.1|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|7||^CL^LN||76|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|8||^TCO2^LN||11|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|9||^ANGAP^LN||16|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|10||^ICA^LN||<>|mmol/L|||||F|||||APOC3214|||20110529130917-04:00|MIX

OBX|11||^HB^LN||123|g/dL|||||F|||||APOC3214|||20110529130917-04:00|MIX

NTE|1|||Sample Type=MIX||20110529130917-04:00

NTE|2|||CPB=Yes||20110529130917-04:00

NTE|3|||DSN=314237||20110529130917-04:00

NTE|4|||HCT=LOW||20110529130917-04:00

I also tried below code but same result no error and result is processed instead of reject

Code:

for(var Y=0; Y<msg['OBX'].length();Y++ ){ var OBXVal= msg['OBX'][Y]['OBX.5'].toString(); if (OBXVal == '***' && OBXVal == '<>') return false; { return true; } }

## Comment