#!/usr/bin/perl
print "reading 'ansvarig_vardenhet_utf8.txt'\n";
open(WIN, "icd-10-codes.txt");
while($line = <WIN>) {
@columns = split(/\t/, $line);
#print "$columns[1]";
foreach my $value (@columns) {
#print "$value\n"
}
}
close(WIN);
print "reading 'ansvarig_vardenhet_utf8.txt'\n";
open(IN, "female1.txt");
while($line = <IN>) {
%col = split(/ /, $line);
#print "$columns[1]\n";
foreach my $val (%col) {
if($val == $columns[0]){
$val =~ s/$val/$columns[1]/g;
print IN ">>$val\n";
}
}
}
close(IN);
file samples
ICD.codes-text
z988 Z98.8 - Andra specificerade postoperativa tillstånd
z99 Z99 - Beroende av maskinella och andra hjälpmedel som ej klassi
+ficeras annorstädes
z990 Z99.0 - Beroende av aspirationshjälpmedel
z991 Z99.1 - Beroende av respirator
z992 Z99.2 - Beroende av njurdialys
w0609 W06.09 - Fall från säng-bostad-ospec aktiviteter
z993 Z99.3 - Beroende av rullstol
z998 Z99.8 - Beroende av annan specificerad utrustning och andra sp
+ecificerade hjälpmedel
z999 Z99.9 - Beroende av icke specificerade maskinella och andra hj
+älpmedel
female1.txt
patient has been admitted to the hospital for having infection on the
+recently operated right leg.
w0609
w0609
w0609
w0609
w0609
w0609
I hope i have changed it as required. If not please let me know i will try to change further. thanks for your time and effort to help me correct my problems. Thanks for your help in advance |