fixed import script so it creates the visit data properly
authorOwen Leonard <owen@balawis.leonard.fam>
Thu, 21 Oct 2010 18:04:37 +0000 (12:04 -0600)
committerOwen Leonard <owen@balawis.leonard.fam>
Thu, 21 Oct 2010 18:04:37 +0000 (12:04 -0600)
bin/import_ward_data

index e0fbb2be93f6caa26e4ccbfea87205d9c761b484..57d450fc976cd504d0f6f6f808a5e139a7545d87 100755 (executable)
@@ -596,7 +596,7 @@ sub update_tc_visit_table
                        my $importing_status = $visit_status{$history[$i]};
                        #print "importing_status = $importing_status\n";
                        #print "select * from tc_visit where family=$family_id and companionship=$comp_id and date='$visit_date'\n";
-                       $sth = $dbh->prepare("select * from tc_visit where family=$family_id and companionship=$comp_id and date='$visit_date'");
+                       $sth = $dbh->prepare("select * from tc_visit where family=$family_id and date='$visit_date'");
                        $sth->execute or die "-E- DB error: $DBI::errstr\n";
                        my @visit_data = ();
                        while($sqlhashref = $sth->fetchrow_hashref) { push(@visit_data, $sqlhashref); }