/**
  * Finds the Patientimage model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $hn
  * @param string $image_name
  * @return Patientimage the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($hn, $image_name)
 {
     if (($model = Patientimage::findOne(['hn' => $hn, 'image_name' => $image_name])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * Displays a single Vnstat model.
  * @param string $id
  * @return mixed
  */
 public function actionGetimage($hn)
 {
     $picture = new Patientimage();
     $myModels = $picture->findOne(['hn' => $hn]);
     return $this->renderPartial('./getimage', ['model' => $myModels]);
 }