35 lines
802 B
PHP
35 lines
802 B
PHP
<?php
|
|
|
|
namespace common\models\oldDb;
|
|
|
|
/**
|
|
* 转诊记录模型
|
|
* 存储西医诊所开具的中药处方转诊信息
|
|
*/
|
|
class TransferPrescription extends \common\modelsgii\oldDb\TransferPrescription
|
|
{
|
|
/**
|
|
* 关联原处方
|
|
*/
|
|
public function getOriginalPrescription()
|
|
{
|
|
return $this->hasOne(Prescription::class, ['id' => 'original_prescription_id']);
|
|
}
|
|
|
|
/**
|
|
* 关联转诊诊所(西医诊所)
|
|
*/
|
|
public function getTransferStore()
|
|
{
|
|
return $this->hasOne(Store::class, ['id' => 'transfer_store_id']);
|
|
}
|
|
|
|
/**
|
|
* 关联委托诊所(中医诊所)
|
|
*/
|
|
public function getDelegateStore()
|
|
{
|
|
return $this->hasOne(Store::class, ['id' => 'delegate_store_id']);
|
|
}
|
|
}
|