[HAPI-devel] Parse only Segment MSH

2014-05-07 Thread rsanvidal
Hi, In our source code, we parse the full message (from string data) to get the MessageControlID value. How can I get the MessageControlID value without parsing the full message (Example: parsing only the MSH Segment)? Note: I attach the "getUID" method to get this value. Best regards. Rafael.

Re: [HAPI-devel] MLLP errors while sending an ORU^O01 message

2014-05-07 Thread Daniel Nebot
It does not seem to complain about your message, but about the Lower Layer encapsulation. It says "Expected byte '11'"  so, given that dec 11= hex 0B (namely VT), I would rather check your MLLP encapsulation ( 0B msg 1C 0D) Is that what you are asking? Hope that helps Daniel Nebot IZASA On

[HAPI-devel] XPN.1s and XAD.1s are missing when parsing XML

2014-05-07 Thread Oliver Wilkie
Hi! I’m a first-time user of the HAPI library (version 2.2) and am seeing some strange behaviour. I’m parsing in an ADT A01 Hl7v2.4 message which has the following patient info section SMITH FREDRICA J

Re: [HAPI-devel] MLLP errors while sending an ORU^O01 message

2014-05-07 Thread Pablo Pazos
Hi Daniel, thanks for the response. The MLLP encapsulation is done by HAPI, so I don't have much control over that. Right now the problem is solved, it seems it happened because a network problem (wasn't able to reach the destination because I didn't opened the receiving port). The weirdness might

Re: [HAPI-devel] Parse only Segment MSH

2014-05-07 Thread James Agnew
Hi Rafael, If you just want the value of one field in the message header, probably the best way to do so would be using the PreParser: http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/preparser/PreParser.html One other thing to note- Parser objects are very heavyweight to create, so you wo

Re: [HAPI-devel] XPN.1s and XAD.1s are missing when parsing XML

2014-05-07 Thread James Agnew
HI Oliver, I'm fairly sure XPN.1 is a composite type, so that message looks invalid to me. I believe specifically that it should have a child element called or something similar. I'm on my phone at the moment so I can't check, but if you create a message instance in code with XPN populated and e

[HAPI-devel] DefaultValidation is US-centric

2014-05-07 Thread Oliver Wilkie
The DefaultValidation ca.uhn.hl7v2.validation.impl.DefaultValidation seems to be US-centric. For instance, it complains about non-US telephone numbers. I’m writing code for the NHS in the UK. Is there an existing Validator out there that is more UK/NHS-friendly? I very much doubt I am the fir

Re: [HAPI-devel] DefaultValidation is US-centric

2014-05-07 Thread Christian Ohr
HL7 cannot deny its U.S roots... Fortunately, there's DefaultValidationWithoutTN in the same package that omits the validation rules for U.S. phone number schemes. You can also inherit from DefaultValidationWithoutTNBuilder and add your own/UK-specific rules. See e.g. http://hl7api.sourceforge.net