public function actionViewPreviousElements($element_type_id, $patient_id)
{
$element_type = ElementType::model()->findByPk($element_type_id);
if (!$element_type) {
throw new CHttpException(404, 'Unknown ElementType');
}
$this->patient = Patient::model()->findByPk($patient_id);
if (!$this->patient) {
throw new CHttpException(404, 'Unknown Patient');
}
// Clear script requirements as all the base css and js will already be on the page
Yii::app()->assetManager->reset();
$this->episode = $this->getEpisode();
$elements = $this->episode->getElementsOfType($element_type);
$this->renderPartial('_previous', array('elements' => $elements), false, true);
}