Re: [HAPI-devel] How are segment names and their index generated?

2010-10-22 Thread Jonathan Bartels
It does help. Now I understand how/why I’m seeing what I’m seeing so I can work with it. For what it’s worth, I’ve been asking questions about HAPI because I’m working on moving a complex channel from Mirth Connect (which uses HAPI) to its own Java code. There is a different use case and some ex

Re: [HAPI-devel] How are segment names and their index generated?

2010-10-22 Thread James Agnew
Hi Jonathan, A bit of background: When a particular structure has more than one of the same segment in a row, according to HL7, those are repetitions. An obvious example would be the NTEs attached to an OBX. On the other hand, when a structure has a segment of the same type but in different loca

[HAPI-devel] How are segment names and their index generated?

2010-10-22 Thread Jonathan Bartels
I’m having a problem using a Terser on a GenericMessage with repeating NTE segments. I whipped up a test case to show the issue. Why does the terser getter like “NTE2-3-1” work while “NTE(1)-3-1” fail? Is there any way to make the latter format work? @Test public void testNTEQuirk() {

Re: [HAPI-devel] Checking the integrity of the fields

2010-10-22 Thread Bryan Tripp
Raphaëlle, If you just have a few specific tests you want to perform, you could write a custom ca.uhn.hl7v2.validation.MessageRule and add it to your ValidationContext (maybe subclass DefaultValidation). If you want to test against detailed specs, consider conformance profiles. See the ca.uhn.hl7

Re: [HAPI-devel] Checking the integrity of the fields

2010-10-22 Thread Jonathan Bartels
I’m not sure about the first two, but I have done some work similar to your 3rd point. It’s usually outside of the scope of a message parsing library to validate the contents of a message, they only validate the structure. Another caveat is that there are many coding systems each with its own fo