Hi Charles,

We've done a bit of digging, but haven't yet begun the work to prepare HAPI
to handle HL7 v2.7. We're certainly planning on supporting any new control
features including the truncation character, but haven't actually taken it
on yet. (Incidentally, if anyone on the list has an interest in this, get
in touch! We'd love the help!)

Either way, I definitely want to see 2.7 and 2.7.1 in the next release, as
well as 2.8 if it's ballotted and available in the HL7 DB by then.

Until then, I would recommend simply hardcoding a correction to the
incoming message, assuming you are using standard escape characters. You'd
need to be a bit more fancy if you aren't:

if (message.startsWith("MSH|^~\\&#"))
    message = "MSH|^~\\&" + message.substring(10);

..or if you are using an MLLP server or client, you could subclass
PipeParser and pass that in:

Parser = new PipeParser() {
   public Message parse(String message) {
      if (message.startsWith("MSH|^~\\&#"))
         message = "MSH|^~\\&" + message.substring(10);
      return super.parse(message);
   }
};

Cheers,
James



On Mon, Apr 8, 2013 at 4:24 PM, Charles D. Fisher
<cd...@health.state.ny.us>wrote:

> The United States is adopting specifications ("Implementation Guides") for
> interoperable laboratory reporting based on the HL7 v2.5.1 ORU^R01 message.
>  Without going into too many details, for some of these documents the
> authors are "pre-adopting" features from HL7 2.7.1 into the 2.5.1-based
> guides.  One such feature is the "truncation character," a fifth character
> in MSH-2 that may optionally follow the other four that we are all familiar
> with.  The truncation character is described in the HL7 2.7.1 standard
> Chapter 2 section 2.5.5.2.  Oddly enough, the definition of the MSH-2 field
> itself in that same document, section 2.14.9.2, does not mention the
> truncation character and defines only four characters in MSH-2.  Perhaps
> that was an oversight.
>
> In any case, as far as I know the truncation character is not provided for
> in HL7 2.5.1.  When I use the HAPI parser to parse a message that includes
> it, it throws an exception:
>
> 2013/04/08 16:11:43 [Mem] 76,056,264 [ProcessHL7File] Error parsing the
> first message in the file: ca.uhn.hl7v2.HL7Exception: Invalid or incomplete
> encoding characters - MSH-2 is ^~\&#
>
> My system is a message receiver.  The current implementation guide I have
> to deal with requires the "#" to be in MSH-2, but we have been ignoring
> that so far and allowing labs to omit it.  The next version of the
> implementation guide, for Meaningful Use Stage 2, is likely to at least
> allow it if not require it, but that means I have to be able to handle
> messages that contain it.
>
> Is there a standard method in HAPI to allow the relaxation of the
> validation rule for MSH-2 in v2.5.1 so that it can successfully process
> messages containing this character?
>
> A related question: when HAPI adds the classes for v2.7.1, will they
> tolerate the 5-character MSH-2?
>
> Charles Fisher
> Division of Epidemiology
> New York State Dept. of Health
> 518-474-2735
>
>
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire
> the most talented Cisco Certified professionals. Visit the
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to