temporary variables in a HL7 translation

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf temporary variables in a HL7 translation

  • Creator
    Topic
  • #49678
    Bahram Aziz
    Participant

    Hi I have two questions to regarding temporyary variables.

    1. @date variable. When I use the @date variable on my source side, I see that in translated message the date appears in this format, yyyymmdd, (8 characters) 20071205. I would like to have the date appear in 14 character format like this, yyyymmddhhmmss, 20071205110012. Is there a variable that will give me the date and time in this format. The @now variable is like the @date variable.

    2. In my translation I would like to combine multiple variables and then put the result into a Destination field.

    Code:



    source                                                           destination

    field1                                                             @fname
    field2                                                             @lname
    field3                                                             @mname
    @fname^@mname^@lname                             destinationField

    When I do this in my HL7 translation I get an compiler error.

    Is these a better way to do this. How do I combine the stored values from 3 or more source fields into a destination field with the ^ or ~ seperaters.

    thanks,

    Bahram

Viewing 1 reply thread
  • Author
    Replies
    • #63061
      John Hamilton
      Participant

      I assume this is HL7 to HL7.

      I just did an @date to a filed and it appers to have the full date.

      I used the datecopyopt to remove the GMT stuff.

      Plus.

      Did you on the filed copy put them on the same line or seperate line.

      I’m think that

      @fname

      @mname

      @lname

      and not @fname^@mname^@lname will give you what you need.

    • #63062
      Jim Kosloskey
      Participant

      Bahram,

      #1 – Check to make sure the length of the date field you are populating (in the outbound variant) is of sufficient length to hold the entire date/time value you want. If it is not make it longer in the variant.

      #2 – Use the component notation in your path address for the field (eg 0(0).XXX.00123.[0] and (0).XXX.00123.[1]  where the value inside the square brackets [] specifies which component. Then the Xlate will place the apprpopriate compnent separator (in this case a ^) for you. That way if you ever need to change the value of the component separator, you simply change the MSH-2 and the Xlate takes care of it for you.

      So you can COPY directly from the inbound fields to the specific outbound components.

      Jim Kosloskey

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

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,295
Replies
34,439
Topic Tags
287
Empty Topic Tags
10