OEModule\OphCiExamination\models\Element_OphCiExamination_OCT::getFluidString PHP Method

getFluidString() protected method

returns the appropriate string for displaying the fluid finding value(s) for the given side.
protected getFluidString ( string $side, boolean $notrecorded = true ) : string
$side string left or right
$notrecorded boolean - flag to indicate whether we want a string for it not being recorded
return string
    protected function getFluidString($side, $notrecorded = true)
    {
        // we check that dry is not null here, because if it is then it indicates the OCT
        // was recorded prior to the introduction of the fluid fields
        if ($this->{'has' . ucfirst($side)}() && $this->{$side . '_dry'} !== null) {
            if ($this->{$side . '_dry'}) {
                return 'Dry';
            } else {
                $fts = array();
                foreach ($this->{$side . '_fluidtypes'} as $ft) {
                    $fts[] = $ft->name;
                }
                return $this->{$side . '_fluidstatus'}->name . ' ' . implode(', ', $fts);
            }
        } else {
            return 'Not recorded';
        }
    }