转接方分账
This commit is contained in:
@@ -70,6 +70,12 @@ class Prescription extends \common\modelsgii\oldDb\Prescription
|
||||
return $this->hasOne(Register::class, ['id' => 'register_id']);
|
||||
}
|
||||
|
||||
//转诊记录
|
||||
public function getTransferPrescription()
|
||||
{
|
||||
return $this->hasOne(TransferPrescription::class, ['id' => 'transfer_prescription_id']);
|
||||
}
|
||||
|
||||
//导出处方
|
||||
public static function inventory($params,$store_id)
|
||||
{
|
||||
|
||||
@@ -57,6 +57,11 @@ class Register extends \common\modelsgii\oldDb\Register
|
||||
public function getPrescription(){
|
||||
return $this->hasMany(Prescription::class, ['register_id' => 'id']);
|
||||
}
|
||||
//转诊记录
|
||||
public function getTransferPrescription()
|
||||
{
|
||||
return $this->hasOne(TransferPrescription::class, ['id' => 'transfer_prescription_id']);
|
||||
}
|
||||
//健康信息
|
||||
public function getHealthInquery()
|
||||
{
|
||||
|
||||
34
common/models/oldDb/TransferPrescription.php
Normal file
34
common/models/oldDb/TransferPrescription.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user