Indeed the problem was that OBX-2 said 'NM' instead of 'ST'.

Thank you so much Rahul and James,  

 

 

________________________________

Von: Rahul Somasunderam [mailto:[email protected]] 
Gesendet: Donnerstag, 17. März 2011 17:45
An: [email protected]
Betreff: Re: [HAPI-devel] Problems with the Type Varies in ORU_R1.OBX-5

 

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: "Varies is a Type used as a placeholder 
for another Type in cases where the appropriate Type is not known until 
run-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







St. Josefs-Hospital Wiesbaden GmbH, Beethovenstr. 20, 65189 Wiesbaden


Telefon 0611/177-0, Telefax 0611/177-1185, E-Mail: [email protected]


Geschaeftsfuehrer: Karl-Josef Schmidt,


stellv. Geschaeftsfuehrer: Peter 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

Reply via email to