OEModule\OphCiExamination\components\OphCiExamination_API::getPrincipalCCT PHP Метод

getPrincipalCCT() публичный Метод

get principal eye CCT values for current episode, examination event.
public getPrincipalCCT ( $patient ) : string
$patient
Результат string
    public function getPrincipalCCT($patient)
    {
        if ($episode = $patient->getEpisodeForCurrentSubspecialty()) {
            $str = '';
            if (!isset($episode->eye->name)) {
                return;
            }
            $eyeName = $episode->eye->name;
            if ($el = $this->getMostRecentElementInEpisode($episode->id, $this->getEventType()->id, 'OEModule\\OphCiExamination\\models\\Element_OphCiExamination_AnteriorSegment_CCT')) {
                if (isset($el->left_value) && ($eyeName == 'Left' || $eyeName == 'Both')) {
                    $str = $str . 'Left Eye: ' . $el->left_value . ' µm using ' . $el->left_method->name . '. ';
                }
                if (isset($el->right_value) && ($eyeName == 'Right' || $eyeName == 'Both')) {
                    $str = $str . 'Right Eye: ' . $el->right_value . ' µm using ' . $el->right_method->name . '. ';
                }
            }
            return $str;
        }
    }
OphCiExamination_API