In SimpleServer, Responder got a wrong message:

MSH|^&~\|...|...|...|....|20101023012303||ORU^R01|18515|P|2.4||||||UNICODE
PID|1|112462|||name^surname^^^~^^^^~^^^^||21-10-1945|M

with a wrong format date

I want to modify the ACK sent back by the Responder class.

...
23-10 00:39:28 [ERROR]  Attempting to send error message to remote system.
ca.uhn.hl7v2.model.DataTypeException: Failed validation rule for value 
"21-10-1945": Matches the regular expression 
(\d{4}([01]\d(\d{2}([012]\d([0-5]\d([0-5]\d(\.\d(\d(\d(\d)?)?)?)?)?)?)?)?)?)?([\+\-]\d{4})?:
 
Segment: PID (rep 0) Field #7
     at 
ca.uhn.hl7v2.model.AbstractPrimitive.setValue(AbstractPrimitive.java:85)
     at 
ca.uhn.hl7v2.model.primitive.TSComponentOne.setValue(TSComponentOne.java:70)
     at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:420)
     at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:363)
     at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:950)
     at ca.uhn.hl7v2.parser.PipeParser.doParse(PipeParser.java:243)
     at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:167)
     at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:826)
     at ca.uhn.hl7v2.app.Responder.processMessage(Responder.java:139)
     at ca.uhn.hl7v2.app.Receiver$Grunt.run(Receiver.java:121)
23-10 00:39:28 [INFO ]  hapi.home is set to /home/alex/.
23-10 00:39:28 [DEBUG]  Setting /MSH-9 seg: MSH ind: 9 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSH-12 seg: MSH ind: 12 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSA-1 seg: MSA ind: 1 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSA-2 seg: MSA ind: 2 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSH-10 seg: MSH ind: 10 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSA-1 seg: MSA ind: 1 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSA-2 seg: MSA ind: 2 0 1 1
23-10 00:39:28 [DEBUG]  Setting /MSA-3 seg: MSA ind: 3 0 1 1
23-10 00:39:28 [DEBUG]  Setting /ERR-1-4-1 seg: ERR ind: 1 0 4 1
23-10 00:39:28 [DEBUG]  Setting /ERR-1-4-2 seg: ERR ind: 1 0 4 2
23-10 00:39:28 [DEBUG]  Setting /ERR-1-4-3 seg: ERR ind: 1 0 4 3
23-10 00:39:28 [INFO ]  Responder sending message:

MSH|^&~\|||||20101023003928.406-0100||ACK|1088|P|2.4
MSA|AE|18515|Failed validation rule for value "21-10-1945": Matches the 
regular expression (~T~
ERR|^^^207\Application Internal Error\HL70357

I would like MSH-10: Message Control ID is the same of MSA-2

I try to override starting from here:
ca.uhn.hl7v2.app.Receiver$Grunt.run(Receiver.java:121)

Where is the class to override to modify this ACK?

Thanks a lot
Alessandro Del Prete

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to