Xlate Copy statement field format

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Xlate Copy statement field format

  • Creator
    Topic
  • #48910
    Rich Durkee
    Participant

    Today I ran across a translate that someone had coded that contained copy statements of this format:

    COPY        =HL7ADT -> 0(0).MSH(0).#3

    COPY        =A04 -> 0(0).EVN(0).#1

    I have always used this format

    COPY         =HL7ADT -> 0(0).MSH(0).00003

    COPY         =A04 -> 0(0).EVN(0),00099

    I cannot find anything in the documentation regarding using the #FieldNumber format. Is this something new or just something that I was unaware of that everyone else knows about?

    This is used in an HL7 message Xlate on AIX 5.2 and Cloverleaf 5.4.1

Viewing 7 reply threads
  • Author
    Replies
    • #60082
      Chris Williams
      Participant

      It’s just a little shortcut. Sometimes it’s a lot easier to to find the 44th field in the segment rather than scanning all the fields looking for the one that uses 09876.

    • #60083
      Russ Ross
      Participant

      I’m uncertain if the field notaiton is documented, but I’ve been using it for since I can remember.

      Gotham is the first person that showed it to me, so let me say thanks.

      I like it especially if the vendor decides to change versions of HL7 from 2.2 to say 2.3 then the XLATE will probably work without much change.

      If you used the HL7 item numbers in the path then you’ve got alot of changes to make.

      Not to mention most people use the field notation in everyday conversation so screen shots or Xlate snippets make much more sense to them.

      I must say this is a point that Jim Kosloskey and I have opposite preferences on.

      Jim has told me he likes the item number because that is what is displayed by the testing tool and that makes it easier for him to identify the same item in the Xlate.

      It is true that when using the field notation in the Xlate, there is some mental effort necessary to figure out which item in the Xlate is the same thing in the tester, but I still have a preference for the field number notation.

      By the way, the field notation has worked for all levels of granulaity I’ve encountered.

      Here is an example of using the field notation for some subfileds:

      =ROSS -> 0(0).PID.#5.[0]

      =K -> 0(0).PID.#5.[1]

      =Russ -> 0(0).PID.#5.[2]

      The notation also works in TCL procs that use GRM and XPM functions.

      Russ Ross
      RussRoss318@gmail.com

    • #60084
      Charlie Bursell
      Participant

      In CL 5.5 you will be able to add by field number when yo select a field

      FWIW, the field number has been available since early Cloverleaf

    • #60085

      Is this valid?

      =ROSS -> 0(0).PID.#5.#1

      =K -> 0(0).PID.#5.#2

      =Russ -> 0(0).PID.#5.#3

      -- Max Drown (Infor)

    • #60086
      Charlie Bursell
      Participant

      No.  Change like this:

      =ROSS -> 0(0).PID.#5.[1]

      =K -> 0(0).PID.#5.[2]

      =Russ -> 0(0).PID.#5.[3]

      Remember though taht the numbers within the [] are zero-based

    • #60087
      Chris Williams
      Participant

      I came across this situation while working on a new Xlate and was wondering if I

    • #60088
      Anonymous
      Participant

      “Given the field OBR.#15 containing |A^B^C^D&E^F^G|”

      First of all, I’m assuming you aren’t using BULKCOPY. I’ve played around with this some and the only way I could get the outbound to appear the same as the inbound was to copy each piece individually as follows:

      OBR.#15.[0]—> OBR.#15[0]    # gives you the “A”

      OBR.#15.[1]—> OBR.#15[1]    # gives you the “B”

      OBR.#15.[2]—> OBR.#15[2]    # gives you the “C”

      OBR.#15.[3].[0]—> OBR.#15.[3].[0]    # gives you the “D” as the first piece of the subfield.

      OBR.#15.[3].[1]—> OBR.#15.[3].[1]    # gives you the “E” as the second piece of the subfield.

      OBR.#15.[4]—> OBR.#15.[4]    # gives you the “F”

      OBR.#15.[5]—> OBR.#15.[5]    # gives you the “G”

      The OBR.#15.[3].[1] will allow you to access only the “E”, in case you wanted to do something different with it.

      Thanks…Tom

    • #60089
      Roy Harwell
      Participant

      For a field which I know may contain “&” as a part of the data, I have also used a pre-proc.  Here is an example from the PID-11 address line component:

       COPY PID#11(0)[0] -> PID#11(0)[0]

      pre-proc

       set outVal [join $xlateInVals “&”]

       set xlateOutVals

        I am a relative newcomer to Cloverleaf, so if there is some reason not to do this, I welcome the comments/opinions/corrections.

        Thanks

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,447
Topic Tags
288
Empty Topic Tags
10