OEModule\OphCoCvi\models\Element_OphCoCvi_Demographics::getCompleteName PHP Method

getCompleteName() public method

Use the stored values to make a decent stab at putting together the patient name in its normalised form.
public getCompleteName ( ) : string
return string
    public function getCompleteName()
    {
        $name = array();
        if ($this->other_names) {
            $name[] = $this->other_names;
        }
        if ($parts = explode(' ', $this->title_surname, 2)) {
            if (count($parts) == 1) {
                $name[] = $parts[0];
            } else {
                array_unshift($name, $parts[0]);
                $name[] = $parts[1];
            }
        }
        return implode(' ', $name);
    }