I have a script that has works just fine, but my issue is with a regular expression. The script reads in a parameters file where any number of regexes specify which HL7 transactions qualify for extraction from an archive file. Each complete transaction is contained in a string, then the regexes are applied, and if all are true, the transaction is extracted. Each transaction is compose of "segments" each with their own identifier. Each segment contains several fields, components, subcomponents, etc.
Sample transaction with patient info (the PID stuff) removed:
I need any Patient Transfers (identified by the ADT^A02) where the previous location (field 6 in segment PV1) is missing.
The first condition is
and it works fine.
The issue is finding empty PV1-6 fields. I think that condition is
However, I am getting transactions where field 6 is valued.
So what am I getting wrong?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||