|
@@ -418,6 +418,8 @@ class Application extends Base
|
|
|
$application_info['phone'] = $param['phone']?? '';
|
|
|
$application_info['remote_doctor_id'] = $remote_doctor_id;
|
|
|
$application_info['attachment'] = isset($param['attachment']) ? $param['attachment'] : '';
|
|
|
+ $application_info['sid'] = isset($param['sid']) ? $param['sid'] : null;
|
|
|
+ $application_info['scid'] = isset($param['scid']) ? $param['scid'] : null;
|
|
|
// $remote_application = DB::table('remote_application')->where('exam_id',$param['id'])->select();
|
|
|
// 申请远程
|
|
|
// if(empty($remote_application)){
|
|
@@ -452,6 +454,7 @@ class Application extends Base
|
|
|
// $r = DB::table('remote_application')->where('exam_id',$param['id'])->field('id')->find();
|
|
|
// $aid = $r['id'];
|
|
|
// }
|
|
|
+
|
|
|
if(isset($param['apply']) && !empty($param['apply'])){
|
|
|
$institution_id = $doctor['institution_id'];
|
|
|
$lower_hospital = DB::table('institution')->where('id', $institution_id)->field('is_pay')->find();
|
|
@@ -465,6 +468,8 @@ class Application extends Base
|
|
|
$is_urgent = $application['is_urgent'];
|
|
|
$local_institution_id = $application['local_institution_id'];
|
|
|
$req_doctor_id = $application['req_doctor_id'];
|
|
|
+ $sid = $application['sid'];
|
|
|
+ $scid = $application['scid'];
|
|
|
if(empty($remote_institution_id)) {
|
|
|
return json_encode(['status'=>'fail','code'=>'2012','msg'=> '远程机构id为空']);
|
|
|
}
|
|
@@ -477,7 +482,12 @@ class Application extends Base
|
|
|
if(empty($req_doctor_id)) {
|
|
|
return json_encode(['status'=>'fail','code'=>'2015','msg'=> '本地医生id为空']);
|
|
|
}
|
|
|
- if($is_pay === 1) {
|
|
|
+
|
|
|
+ if(!empty($sid) && empty($scid)) {
|
|
|
+ return json_encode(['status'=>'fail','code'=>'2016','msg'=> '请选择问诊医生']);
|
|
|
+ }
|
|
|
+
|
|
|
+ if($is_pay === 1 && empty($sid)) {
|
|
|
$cost = DB::table('remote_cost')
|
|
|
->where('hospital_id', $local_institution_id)
|
|
|
->where('super_hospital_id', $remote_institution_id)
|