|
|
|
|
@ -272,11 +272,11 @@ public function CancelSignIn(){
|
|
|
|
|
public function SignInOnPacs(){
|
|
|
|
|
$orderNo = request('orderNo');//医嘱号
|
|
|
|
|
$checkNo = request('checkNo');//报道号(检查号)
|
|
|
|
|
if(!isset($orderNo)) return \Yz::JsonError('医嘱号不能为空');
|
|
|
|
|
if(!isset($checkNo)) return \Yz::JsonError('报道号不能为空');
|
|
|
|
|
if(!isset($orderNo)) return \Yz::JsonReturn(true, '成功', ['warn' => '医嘱号不能为空']);
|
|
|
|
|
if(!isset($checkNo)) return \Yz::JsonReturn(true, '成功', ['warn' => '报道号不能为空']);
|
|
|
|
|
$entrust = DB::table('s_list')->where(['entrust_id' => $orderNo,'is_nullify'=>0,'is_del'=>0])->first();
|
|
|
|
|
if(!$entrust) return \Yz::JsonError('未找到对应医嘱');
|
|
|
|
|
if($entrust->list_status <> 1) return \Yz::JsonError('医嘱当前状态无法报道');
|
|
|
|
|
if(!$entrust) return \Yz::JsonReturn(true, '成功', ['warn' => '未找到对应医嘱']);
|
|
|
|
|
if(!in_array($entrust->list_status, [0, 1])) return \Yz::JsonReturn(true, '成功', ['warn' => '医嘱当前状态无法报道']);
|
|
|
|
|
$data = [
|
|
|
|
|
'list_status' => 2,
|
|
|
|
|
'check_num' => $checkNo,
|
|
|
|
|
@ -295,7 +295,7 @@ public function SignInOnPacs(){
|
|
|
|
|
|
|
|
|
|
return \Yz::JsonReturn(true,'报道成功',['orderNo'=>$orderNo]);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::JsonError('报道失败');
|
|
|
|
|
return \Yz::JsonReturn(true, '成功', ['warn' => '报道失败']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -307,7 +307,7 @@ public function SignInOnPacsTest(){
|
|
|
|
|
if(!isset($checkNo)) return \Yz::JsonError('报道号不能为空');
|
|
|
|
|
$entrust = DB::table('s_list')->where(['entrust_id' => $orderNo,'is_nullify'=>0,'is_del'=>0])->first();
|
|
|
|
|
if(!$entrust) return \Yz::JsonError('未找到对应医嘱');
|
|
|
|
|
if($entrust->list_status <> 1) return \Yz::JsonError('医嘱当前状态无法报道');
|
|
|
|
|
if(!in_array($entrust->list_status, [0, 1])) return \Yz::JsonError('医嘱当前状态无法报道');
|
|
|
|
|
|
|
|
|
|
return \Yz::JsonReturn(true,'报道成功(测试)',['orderNo'=>$orderNo,'checkNo'=>$checkNo,'entrust'=>$entrust]);
|
|
|
|
|
}
|
|
|
|
|
@ -316,17 +316,18 @@ public function SignInOnPacsTest(){
|
|
|
|
|
public function CancelSignInOnPacs(){
|
|
|
|
|
$orderNo = request('orderNo');
|
|
|
|
|
$entrust = DB::table('s_list')->where(['entrust_id' => $orderNo,'is_nullify'=>0,'is_del'=>0])->first();
|
|
|
|
|
if(!$entrust) return \Yz::JsonError('未找到对应医嘱');
|
|
|
|
|
if($entrust->list_status <> 2) return \Yz::JsonError('医嘱当前状态无法取消报道');
|
|
|
|
|
if(!$entrust) return \Yz::JsonReturn(true, '成功', ['warn' => '未找到对应医嘱']);
|
|
|
|
|
if($entrust->list_status <> 2) return \Yz::JsonReturn(true, '成功', ['warn' => '医嘱当前状态无法取消报道']);
|
|
|
|
|
$newStatus = $entrust->reservation_date ? 1 : 0;
|
|
|
|
|
$data = [
|
|
|
|
|
'list_status' => 1,
|
|
|
|
|
'list_status' => $newStatus,
|
|
|
|
|
'check_num' => '',
|
|
|
|
|
];
|
|
|
|
|
$u = DB::table('s_list')->where(['entrust_id' => $orderNo])->update($data);
|
|
|
|
|
if($u){
|
|
|
|
|
return \Yz::JsonReturn(true,'取消报道成功',['orderNo'=>$orderNo]);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::JsonError('取消报道失败');
|
|
|
|
|
return \Yz::JsonReturn(true, '成功', ['warn' => '取消报道失败']);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|