create multiple OBX from one OBX partitioned with ~

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf create multiple OBX from one OBX partitioned with ~

  • Creator
  • #51138
    amrik dhillon

    We have lab results that send all the multiple values in one OBX in field 5 with tilde delimeter for each value.  We need to create a separate OBX for each tilde delimited value.  For example

    OBX|1|tx|aerc^culture,aerobic|1|Specimen description   Nose~Gram Smear 1+ PMN’S~ culture heavy growth staphylococcus aureus~||||||I||2009082107||

    Instead have:

    OBX|1|tx|aerc^culture,aerobic|1|Specimen description   Nose||||||I||2009082107||

    OBX|2|tx|aerc^culture,aerobic|1|Gram Smear 1+ PMN’S||||||I||2009082107||

    OBX|3|tx|aerc^culture,aerobic|1|culture heavy growth staphylococcus aureus~||||||I||2009082107||

Viewing 4 reply threads
  • Author
    • #68910
      Jim Kosloskey


      If you have repeating OBR Group you will need to ITERATE over that group.

      Then inside the OBR ITERATE (assuming multiple OBR Group) ITERATE over the repeating OBX Group.

      If you do not have repeating OBR Group, then just ITERATE over the OBX Group.

      Inside of the OBX Group ITERATE, iterate over the OBX-5 field (it is a repeating field).

      Now you will need to maintain your own OUTBOUND or DESTINATION repetition counter for the OBX groups you are creating (since the number of OBX Groups you have coming in will not be the same as the number of the OBX groups going out, the inbound OBX Group Counter will not be useful).

      You can use the MATH Action to ADD 1 to your counter (I like to use %g99 but you can use any numeric value that is not already in use) in order to increment it. You will need to increment the counter by one for each repetition of the OBX-5 field.

      You use your counter in the COPY (or whatever) Actions building the Outbound OBX Group address path for each field at the appropriate point.

      The above is assuming Xlate is in use.

      If you have questions, email me directly and I will assist.


    • #68911
      amrik dhillon

      Thanks Jim. I am getting errors. I have sent you an email. Thanks.

    • #68912
      Nora Katz

      Is there a way to do the same thing, but my OBX segment is not repeating and there is .br between each segment.

      OBX|11|TX|MGFRB^GFR (African American)|2|   .brAverage GFR for 40-49 yr: 99.brChronic kidney disease:  <60.brKidney failure:          59^WOL1||||F||NNNNN|20090706160300|C|10077|

    • #68913
      Nora Katz

      I meant my OBX.5 field is not repeating.  

      Or is it inherently repeating?

    • #68914
      Jim Kosloskey


      No it won’t work because I am sure .br is not in your MSH-2 field as the field repetition separator.

      However, you can deploy a pre-Xlate proc to change the .br escape sequence to the field repetition separator in MSH-2 (normally a tilde ~).

      Then you can use field repetition to handle the OBX-5 field.


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

Forum Statistics

Registered Users
Topic Tags