Hi,

This is one that got me as well. OBX.5 "varies" based on the value of OBX.2
I'd guess that it says "NM" in your message?  If that is the case, HAPI
considers the value in OBX.5 to be of the DataType of "NM"

If you take a look in the DefaultValidation class you will see.

ca.uhn.hl7v2.validation.Rule number = new
RegexPrimitiveRule("(\\+|\\-)?\\d*\\.?\\d*", "");
getPrimitiveRuleBindings().add(new RuleBinding("*", "NM", number));

This is why you got that error.

So what to do?  You have a few options, you could have your sending system
send the value of OBX.2 as something else. You could remove that rule or
modify the rule from your DefaultValidation. The best option may be to
create a custom validation.

Hope this helps,

Cameron




On Tue, Oct 12, 2010 at 10:40, <rmeyer....@orange-ftgroup.com> wrote:

>  Hi all !
>
> I'm trying to use Hapi default validation to validate an ORU message
> containing value "0E+0" in a OBX-5 field, and I got the error : "Failed
> validation rule for value "0E+0": Matches the regular expression
> (\+|\-)?\d*\.?". However, the OBX-5 field is supposed to contain the data
> type 'varies'.
> Have I misunderstood something about OBX-5 data type ? Where does the
> regular expression come from ?
>
> Regards,
>
> Raphaƫlle
>
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to