Ismet,

The OBX-5 is to be populated based on the type defined in OBX-2.
If the OBX-2 says NM (for Numeric), you can't have values like 'negativ' and '>2' over there. Based on the regex in your exception stack trace, I figure your OBX-2 says 'NM'.

R,
rahul

On 03/17/2011 08:46 AM, Çelebi, Ismet wrote:

Sorry missing information.

I am using HL7 v.2.4

------------------------------------------------------------------------

*Von:*Çelebi, Ismet
*Gesendet:* Donnerstag, 17. März 2011 16:39
*An:* '[email protected]'
*Betreff:* Problems with the Type Varies in ORU_R1.OBX-5

Dear helpfull developers,

I am using HAPI 1.0.1 to validate ORU_R1 messages.

I have the following exception for the filed OBX-5

_ca.uhn.hl7v2.model.DataTypeException_: Failed validation rule for value "negativ": Matches the regular expression (\+|\-)?\d*\.?\d*

at ca.uhn.hl7v2.model.AbstractPrimitive.setValue(_AbstractPrimitive.java:85_)

      at ca.uhn.hl7v2.util.DeepCopy.copy(_DeepCopy.java:28_)

      at ca.uhn.hl7v2.model.Varies.setData(_Varies.java:104_)

      at ca.uhn.hl7v2.model.Varies.fixOBX5(_Varies.java:171_)

      at ca.uhn.hl7v2.parser.PipeParser.parse(_PipeParser.java:379_)

      at ca.uhn.hl7v2.parser.PipeParser.parse(_PipeParser.java:943_)

      at ca.uhn.hl7v2.parser.PipeParser.doParse(_PipeParser.java:243_)

at ca.uhn.hl7v2.parser.GenericParser.doParse(_GenericParser.java:241_)

      at ca.uhn.hl7v2.parser.Parser.parse(_Parser.java:167_)

at de.joho.portal.socket.HL7Server.handleConnection(_HL7Server.java:63_)

      at de.joho.portal.socket.HL7Server.main(_HL7Server.java:144_)

The exception comes not only for "negativ" but also for other values used in our system, such as ">60", ">20", "neg" etc.

Definition in the file Varies.class is: "VariesisaTypeusedasaplaceholderforanotherTypeincaseswheretheappropriateTypeisnotknownuntilrun-time(e.g.OBX-5)."

The only thing I did was trying to parse the whole message:

String hl7message = new String(buffer, 0, count);

Message hapiMsg= p.parse(hl7message);

As far as I understand I should be able to use Varies also as string, so it should work.

Best regards,

Ismet


St. Josefs-Hospital Wiesbaden GmbH, Beethovenstrasse 20, 65189 Wiesba den
Telefon 0611/177-0, Telefax 0611/177-1185, E-Mail: [email protected] Geschaeftsfuehrer: Karl-Josef Schmidt, stellv. Geschaeftsfuehrer: Pete r Pfaffenberger
Registergericht: AG Wiesbaden, HR B 21935


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d


_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

--
Rahul Somasunderam
Certify Data Systems
x7461

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to