Removed or replace ampersands in document names

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Removed or replace ampersands in document names

  • Creator
    Topic
  • #55651
    Andres Alvarez
    Participant

      What is the best method of removing/replacing these troublesome ampersands in fields with content like “Health & Physical”?

    Viewing 2 reply threads
    • Author
      Replies
      • #86016
        Jim Kosloskey
        Participant

          What should be done according to the HL/7 standard is the sub-component separator (in this case the &) should be represented by T (assuming the defined escape character in the MSH-2 is ).

          Normally this should be done by the originating system before the message is sent out. So the first approach I would use would be to try to convince the source system they are not compliant with the standard and to change.

          Then there could be issues with the receiving system if it cannot reverse the process.

          If the source will not comply then the answer depends on the release of Cloverleaf you are on and whether you want to do this inside an Xlate or not.

          So knowing what release of cloverleaf you are on will help – also do you want this to occur inside an Xlate?

          In any case, you will need to predetermine what fields are the likely culprits as I think you will need to attack this on a field-by-field basis.

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

        • #86017
          Andres Alvarez
          Participant

            Jim Kosloskey wrote:

            What should be done according to the HL/7 standard is the sub-component separator (in this case the &) should be represented by T (assuming the defined escape character in the MSH-2 is ).

            Normally this should be done by the originating system before the message is sent out. So the first approach I would use would be to try to convince the source system they are not compliant with the standard and to change.

            Then there could be issues with the receiving system if it cannot reverse the process.

            If the source will not comply then the answer depends on the release of Cloverleaf you are on and whether you want to do this inside an Xlate or not.

            So knowing what release of cloverleaf you are on will help – also do you want this to occur inside an Xlate?

            In any case, you will need to predetermine what fields are the likely culprits as I think you will need to attack this on a field-by-field basis.

            Hi Jim,

            I agree with your take on the matter. However, It is not an option to fix it at the route, so I will have to try to make it work within the cloverleaf engine. We have recently upgraded to 6.2 version. I would like to do it within an xlate if possible, but I am not really sure how to go about this. I have narrowed it down it only affecting one field which is OBR.4. I appreciate your response and willingness to help. Thank you!

          • #86018
            Jim Kosloskey
            Participant

              OK on 6.2 I think you can apply the STRING Action (map function) against the field.

              In 6.2 when you reference the field the errant subcomponent separator is exposed (resides in the string value returned) so map & to whatever you want.

              If the receiving system can unescape the HL/7 standard T  that is what I would use. If the receiving system cannot resolve the escaping then agree on what should replace the & with. some people use ‘and’ but be aware of field length so you do not exceed it.

              If you want more detailed assistance email me and I will help you with it.

              If there are more than one receiving systems needing this done from the same source you could consider chaining Xlates where the leading Xlate does common resolutions like this and the following Xlate(s) do the rest of the transformation. Depending on the situation branching might also be an option.

              Also in 6.2 there is the INCLUDE Action which allows you to set up and Xlate which only addresses a specific item (in this case your OBR field) then is invoked (via the INCLUDE) from other Xlates.

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

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