HL7 and Xlate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HL7 and Xlate

  • Creator
    Topic
  • #47794
    garry r fisher
    Participant

      Hi,

      I’ve got an HL7 message and I’m trying to extract a field 4 in the QRF message:

      .QRF||||SEX^~DOB^||||

      I’m doing this is an xlate copying into a temporary variable. I’m then want to split the field on the ~ and check for a SEX code or DOB after each ^. Unfortunately when I use a xlate Tcl to read the temporary value all I get is SEX (no silly comments please). I’m using xlateInVals, should I use xlateInList or am I doing something wrong in trying to parse HL7 this way.

      Thanks

      Garry

    Viewing 2 reply threads
    • Author
      Replies
      • #56736
        Daniel Lee
        Participant

          I’m not sure what your groups look like for your xlate but you’re going to have to reference the second itteration of that field.  The ~ represents a repeating field and since the DOB is in the second iteration you’ll have to reference the second iteration in your xlate.

          Like I said, I’m not sure what your varient looks like but it would be something like this:

          0(0).QRF.00098(1)

          (in your source just put the (1) after the field numbers to reference the second iteration of that field)

        • #56737
          David Caragay
          Participant

            Check your temp variable copy first.

          • #56738
            garry r fisher
            Participant

              Hi,

              I’ll give those suggestions a go on Monday. You are correct there are no subfields defined – that is why I thought a simple copy would suffice.

              Enjoy your weekend.

              Regards

              Garry

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