Skip to content

Commit

Permalink
incorrect column name for DOB (#996)
Browse files Browse the repository at this point in the history
dob>DOB for everything for full consistency
  • Loading branch information
aethelwulffe authored Apr 4, 2018
1 parent a6d3887 commit 276e4fe
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions modules/util_dupecheck/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
if (! isset($parameters['limit'])) { $parameters['limit'] = 100; }

if (! isset($parameters['match_name']) &&
! isset($parameters['match_dob']) &&
! isset($parameters['match_DOB']) &&
! isset($parameters['match_sex']) &&
! isset($parameters['match_ssn']))
{
$parameters['match_name'] = 'on';
$parameters['match_dob'] = 'on';
$parameters['match_DOB'] = 'on';
}

$oemrdb = $GLOBALS['dbh'];
Expand Down Expand Up @@ -67,8 +67,8 @@
Matching criteria:
<input type="checkbox" name="match_name" id="match_name" <?php if ($parameters['match_name']) echo "CHECKED"; ?>>
<label for="match_name">Name</label>
<input type="checkbox" name="match_dob" id="match_dob" <?php if ($parameters['match_dob']) echo "CHECKED"; ?>>
<label for="match_dob">DOB</label>
<input type="checkbox" name="match_DOB" id="match_DOB" <?php if ($parameters['match_DOB']) echo "CHECKED"; ?>>
<label for="match_DOB">DOB</label>
<input type="checkbox" name="match_sex" id="match_sex" <?php if ($parameters['match_sex']) echo "CHECKED"; ?>>
<label for="match_sex">Gender</label>
<input type="checkbox" name="match_ssn" id="match_ssn" <?php if ($parameters['match_ssn']) echo "CHECKED"; ?>>
Expand All @@ -77,8 +77,8 @@
Order results by:
<input type='radio' name='sortby' value='name' id="name" <?php if ($parameters['sortby']=='name') echo "CHECKED"; ?>>
<label for="name">Name</label>
<input type='radio' name='sortby' value='dob' id="dob" <?php if ($parameters['sortby']=='dob') echo "CHECKED"; ?>>
<label for="dob">DOB</label>
<input type='radio' name='sortby' value='DOB' id="DOB" <?php if ($parameters['sortby']=='DOB') echo "CHECKED"; ?>>
<label for="DOB">DOB</label>
<input type='radio' name='sortby' value='sex' id="sex" <?php if ($parameters['sortby']=='sex') echo "CHECKED"; ?>>
<label for="sex">Gender</label>
<input type='radio' name='sortby' value='ssn' id="ssn" <?php if ($parameters['sortby']=='ssn') echo "CHECKED"; ?>>
Expand All @@ -99,10 +99,10 @@
$dupecount = 0;

// for EACH patient in LibreHealth EHR find potential matches
$sqlstmt = "select id, pid, fname, lname, dob, sex, ss from patient_data";
$sqlstmt = "select id, pid, fname, lname, DOB, sex, ss from patient_data";
switch ($parameters['sortby']) {
case 'dob':
$orderby = " ORDER BY dob";
case 'DOB':
$orderby = " ORDER BY DOB";
break;
case 'sex':
$orderby = " ORDER BY sex";
Expand All @@ -125,7 +125,7 @@

if ($dupelist[$row['id']] == 1) continue;

$sqlstmt = "select id, pid, fname, lname, dob, sex, ss ".
$sqlstmt = "select id, pid, fname, lname, DOB, sex, ss ".
" from patient_data where ";
$sqland = "";
if ($parameters['match_name']) {
Expand All @@ -141,8 +141,8 @@
$sqlstmt .= $sqland . " ss='".$row['ss']."'";
$sqland = " AND ";
}
if ($parameters['match_dob']) {
$sqlstmt .= $sqland . " dob='".$row['dob']."'";
if ($parameters['match_DOB']) {
$sqlstmt .= $sqland . " DOB='".$row['DOB']."'";
$sqland = " AND ";
}
$mResults = sqlStatement($sqlstmt);
Expand All @@ -156,7 +156,7 @@

echo "<tr class='onerow' id='".$row['id']."' oemrid='".$row['id']."' dupecount='".$dupecount."' title='Merge duplicates into this record'>";
echo "<td>".$row['lname'].", ".$row['fname']."</td>";
echo "<td>".$row['dob']."</td>";
echo "<td>".$row['DOB']."</td>";
echo "<td>".$row['sex']."</td>";
echo "<td>".$row['ss']."</td>";
echo "<td><input type='button' value=' ? ' class='moreinfo' oemrid='".$row['pid']."' title='More info'></td>";
Expand All @@ -166,7 +166,7 @@
if ($row['id'] == $mrow['id']) continue;
echo "<tr class='onerow' id='".$mrow['id']."' oemrid='".$mrow['id']."' dupecount='".$dupecount."' title='Merge duplicates into this record'>";
echo "<td>".$mrow['lname'].", ".$mrow['fname']."</td>";
echo "<td>".$mrow['dob']."</td>";
echo "<td>".$mrow['DOB']."</td>";
echo "<td>".$mrow['sex']."</td>";
echo "<td>".$mrow['ss']."</td>";
echo "<td><input type='button' value=' ? ' class='moreinfo' oemrid='".$mrow['pid']."' title='More info'></td>";
Expand Down

0 comments on commit 276e4fe

Please sign in to comment.