Hi all,
Thank you very much for all your answers. You are right, I have "NM" in OBX-2,
and NM doesn' t accept scientific notation. In fact, I will modify the content
of OBX-5 in order to match the NM pattern.
Raphaëlle
________________________________
De : Cameron Freiner [mailto:[email protected]]
Envoyé : mardi 12 octobre 2010 18:56
À : zze-OR HVA MEYER R ext RD-BIZZ-GRE
Cc : [email protected]
Objet : Re: [HAPI-devel] Hapi validation : OBX-5 pattern
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, <[email protected]> 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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel