How to handle sub-component separator(&) entered by user

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to handle sub-component separator(&) entered by user

  • Creator
    Topic
  • #48060
    Rentian Huang
    Participant

    Greetings Cloverleafers!!!

    Quovadx 5.2 on AIX

    We are having a issue by a ampersand(&) entered by a user, it blows up our msgs in the Engine since an Xlate is using the field it resided.

    Can anyone share with me some tips? How should I handle this?

    Thanks in advance!

    Sam  8)

Viewing 11 reply threads
  • Author
    Replies
    • #57485
      Vince Angulo
      Participant

      We use an xlate pre-proc to regsub a ‘+’ in place of the ampersand.

      Vince Angulo

      Children’s Health System

    • #57486
      Rentian Huang
      Participant

      Vince, if we did an regsub in an xlate pre-proc, it would trimed all the ampersands, but some of them are legitimate sub-component delimiters, that would give us troubles.

      Sam  ❓

    • #57487
      Charlie Bursell
      Participant

      What software is smart enough to know when you meant it to be an ampersand and when you didn’t?

      Your best bet if you can is to get the vendor to change the sub component separator character to something else.

      Other wise, this normally occurs within a couple of fields.  Then parse the message and change it only within those fields,

    • #57488
      Anonymous
      Participant

      The appropriate thing to fix this would be to get the software vendor to abide by the HL7 standard (easier said than done) and use “escape sequences” in their interface.  

      If you are unaware of escape sequences, they basically symbolize the HL7 delimiters of the message.  Of course, the receiving side has to be able to accept them also, or they’ll just appear as the escape sequence, such as “f”, or “t”.

    • #57489
      Rentian Huang
      Participant

      Thanks all for your replies!

      We will see what we could do on the sending side to filter out those annoying things.

      Good night,

      Sam  😛

    • #57490
      Vince Angulo
      Participant

      Good point Sam,

      Actually we only pass segments to the pre proc where we expect this to be a problem (DG1, NTE, GT1, NK1) and ampersands aren’t used a sub-component markers.  Sorry to mislead you.

      Vince Angulo

    • #57491
      Anonymous
      Participant

      All,

      What if the Cloverleaf engine checks if the field has sub-components first? I agree that the issue is in the sender’s side but some times is hard to convince the vendor to fix it for free (some times the app team has no idea on how to fix it)

      But, what if the Cloverleaf parser checks that field in the HL7 variance before interpreting the & as a separator?

      If the HL7 field is defined as containg sub-components, then the & should be interpreted as a separator by the xlate, but if it is defined as text, then it should be interpreted as another character.

      Will something like that work for everybody? Is this doable by Quovadx?

      Best regards,

      Carlos

    • #57492
      Anonymous
      Participant

      Exactly Carlos, getting vendors to do the right thing is often more of a project than the actual project.  We have many vendors that we end up just working around problems for that very reason.

      I don’t think checking if the field is text or not will work, because you still wouldn’t know if the & is supposed to be a delimiter or part of the field.  The engine cannot know that.

      I would suggest an appropriate workaround for this would be Vince/Charlie’s solution, assume that certain fields would not have an & delimiter, and use a regsub to replace them (in that field only) with another character.

    • #57493
      Rentian Huang
      Participant

      I agree with you Matt! Very good point.

      8)

    • #57494
      Anonymous
      Participant

      Yes, I was talking about using the field types to determine if a field could have sub-components. This could only happen in a newer Cloverleaf version. For now, you are right, we need to use Vince/Charlie’s solution.

      What I was trying to say is that if I know that a field is not going to have sub-components, then I could set its type as “Text Data” (or a new data type “Text with no subcomponents”), but if I know that it may have sub-components, then I can declare it as “Composite” and then let the xlate grab the whole field and determine (looking into the data type) if any delimiters inside that field can be ignored. Of course, Quovadx would need to add the code to the parser to make it happen.

      Do this make sense?

      Carlos

    • #57495
      Jim Kosloskey
      Participant

      Carlos,

      Makes sense except just as vendors don’t abide by the standard as far as controlling proper inclusion or exclusion of separators, many vendors also abuse the standard by utilizing subcomponents where none are defined in the standard.

      The HL/7 folks realized that when utlizing structured message construction, it is essential the defined separators only be used as separators and provided a mechanism to allow vendors the flexibility to accomodate inclusion of separator characters (as escaped values) where they would not interfere with parsing.

      I have little patience with vendors who are very boisterous in there proclamations how they are HL/7 compliant at sales time but are strangely quite and less than cooperative when it is shown where their products fail the standard at development/implementation time.

      Normally the correction is relatively easy for the sending and receiving systems from a technical perspective but because only a few clients really object but instead apply local work arounds, there is little incentive for the vendors to correct the issues.

      I guess if more clients refused to accept non-standard implementations there might be fewer of these issues.

      Part of the problem is typically we as Intregration Engineers are not involved in the selection process so that the really pointed questions are not asked early on and potential deficiencies discoverd. By the time we get involved, typically, the project is well on its way and we become the ‘pimple on the butt of progress’ and work arounds are the only recourse.

      I had the pleasure of once working in an environment where the integration capability of products was weighed heavily in the selection process and Integration Engineers reviewed each propsective system for integration flaws. The number of ‘surprises’ were greatly reduced. Of course, there was also detailed specification generation and excruciating testing both of which contributed to pretty stable production implementations.

      That said, if after a little ‘wall to wall’ counseling with the vendor fails to produce a correction, I believe the only valid work around is to identify the offending fields and attempt to correct them prior to Xlate. However, never underestimate what can be entered any where in the message and so it would not be surprising if from time to time it would be necessary to either add fields to be corrected or change the correction necessary.

      My .02…

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

    • #57496
      Rentian Huang
      Participant

      Great point, valuable .02 cents

      8)

Viewing 11 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,127
Forums
28
Topics
9,299
Replies
34,443
Topic Tags
288
Empty Topic Tags
10