turn a 12 character date to 8 character

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf turn a 12 character date to 8 character

  • Creator
    Topic
  • #54581
    teddy greschel
    Participant

      I am trying to change the admit date and discharge date in PV1 from yyyymmddhhmm to a yyyymmdd. i am very new to interfacing and any help will be appreciated.

      Thanks

    Viewing 4 reply threads
    • Author
      Replies
      • #82096
        Robert Milfajt
        Participant

          Easiest, if you are using an Xlate, is to modify your outbound HL7 variant so Admit and Discharge dates are 8 characters long.

          Hope this helps,

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #82097
          teddy greschel
          Participant

            thanks that does help little but how would i have to create a new variant if i am using the same variant for other xlates?

          • #82098
            James Cobane
            Participant

              If you don’t want to affect the outbound variant because it is used for other interfaces/Xlates, then you would have to create a new variant.  You could do some tcl in the Xlate to trim the value down:

              set xlateOutVals

                0 7]]

                This will grab the first 8-bytes of the input field and set xlateOutVals to just the first 8 characters.  However, you will want to test this as the engine may automatically fill-in the hours/minutes based on the field defintion of the variant.

                Hope this helps.

                Jim Cobane

                Henry Ford Health

              1. #82099
                teddy greschel
                Participant

                  That work just as needed thanks

                • #82100
                  Keith McLeod
                  Participant

                    If you are using 6.1, then you can use the new string command

                    string source xlateStrSubstring 0 7 to destination

                    effectively doing what James had indicated…

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