public getCCTAbbr ( Patient $patient ) : string | null; | ||
$patient | Patient | |
return | string | null; |
public function getCCTAbbr(\Patient $patient)
{
if (($episode = $patient->getEpisodeForCurrentSubspecialty()) && ($cct = $this->getMostRecentElementInEpisode($episode->id, $this->getEventType()->id, 'OEModule\\OphCiExamination\\models\\Element_OphCiExamination_AnteriorSegment_CCT'))) {
$readings = array();
if ($cct->hasRight()) {
$readings[] = 'r:' . $cct->right_value;
}
if ($cct->hasLeft()) {
$readings[] = 'l:' . $cct->left_value;
}
return implode(', ', $readings);
} else {
return;
}
}