Skip to content

Commit

Permalink
fix: Check if we have recorded no allergies (#6761)
Browse files Browse the repository at this point in the history
Resolves #6759
  • Loading branch information
robertdown committed Aug 17, 2023
1 parent 13e7958 commit 9f28aa8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions interface/patient_file/summary/demographics.php
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,8 @@ function filterActiveIssues(array $i): array
$_standard[] = $_;
}
}
$sql = "SELECT COUNT(*) as touched FROM lists_touch WHERE pid = ? AND type = 'allergy'";
$result = sqlQuery($sql, [$pid]);

$viewArgs = [
'title' => xl('Allergies'),
Expand All @@ -1087,6 +1089,7 @@ function filterActiveIssues(array $i): array
'forceAlwaysOpen' => false,
'linkMethod' => "javascript",
'list' => ['priority' => $_priority, 'standard' => $_standard],
'listTouched' => ($result['touched'] > 0) ? true : false,
'auth' => true,
'btnLabel' => 'Edit',
'btnLink' => "return load_location('{$GLOBALS['webroot']}/interface/patient_file/summary/stats_full.php?active=all&category=allergy')"
Expand Down

0 comments on commit 9f28aa8

Please sign in to comment.