splitting OBX message and moving the split message into NTE

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf splitting OBX message and moving the split message into NTE

  • Creator
    Topic
  • #50930
    Bala Pisupati
    Participant

    I have a situation where i have obx like

    OBX|2|NM|INR^INR VALUE||1.00     THERAPEUTIC: (FOR STABLE ORALLY ANTICOAGULATED   PATIENTS)          2.0-3.0 DVT/PE/MI/TIS/HT VAL/VAL HT DIS/ATR   FIB  2.5-3.5 CARDIO EMBOLUS/MECH HT VAL||(0.9-1.1)||||||

    if obx-5 has non numeric value like

    1.00     THERAPEUTIC: (FOR STABLE ORALLY ANTICOAGULATED   PATIENTS)          2.0-3.0 DVT/PE/MI/TIS/HT VAL/VAL HT DIS/ATR   FIB  2.5-3.5 CARDIO EMBOLUS/MECH HT VAL

    then I need have

    obx-5 as 1.00 and the rest of the text in NTE.

    Any ideas.

Viewing 8 reply threads
  • Author
    Replies
    • #68050
      Robert Kersemakers
      Participant

      Try

      Copy OBX.5 -> @numeric @rest

      with this tcl:

      Code:

      lassign $xlateInVals field
      set first_space [string first ” ” $field]
      set number [string range $field 0 [expr $first_space – 1]]
      set txt [string range $field $first_space end]
      set xlateOutVals [list $number $txt]

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #68051
      Bala Pisupati
      Participant

      Thanks for the info Robert,

      when I did that none of the values are coming into OBX5

      1(0).1(0).1(0).OBX(0)

    • #68052
      Bala Pisupati
      Participant

      Thanks again Robert

      I changed the code a little bit and i was able to seperate the number from the text. Thanks a lot.

    • #68053
      Bala Pisupati
      Participant

      Robert

      Can you tell me how I can handle this if i have repeating values i OBX5 field.

      Ex:

      85    The MDRD equation for estimation of GFR (eGFR) was^ ~ developed in apopulation of adults (>19 yrs old)^ ~ with slowly declining or stablereduced kidney^ ~ function.  The MDRD equation has not been validated^ ~ inpatients >70 years of age and should not be used^ ~ to predict eGFR inunstable patients or children.

    • #68054
      Robert Kersemakers
      Participant

      This is a very weird repeating field… Repeating field separator is a ‘~’ if I’m correct, and here it looks like you have ‘^ ~’.

      I would remove the ‘^ ~’ from the remaining text as it has no purpose in the NTE-field. You need just one extra regsub in the code to replace the ‘^~’ by a space:

      Code:

      lassign $xlateInVals field
      set first_space [string first ” ” $field]
      set number [string range $field 0 [expr $first_space – 1]]
      set txt [string range $field $first_space end]
      regsub -all {^ ~} $txt ” ” txt
      set xlateOutVals [list $number $txt]

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #68055
      Abe Rastkar
      Participant

      Bala,

      It looks like they used the tilde character, ~, instead of a line break. Replace them with a line break.

    • #68056
      Jim Kosloskey
      Participant

      Bala,

      Th answer depends on the value of OBX-2. If that has a data type that has components in its structure, then each repetition is a 2 component field.

      In this case, the second component is not populated but the separator is in place (the ^). This is fairly common for some systems.

      So in your Xlate inside the ITERATE on the OBX-5 field, you need to reference the field with component notation  eg: 1(0).0(0).OBX.#5(%fxx).[0] <– This s acontrived example %fxx would be your field repeition counter assigned in the OBX-5 ITERATE. The key here is the .[0] at the end of the notation which refers to the first component of the field.

      If they also populated the second component then to address it you would use 1(0).0(0).OBX.#5(%fxx).[1].

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

    • #68057
      Bala Pisupati
      Participant

      Thanks for the responses let me try and see which one works.

    • #68058
      Bala Pisupati
      Participant

      I used suggesting from Jim’s method, since I know how many times the field is going to repeat i captured it and concatinated it to NTE.

      This is not as clean as it should be but it works. If any one has any other suggestions please do post it.

      Thanks

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

Forum Statistics

Registered Users
5,126
Forums
28
Topics
9,295
Replies
34,439
Topic Tags
287
Empty Topic Tags
10