Selecting HL7 Transactionsby BillDowns (Novice)
|on May 01, 2013 at 20:12 UTC||Need Help??|
BillDowns has asked for the
wisdom of the Perl Monks concerning the following question:
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
The issue is finding empty PV1-6 fields. I think that condition is
So what am I getting wrong?