We have a plethora of systems that don’t strictly adhere to the standard, and 
have taken to turning off validation as our default position.

On your context use:

setValidationRuleBuilder(new NoValidationBuilder())

Validation will not be performed.

Ian Vowles
Queensland Health
Australia

From: Jonny Rylands [mailto:jonny.ryla...@vitalsignssoftware.com]
Sent: Friday, 27 January 2017 1:31 AM
To: hl7api-devel@lists.sourceforge.net
Subject: [HAPI-devel] Configure message validation

Hi

Is it possible to disable or configure message content validation so that 
messages which fail validation continue to be sent to the receiving application?

Here’s a bit of background:

I have an HL7 service which receives messages over MLLP, does some processing, 
and forwards them to another destination.  The HL7Service class code I’m using 
is below.

I am receiving messages that are invalid against the specification from an 
endpoint over which I cannot change.

These are currently being sent straight to the ExceptionHandler.  I’m like 
these to continue to be sent to the receiving application so I can transform 
them to become valid messages.

HapiContext context = new DefaultHapiContext();
HL7Service service = context.newServer(channel.getPortNumber(), 
channel.isUseTls());
service.registerApplication("*", "*", new Hl7ReceivingApplication());
service.registerConnectionListener(new Hl7ConnectionListener());
service.setExceptionHandler(new Hl7ExceptionHandler());
service.startAndWait();

Many thanks
Jonny



********************************************************************************
This email, including any attachments sent with it, is confidential and for the 
sole use of the intended recipient(s). This confidentiality is not waived or 
lost, if you receive it and you are not the intended recipient(s), or if it is 
transmitted/received in error.
Any unauthorised use, alteration, disclosure, distribution or review of this 
email is strictly prohibited.  The information contained in this email, 
including any attachment sent with it, may be subject to a statutory duty of 
confidentiality if it relates to health service matters.
If you are not the intended recipient(s), or if you have received this email in 
error, you are asked to immediately notify the sender by telephone collect on 
Australia +61 1800 198 175 or by return email.  You should also delete this 
email, and any copies, from your computer system network and destroy any hard 
copies produced.
If not an intended recipient of this email, you must not copy, distribute or 
take any action(s) that relies on it; any form of disclosure, modification, 
distribution and/or publication of this email is also prohibited.
Although Queensland Health takes all reasonable steps to ensure this email does 
not contain malicious software, Queensland Health does not accept 
responsibility for the consequences if any person's computer inadvertently 
suffers any disruption to services, loss of information, harm or is infected 
with a virus, other malicious computer programme or code that may occur as a 
consequence of receiving this email.
Unless stated otherwise, this email represents only the views of the sender and 
not the views of the Queensland Government.
**********************************************************************************

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to