对接his,给pacs提供接口
parent
18b6d07f73
commit
f39e655478
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API\His;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DepartmentController extends Controller
|
||||
{
|
||||
//获取科室列表
|
||||
public function GetDepartmentList(){
|
||||
$His = new HisController();
|
||||
$data=[];
|
||||
$res = $His::Get("查询科室列表", $data);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API\Third;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PacsController extends Controller
|
||||
{
|
||||
//报到机调用此接口查询预约的记录
|
||||
public function GetEntrustInfo(){
|
||||
$orderNo = request('orderNo');//医嘱号
|
||||
$idCardNumber = request('idCardNumber');//身份证
|
||||
$visitSqNo = request('visitSqNo');//门诊挂号流水号/住院流水号
|
||||
$dateRange = request('dateRange');//医嘱开单日期
|
||||
$requestNo = request('requestNo');//申请单号
|
||||
// 判断所有字段是否都为空
|
||||
if (empty($orderNo) && empty($idCardNumber) && empty($visitSqNo) && empty($dateRange) && empty($requestNo)) {
|
||||
return \Yz::JsonError("缺失查询条件");
|
||||
}
|
||||
$entrust_list=DB::table('s_list')->select(
|
||||
"list_status",
|
||||
"is_nullify",
|
||||
"reg_num",
|
||||
"user_name",
|
||||
"user_sex",
|
||||
"user_brithday",
|
||||
"user_phone",
|
||||
"entrust_code",
|
||||
"entrust",
|
||||
"is_pay",
|
||||
"reservation_department",
|
||||
"entrust_date",
|
||||
"entrust_time",
|
||||
"docotr as doctor",
|
||||
"patient_type",
|
||||
"implement_department",
|
||||
"entrust_id",
|
||||
"episodeid",
|
||||
"RISRAcceptDeptCode",
|
||||
"reservation_date",
|
||||
"reservation_time",
|
||||
"canel_time as cancel_time",
|
||||
"warddesc",
|
||||
"wardcode",
|
||||
"bedname",
|
||||
"bedno",
|
||||
"app_num",
|
||||
"medicalHistory",
|
||||
"diagnosisName",
|
||||
"idCardNumber"
|
||||
|
||||
);
|
||||
if(isset($dateRange)){
|
||||
if(!is_array($dateRange)) return \Yz::JsonError("日期范围必须是数组");
|
||||
$entrust_list=$entrust_list->whereBetween('entrust_date',[$dateRange[0],$dateRange[1]]);
|
||||
}
|
||||
if(isset($orderNo)){
|
||||
$entrust_list=$entrust_list->where('entrust_id',$orderNo);
|
||||
}
|
||||
if(isset($visitSqNo)){
|
||||
$entrust_list=$entrust_list->where('episodeid',$visitSqNo);
|
||||
}
|
||||
if(isset($requestNo)){
|
||||
$entrust_list=$entrust_list->where('app_num',$requestNo);
|
||||
}
|
||||
if(isset($idCardNumber)){
|
||||
$entrust_list=$entrust_list->where('idCardNumber',$idCardNumber);
|
||||
}
|
||||
$entrust_list=$entrust_list->get();
|
||||
return \Yz::JsonReturn(true,'查询完成',$entrust_list);
|
||||
|
||||
}
|
||||
//pacs调用此接口通知已经报道
|
||||
public function SignIn(){
|
||||
$orderNo = request('orderNo');//医嘱号
|
||||
$checkNo = request('checkNo');//报道号(检查号)
|
||||
if(!isset($orderNo)) return \Yz::JsonError('医嘱号不能为空');
|
||||
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('医嘱当前状态无法报道');
|
||||
$data = [
|
||||
'list_status' => 2,
|
||||
'check_num' => $checkNo,
|
||||
];
|
||||
$u = DB::table('s_list')->where(['entrust_id' => $orderNo])->update($data);
|
||||
if($u){
|
||||
return \Yz::JsonReturn(true,'报道成功',['orderNo'=>$orderNo]);
|
||||
}else{
|
||||
return \Yz::JsonError('报道失败');
|
||||
}
|
||||
|
||||
}
|
||||
//pacs调用此接口通知取消报道
|
||||
public function CancelSignIn(){
|
||||
$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('医嘱当前状态无法取消报道');
|
||||
$data = [
|
||||
'list_status' => 1,
|
||||
'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('取消报道失败');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,3 +1,3 @@
|
||||
ENV = 'development'
|
||||
VITE_APP_API = '/api/'
|
||||
VITE_APP_FILE = 'http://YiJiYuYue-Common'
|
||||
VITE_APP_FILE = 'http://yiji-qhdzhongyiyuan'
|
||||
Loading…
Reference in New Issue