in reply to Re: filehandles and such
in thread filehandles and such
Clearer Explanation (I hope):
Given:
a hash table with %procedure, %specimen, %site
A text file containing medical reports (one report per line) which contain mulitple procedures or specimens
Write a perl program that does the following:
read in one line at a time, find all procedures and associated site and specimen
if found, give it a code (for now just the words)
if nothing found on the line, print the line to a different place to keep track off what lines are not being processed
go to next line
there may be more than one procedure or specimen per line
there is a problem in interpeting some data because these words can appear in different order, usage, context (this is an aside)
a simple way to look for multiple entries at this time is matching for 1) or a) or a: or 1: , can be any number or letter really
weekly reports are generated, and i took an educated guess about the types of words found and how they occur in these reports
i want to put these three simple concepts together to create codes, these codes are commonly occurring groups of words which represent some concept
if this program works correctly, it should identify the type of sample, and disregard "junk"
if someone comes in asks do you have thus and such, i want to say thus and such (pun intended)
sorry about the long winded explanation, i am having trouble even writing a basic program which works
additional complexity will come in trying to match for terms and looking for effective strategies to identify in what order things could appear
at present, i would just be happy with something that spits out at least the first occurence of the sample with the basic info
thanks again for your assistance, your code seemed a little easier to follow than what i copied from someone else and did not fully understand