HAPI Changelog

What's new in HAPI 2.2

Apr 16, 2014
  • This release contains a number of big fixes, a newly rewritten MLLP implementation and several API enhancements.

New in HAPI 2.1 (Mar 21, 2013)

  • HAPI is now able to work without any structure JARs for basic tasks, and can process unknown versions of HL7 (e.g. 2.99) if configured to allow this. See GenericModelClassFactory for more information.
  • Fixed incorrect trimming rule for TX.
  • Fixed incorrect generation of ACK messages for HL7 versions newer than 2.4.
  • ModelClassFactory define their own event map location, where the mapping between event and message structure is defined. Compatibility notice: Parser.getMessageStructureForEvent is not static anymore and was deprecated.
  • Fixed bug in DefaultXMLParser. Thanks to Leo Marcov for reporting.
  • Deprecated LowerLayerProtocol.makeLLP as there is now the choice between MinLowerLayerProtocol and ExtendedMinLowerLayerProtocol.
  • ValidationContext can now be more conveniently configured using ValidationRuleBuilders. All predefined ValidationContext classes have been reimplemented to be defined by such builders.
  • HapiContext becomes the unique source of configuration. Changing a context object immediately changes the configuration of all connected parsers, servers etc. Message-specific ValidationContext has been deprecated and will be removed in the next version.
  • XML Parser is now able to handle escape sequences that are relevant for XML encoding when parsing and rendering.
  • Introduced HapiContext, which aggregates most of the configuration and allows to instantiate correspondingly configured HAPI services (parsers, validators, servers, ...).
  • All XML processing is based on DOM Level 3 and uses the standard libraries, which are included in JRE 5 and newer. Therefore, no external XML-related libraries are required anymore.
  • The default XML implementation can be overridden this by setting the system property org.w3c.dom.DOMImplementationSourceList to the external DOM implementation and org.xml.sax.driver to an external SAX implementation.
  • When Xerces 2.11 is used as external XML processor library, org.w3c.dom.DOMImplementationSourceList must be set to org.apache.xerces.dom.DOMXSImplementationSourceImpl and org.xml.sax.driver must be set to org.apache.xerces.parsers.SAXParser.
  • Added a set of new message ID generators, to be centrally configured using the ParserConfiguration class. Provides non-persistent generators and the possibility to plug in custom ID generators.
  • Make Message Validation more versatile by adding a ValidationExceptionHandler that is called on every violation of a validation rule. A new implementation of such a handler (RespondingValidationExceptionHandler) is capable of creating response messages based on the validation result.
  • Minor API enhancements:
  • ConnectionHub has a new factory method which accepts an LLP instance but does not require a boolean flag to indicate whether TLS is being used (added for consistency with other methods).
  • A number of internal log statements which are only really useful if you are familiar with HAPI internals have been changed from DEBUG level to TRACE level, to make debug level logging easier to understand.
  • Service classes (such as SimpleServer) now have a startAndWait() method which doesn't return until the service has successfully started
  • When GenericParser parses a message, the Parser instance associated with the message is set appropriately to either the Pipe Parser or the XML Parser. This means that calls to generateAck().encode() will generate a message with the appropriate encoding.
  • AbstractMessage#generateAck() now sets the Parser instance associated with the generated Ack message to be the same instance as its own instance. This means for instance that if a message is parsed from an XML message, the same XML parser will be associated with the generated ACK.
  • Prevent UnsupportedOperationException when AbstractType#toString() is called on a message that was parsed by an XML parser (for instance on an ST, or another datatype).
  • ConnectionHub and SimpleServer now each accept a custom socket factory instance, which can be used to allow custom configuration on sockets, or special TLS configurations. This checkin also corrects an issue where the "tls" parameter on ConnectionHub was not honored.
  • Fix an issue parsing XML encoded messages where any segment groups with a four letter name are ignored (e.g. the DIET group in an OMD_O01 message).
  • Fix an issue where SegmentFinder can't find PID2 within an A24 message.
  • AbstractTextPrimitive#getValueAsHtml() now properly escapes HTML reserved characters: < >
  • Fix an issue that prevented the sample code for Custom Model Classes from working properly.
  • Allow messages which contain "choices" within their structures to parse correctly. For example, the ORM_O01 v2.5 message has a structure called ORDER_DETAIL which can have any one of 6 different segments as its first segment. Previously HAPI treated all as required and failed to correctly parse in many cases.
  • v2.3 structure for ORC-14 is correctly set to XTN datatype (was previously TN) Improve error message in ExtendedMinLowerLayerProtocol when an incoming message can't be processed because it contains an invalid MSH segment. Thanks to Jens Villadsen for reporting!
  • Allow ReceivingApplicationExceptionHandler to process exceptions even when un-parseable messages are received.
  • New parser configuration option for customizing Unexpected segment (e.g. Z-segment) behavior in terms of where in the structure the segment gets placed.
  • Prevent eventmap from containing structure mappings that shouldn't exist because the source structure exists. For example, in v2.3.1 there should not be a mapping from ADT_A34 to ADT_A30, because there is a structure for ADT_A34 itself.
  • Correct unhelpful error logging in HohRawServlet when the HL7 over HTTP servlet has an error decoding a request.
  • Introduce new PipeParser non-greedy mode which can be used to give the parser hints on how to proceed when the choice of where to put the next segment is ambiguous between moving to a child group later in the message structure or moving to a new repetition of a parent structure.
  • Improve the documentation on the Maven Plugins and introduce a new plugins for generating Superstuctures and XSDs

New in HAPI 2.0 (Dec 5, 2012)

  • This release contains a complete overhaul of the SimpleServer infrastructure, a move to SLF4J, a new LLP implementation, and many other enhancements and bugfixes.

New in HAPI 1.2 (Dec 5, 2012)

  • This release brings some bug fixes and a few enhancements. The primary focus of this release is in fixing issues relating to parsing and encoding. In particular, a number of issues specific to parsing of OBX-5 (Varies) values have been corrected.

New in HAPI 1.1 (Dec 5, 2012)

  • This release contains a number of bug fixes and several new features.

New in HAPI 1.0.1 (Dec 5, 2012)

  • This release corrects a single issue

New in HAPI 1.0 (Dec 5, 2012)

  • This release adds a newly reworked PipeParser, and number of new features