KoolReport 3.25.4.
Beside chart- and table-based data analysis, for some evaluations I also deliver error lists which denote important data missing ("missing values") for various reasons (the reasons usually are coded as numbers (error codes)).
Such a list may look like this:
The green arrow denotes the patient ID column.
How can I make each patient ID hyperlinked (so that once clicking on such an ID a window with this patient's specific data is opened and her / his data can be replaced or substituted)?
Does my error list have to include a calculation for instance in the following way:
[...]
->pipe(new CalculatedColumn(array(
"PatientID"=>array(
"label"=>"PatientID",
"exp"=>function($row)
{
$link = "../site.php?patientID=" . $row['PatientID'];
$row['PatientID'] = "<a target=\"_parent\" href=\"{$link}\">";
return $row['PatientID'];
},
"type"=>"string"
),
"surgeryDuration"=>array(
"label"=>"OP-Dauer",
"exp"=>function($row)
{
if ($row["surgeryDuration"] == 1000)
{
$row["surgeryDuration"] = "Noch nicht dokumentiert";
return $row["surgeryDuration"];
}
else
{
return $row["surgeryDuration"]."-".($row["surgeryDuration"]+15);
}
},
"type"=>"string"
))))
[...]
However, the code ...
$link = "../site.php?patientID=" . $row['PatientID'];
$row['PatientID'] = "<a target=\"_parent\" href=\"{$link}\">";
return $row['PatientID'];
... only leads to the following result (irrelevant of whether "type" is set to "string" or "number"):
So, maybe it is only a question of how to set the single or double quotes?