Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › iterate over multiple OBX segments
- This topic has 5 replies, 4 voices, and was last updated 15 years, 4 months ago by Mason Miller.
-
CreatorTopic
-
April 27, 2009 at 2:36 pm #50829Mason MillerParticipant
I am trying to look in each obx segment for a value in obx.11 if it is null them copy obr.5 into that field it looks like it is working upto the 6th repeating obx any ideas? attached is what I have setup
-
CreatorTopic
-
AuthorReplies
-
-
April 27, 2009 at 3:27 pm #67693Rob ParnellParticipant
You should only have the iterate at the group level not at the segment level as well
-
April 27, 2009 at 3:35 pm #67694Mason MillerParticipant
If I do that then it will only look at the first obx segment in each group. here is an example
Code:0(0).MSH(0) : >|^~&|LAB|SCC|SMH||200904270859||ORU^R01|00004384|P|2.2|||401919^^^SMMC^MR||UPGRADE^KATHY^G||19550505|F||W||||||||100324136|1|I|NTIU^^A||100324136||005538||||||||||005538|RE|159010^^1|601|E8270003|||^^^20090427^^R||200904270746|KFG||005538|||||||||^^^LAB||159010^^1|601|0414^CULT OTHER NOT LISTED^^0414|||200904270746|||KFG||||200904270746|BONE^^Bone|005538|||||^M|||MICRO|F||^^^20090427^^R|1|TX|ANAEC^CULTURE ANAEROBIC||No growth in 5 days||||||F|2|CE|MISCC^CULT OTHER NOT LISTED|1|Escherichia coli||||||F|3|CE|MISCC^CULT OTHER NOT LISTED|2|Pseudomonas aeruginosa||||||F|4|CE|MISCC^CULT OTHER NOT LISTED|3|Staphylococcus epidermidis||||||F|5|TX|MISCC^CULT OTHER NOT LISTED|3|This isolate is not MRSA||||||F|6|CE|MISCC^CULT OTHER NOT LISTED|4|Streptococcus agalactiae (Group B)||||||F|7|CE|MISCC^CULT OTHER NOT LISTED|5|Candida glabrata||||||F|2|||MIC||||||||||||||||||||||^1|1|ST|Aug^Amox/K Clav’ate|1|S|mcg/mL||S|||F|2|ST|A/S^Amp/Sulbactam|1|S|mcg/mL||S|3|ST|Am^Ampicillin|1|S|mcg/mL||S|4|ST|Azt^Aztreonam|1|S|mcg/mL||S|5|ST|Cfz^Cefazolin|1|S|mcg/mL||S|6|ST|Cpe^Cefepime|1|S|mcg/mL||S|7|ST|Cft/CA^Cefotaxime/K Clavulanate|1|S|mcg/mL||S|8|ST|Caz/CA^Ceftazidime/K Clavulanate|1|S|mcg/mL||S|9|ST|Cax^Ceftriaxone|1|S|mcg/mL||S|10|ST|Cf^Cephalothin|1|S|mcg/mL||S|11|ST|Cip^Ciprofloxacin|1|S|mcg/mL||S|12|ST|Gm^Gentamicin|1|S|mcg/mL||S|13|ST|Imp^Imipenem|1|S|mcg/mL||S|14|ST|Lvx^Levofloxacin|1|S|mcg/mL||S|15|ST|Fd^Nitrofurantoin|1|S|mcg/mL||S|16|ST|P/T^Piperacillin/Taz|1|S|mcg/mL||S|17|ST|Te^Tetracycline|1|S|mcg/mL||S|18|ST|To^Tobramycin|1|S|mcg/mL||S|19|ST|T/S^Trimeth/Sulfa|1|S|mcg/mL||S|20|ST|T^Trimethoprim|1|S|mcg/mL||S|3|||MIC||||||||||||||||||||||^2|1|ST|Aug^Amox/K Clav’ate|2|S|mcg/mL||S|||F|2|ST|A/S^Amp/Sulbactam|2|S|mcg/mL||S|3|ST|Azt^Aztreonam|2|S|mcg/mL||S|4|ST|Cpe^Cefepime|2|S|mcg/mL||S|5|ST|Cft/CA^Cefotaxime/K Clavulanate|2|S|mcg/mL||S|6|ST|Caz/CA^Ceftazidime/K Clavulanate|2|S|mcg/mL||S|7|ST|Cf^Cephalothin|2|S|mcg/mL||S|8|ST|Cip^Ciprofloxacin|2|S|mcg/mL||S|9|ST|Gm^Gentamicin|2|S|mcg/mL||S|10|ST|Imp^Imipenem|2|S|mcg/mL||S|11|ST|Lvx^Levofloxacin|2|S|mcg/mL||S|12|ST|Fd^Nitrofurantoin|2|S|mcg/mL||S|13|ST|P/T^Piperacillin/Taz|2|S|mcg/mL||S|14|ST|Te^Tetracycline|2|S|mcg/mL||S|15|ST|To^Tobramycin|2|S|mcg/mL||S|16|ST|T/S^Trimeth/Sulfa|2|S|mcg/mL||S|4|||MIC||||||||||||||||||||||^3|1|ST|Aug^Amox/K Clav’ate|3|S|mcg/mL||S|||F|2|ST|Am^Ampicillin|3|S|mcg/mL||S|3|ST|Cfz^Cefazolin|3|S|mcg/mL||S|4|ST|Cax^Ceftriaxone|3|S|mcg/mL||S|5|ST|Cp^Ciprofloxacin|3|S|mcg/mL||S|6|ST|Cd^Clindamycin|3|S|mcg/mL||S|7|ST|E^Erythromycin|3|S|mcg/mL||S|8|ST|Gm^Gentamicin|3|S|mcg/mL||S|9|ST|Fd^Nitrofurantoin|3|S|mcg/mL||S|10|ST|Ox^Oxacillin|3|S|mcg/mL||S|11|ST|Rif^Rifampin|3|S|mcg/mL||S|12|ST|Te^Tetracycline|3|S|mcg/mL||S|13|ST|T/S^Trimeth/Sulfa|3|S|mcg/mL||S|14|ST|Va^Vancomycin|3|S|mcg/mL||S|5|||MIC||||||||||||||||||||||^4|1|ST|Aug^Amox/K Clav’ate|4|S|mcg/mL||S|||F|2|ST|Am^Ampicillin|4|S|mcg/mL||S|3|ST|Azi^Azithromycin|4|S|mcg/mL||S|4|ST|Cpe^Cefepime|4|S|mcg/mL||S|5|ST|Cax^Ceftriaxone|4|S|mcg/mL||S|6|ST|C^Chloramphenicol|4|S|mcg/mL||S|7|ST|Cd^Clindamycin|4|S|mcg/mL||S|8|ST|E^Erythromycin|4|S|mcg/mL||S|9|ST|Lvx^Levofloxacin|4|S|mcg/mL||S|10|ST|Mer^Meropenem|4|S|mcg/mL||S|11|ST|P^Penicillin|4|S|mcg/mL||S|12|ST|Va^Vancomycin|4|S|mcg/mL||S|6|||MIC||||||||||||||||||||||^5|1|ST|FCY9^5-Flucytosine|5||mcg/mL||S|||F|2|ST|FZY9^Fluconazole|5||mcg/mL||S|3|ST|IZY9^Itraconazole|5||mcg/mL||S<
-
April 27, 2009 at 4:02 pm #67695Tom RiouxParticipant
Mason,
Since you have multiple OBR/OBR groupings in your message, you will need to have the group iteration variable in your OBR portion of your copy statement as well.
-
April 27, 2009 at 4:14 pm #67696Keith McLeodParticipant
I am only guessing, but if the variant shows a group at the PID level, the ORC level, and the OBX level, these are all groups.
##### PID Group begins ######
iterate with group
basis 1
variable %g1
##### ORC Group begins ######
iterate with group
basis 1(%g1).1
variable %g2
##### OBX Group begins ######
iterate with group
basis 1(%g1).1(%g2).1
variable %g3
##### OBX Group Ends ######
##### ORC Group Ends ######
##### PID Group Ends ######
With the 3 iterates above, they initialize with each repetition of their parent iterate. %g1 is based on PID iterate(most of the time just 0) %g2 is based on the ORC iterate to accomodate you repeating ORC groups and OBR segments. %g3 is based on your OBX group which usually contains an optional repeating segment NTE with each OBX. If I were to add the NTE segment it might look like:
##### OBX Group begins ######
iterate with group
basis 1(%g1).1(%g2).1
variable %g3
********** NTE Segment **********
iterate with Segment
basis 1(%g1).1(%g2).1(%g3).NTE
variable %s1
##### OBX Group Ends ######
Hope this helps……This depends on the actual variant configuration.
-
April 27, 2009 at 5:00 pm #67697Mason MillerParticipant
Thanks that worked
-
-
AuthorReplies
- The forum ‘Cloverleaf’ is closed to new topics and replies.