public function actionCreate($patientId)
 {
     $patient = Patient::model()->findByPk($patientId);
     $model = new MedicalRecord();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['MedicalRecord'])) {
         $model->attributes = $_POST['MedicalRecord'];
         if ($model->save()) {
             Yii::app()->user->setFlash('success', '儲存成功.');
             $this->redirect($this->createUrl('/patient/update/', array('id' => $patient->id)));
         }
     }
     $this->render('create', array('patient' => $patient, 'model' => $model));
 }