in reply to Selecting HL7 Transactions
G'day BillDowns,
You have a number of issues here. I've included a fair amount of detail below but refer to perlre for the full story.
Putting all that together, you end up with a few options. Minimal changes would give: "/^PV1\|1\|O\|(?:[^|]*\|){3}\|/".
Having said all that, I'm wondering if splitting the lines on pipe characters might just be a whole lot easier in terms of general readability and future maintenance. Something along these lines:
my @fields = split /[|]/ => $line; ... if ($fields[0] eq 'MSH' and $fields[8] eq 'ADT^A02') { ... } ... if ($fields[0] eq 'PV1' and $fields[6] eq '') { ... } ...
-- Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Selecting HL7 Transactions
by BillDowns (Novice) on May 01, 2013 at 23:22 UTC | |
by kcott (Archbishop) on May 02, 2013 at 00:20 UTC | |
by BillDowns (Novice) on May 02, 2013 at 01:02 UTC | |
by kcott (Archbishop) on May 02, 2013 at 02:41 UTC | |
by BillDowns (Novice) on May 02, 2013 at 03:07 UTC | |
| |
by Anonymous Monk on May 02, 2013 at 00:46 UTC | |
by BillDowns (Novice) on May 02, 2013 at 00:48 UTC |