MATH problem

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf MATH problem

  • Creator
    Topic
  • #51971
    Mark Perschbacher
    Participant

      MATH was never my best subject, just a little joke.  I have an xlate I’ve been struggling with, and thought I’d throw it out to the experts.  I have an ORU that has both OBX and NTE segments, and I’m trying to covert it to just NTE.  Here is a sample of what I have to work with

      1(0).1(0).1(0).OBX(0)  :  >|||^DIAGNOSIS:< 1(0).1(0).1(0).NTE(0)  :  >|||Epithelial Cell Abnormality.< 1(0).1(0).1(0).NTE(1)  :  >|||Atypical squamous cells of undetermined significance.< 1(0).1(0).1(1).OBX(0)  :  >|||^Recommendation:< 1(0).1(0).1(1).NTE(0)  :  >|||Suggest follow up as clincally appropriate.< 1(0).1(0).1(2).OBX(0)  :  >|||^Specimen adequacy:< 1(0).1(0).1(2).NTE(0)  :  >|||Satisfactory for evaluation. Endocervical and/or squamous< 1(0).1(0).1(2).NTE(1)  :  >|||metaplastic cells (endocervical component) are present.< 1(0).1(0).1(3).OBX(0)  :  >|||^Clinician provided ICD9:< 1(0).1(0).1(3).NTE(0)  :  >|||627.7< 1(0).1(0).1(3).NTE(1)  :  >|||v01.6; Contact with or exposure to venereal disease.< 1(0).1(0).1(4).OBX(0)  :  >|||^Performed by:< 1(0).1(0).1(4).NTE(0)  :  >|||CoPath testing Pathologist/Cytotech< 1(0).1(0).1(5).OBX(0)  :  >|||^Electronically signed by:< 1(0).1(0).1(5).NTE(0)  :  >|||Test Cytotech CoPath< 1(0).1(0).1(6).OBX(0)  :  >|||^Pathologist provided ICD9:< 1(0).1(0).1(6).NTE(0)  :  >|||795.01< All I’m doing at this point is COPY the iterations of the OBX groups and NTE segments.  The only way I can figure to retain this data format in NTE would be to configure a MATH action to add one to the NTE iteration, and then COPY the OBX to the new first NTE iteration.  Does this seem like a reasonable approach, and does anyone know how this would be managed?

    Viewing 1 reply thread
    • Author
      Replies
      • #72548
        Robert Milfajt
        Participant

          Here is pseudo code that should get you what you want.

          Code:


          Set a variable %x1 to 0 using COPY
          Iterate over the group 1(0).1(0).1 with %g1
            Copy 1(0).1(0).1(%g1).OBX(0).#5 to your new NTE(%x1)
            Increment %x1
            Iterate over 1(0).1(0).1(%g1).NTE with %s1
               Copy 1(0).1(0).1(%g1).NTE(%s1).#3 to your new NTE(%x1)
               Increment %x1

          Hope this helps,

          Robert Milfajt
          Northwestern Medicine
          Chicago, IL

        • #72549
          Mark Perschbacher
          Participant

            Thanks Robert, Jim the whizz Koslowski helped me work through it.  I ended up using MATH ADD =1 $%s99 to $%s99 for both the group and segement iterate.  The trick was zero ing out %s99, and on the segement interate, useing the engine counter, %s1 on the source, and my counter %s99 on the desination.  Here is a screen shot

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