So lately I am in work every month we have a validations check with patients. Takes days to compare last months validations with the current months:
SeptemberVal.CSV
Gender MRN Operation Consultant TCI Date ... ... ...
Male 738495 CIRC Dr Yates 05.12.13 ... ... ...
Female 247586 Cystoscopy Dr Know 10.12.13 ... ... ...
Male 617284 Biopsy Dr Yates 25.12.13 ... ... ...
OctoberVal.CSV
Gender MRN Operation Consultant TCI Date ... ... ...
Male 491854 Biopsy Dr Yates 05.12.13 ... ... ...
Female 247586 Cystoscopy Dr Know 10.12.13 ... ... ...
Female 285769 Biopsy Dr Yates 25.12.13 ... ... ...
... ... ... ... ... ... ... ...
Output.csv
Gender MRN Operation Consultant TCI Date ... ... ...
Female 247586 Cystoscopy Dr Know 10.12.13 ... ... ...
... ... ... ... ... ... ... ...
I want to create a perl script which compares the "MRN"s column of both SeptermberVal.csv and "OctoberVal.csv" and then once it finds a match I want it to copy the entire row of the match from SeptemberVal.CSV and paste it into a new file.
There could be 800 patients per validation form and many can follow on from the previous month so say next month I have 900 patients to validate 400 might be on the previous form and the rest are new.
Is this possible with Perl, if so how would I go about it? I would be grateful if anyone had any example code of how to do this. I want to pick up Perl in the long run as it is used widely in working communities.