Date Format – YYYMMDDhhmmss.0000-0400

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Date Format – YYYMMDDhhmmss.0000-0400

  • Creator
    Topic
  • #49458
    Joseph Benigno
    Participant

      Interesting experience.

      I am doing an XLATE between inbound and outbound HL7 messages.

      At first I had created a new message in the existing variant, and doing Pathcopies. My dates were fine.

      I then had a need which forced me to create a new variant. When I did the same XLATE between variants, every date or date time field had the format of YYYYMMDDhhmmss.0000-0400

      It took a while, but eventually I placed a DateCopy at the beginning of my XLATE and all of the date and date time fields returned to normal HL7 format.

      Not sure why there would be a difference with XLATE between messages in the same variant versus XLATE between 2 different variants.

    Viewing 1 reply thread
    • Author
      Replies
      • #62048
        Jim Kosloskey
        Participant

          Joe,

          Check the old variant and see if the length of the Date field(s) was not shortened.

          A lot of people did not know of the DATECOPY Action and changed Variants to truncate the precision off of the Date/Time.

          By the way, I think the default HL/7 Date/Time includes the precision – its just that a lot of systems choke on it.

          Jim Kosloskey

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

        • #62049
          Charlie Bursell
          Participant

            There is a misconception about DATECOPYOPT.  There is an option in there to set “add Precision” on or off.  The default, prior to Cloverleaf 5.5 is “Add Pricision” = on.  This means, by default the xlate engine will expand any timestamp fields to comply with the HL7 standard which is 24 bytes (I think)

            If you did not want this to happend you would place a DATECOPYOPT prior to any BULKCOPYCOPY or COPY operations with “Add Pricision = Off.  Then whatever comes into those fields is left “as-is”.

            Note I said “as-is”.  DATECOPYOPT *WILL NOT* truncate an inbound timestamp field regardless of the setting.  Turning “Add Precision” off tells the translate engine to leave it alone.  Turning it on tells the engine to expand if required but not to truncate.

            If you are getting 24 byte timestamp fields in, and wish to only have something like YYYYMMDDHHMMSS then you have two options.  !.  A simple Tcl fragment to truncate the field or 2.  Modify the field with in a variant to be 14 bytes.

            As I said, in Cloverleaf versions prior to 5.5 the default setting for DATECOPYOPT was Add Precision = on.  Since most people prefer it off and therefore have to start every translation with a DATECOPYOPT, we decided to change in version 5.5.  In this version the default is off so you do not have to add the DATECOPYOPT unless really needed.  You can change the default setting under the GUI (Options -> Client Options -> Xlate Config -> Default Timestamp Precision).

            I hope this helps.

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