public function getLetterStringForModel($patient, $episode, $element_type_id)
{
if (!($element_type = \ElementType::model()->findByPk($element_type_id))) {
throw new Exception("Unknown element type: {$element_type_id}");
}
if ($element = $this->getElementForLatestEventInEpisode($episode, $element_type->class_name)) {
return $element->letter_string;
}
}