OEModule\OphCiExamination\components\OphCiExamination_API::getLetterHistory PHP Method

getLetterHistory() public method

Get the patient history for the given episode. This is from the most recent examination that has an history element.
public getLetterHistory ( Patient $patient ) : string
$patient Patient
return string
    public function getLetterHistory($patient)
    {
        if ($episode = $patient->getEpisodeForCurrentSubspecialty()) {
            if ($history = $this->getElementForLatestEventInEpisode($episode, 'models\\Element_OphCiExamination_History')) {
                return strtolower($history->description);
            }
        }
    }
OphCiExamination_API