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.hl7v2.conf package
(ca.uhn.hl7v2.conf.spec.message.StaticDef would be a good place to
start -- this approach takes a bit of work though).

Finally, I haven't worked with HL7 in a long time, so please excuse me
if my advice is a little off.

Bryan

On Fri, Oct 22, 2010 at 11:19 AM, Jonathan Bartels
<jonath...@mirthcorp.com> wrote:
> 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 formats and
> licensing issues.
>
>
>
> From: rmeyer....@orange-ftgroup.com [mailto:rmeyer....@orange-ftgroup.com]
> Sent: Thursday, October 21, 2010 11:38 AM
> To: hl7api-devel@lists.sourceforge.net
> Subject: [HAPI-devel] Checking the integrity of the fields
>
>
>
> Hi,
>
>
>
> Does someone know if it is possible with Hapi to check the content of HL7
> message fields ? I know that the default validator checks if required fields
> are filled, and that it has some patterns to validate that the fields format
> is correct. But I would like to check soem other things, such as :
>
> - the unicity of OBX-1 in the message (for example the first OBX segment has
> "1" in its OBX-1 field, the second has "2", etc)
>
> - the coherence of  hierarchical identity in OBX-4 ("1.0.0.1", then
> "1.0.0.2", etc)
>
> - checking if a CWE-2 subfield  is part of the coding system defined in
> CWE-3 subfield.
>
>
>
> I guess I'm not the first person trying to do this, so I wonder if something
> already exists for this type of validation.
>
>
>
> Thanks for your help.
>
>
>
> Raphaëlle
>
> ------------------------------------------------------------------------------
> 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
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>

------------------------------------------------------------------------------
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
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to