- This topic has 8 replies, 3 voices, and was last updated 14 years, 9 months ago by .
-
Topic
-
I am xlating some ORU’s into a vrl’s, and need to extract some data from the OBX’s. Here is a sample of the data OBX|12|TX|SC09-41401$rpt^^99DHT||SOURCE: Screening
Vaginal/Cervical/Endocervical Thin Prep Pap with Imaging||||||F
OBX|13|TX|SC09-41401$rpt^^99DHT||||||||F
What I am trying to do is split the message into a list of OBX’s, and then split that into a list of OBX 5’s. My plan is to run a regexp on SOURCE:, and run a lrange to the next blank OBX 5, to isloate the source data. I have a proc that creates a list of OBX’s, but can’t seem to get it to further split that into OBX 5’s. Here is the guts of the proc so far
set msg [msgget $mh]
set fieldSep [string index $msg 3]
set segmentList [split $msg r]
set obx [lrange [lregexp $segmentList {^OBX}] 0 end]
foreach field $obx {
set field [lindex [split $obx $fieldSep] 4]}
- The forum ‘Cloverleaf’ is closed to new topics and replies.