/** * @return \yii\db\ActiveQuery */ public function getPatientDoctor() { return $this->hasOne(Doctor::className(), ['doctor_id' => 'patient_doctor']); }