|
|
|
@ -15,7 +15,7 @@
|
|
|
|
class CSharpController extends Controller
|
|
|
|
class CSharpController extends Controller
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public static $request;
|
|
|
|
public static $request;
|
|
|
|
public static $Url = 'http://192.168.5.117/WebServiceToHis_BS/AcceptMessage.ashx';
|
|
|
|
public static $Url = 'http://192.168.5.198/WebServiceToHis_BS/AcceptMessage.ashx';
|
|
|
|
|
|
|
|
|
|
|
|
public function PacsSaveApplyInfo(Request $request)
|
|
|
|
public function PacsSaveApplyInfo(Request $request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -34,10 +34,12 @@ public function SaveApply($orderNo)
|
|
|
|
Log::info('推送申请单'.$orderNo);
|
|
|
|
Log::info('推送申请单'.$orderNo);
|
|
|
|
$entrust = DB::table('s_list')->where(['entrust_id' => $orderNo, 'list_status' => 2, 'is_nullify' => 0])->first();
|
|
|
|
$entrust = DB::table('s_list')->where(['entrust_id' => $orderNo, 'list_status' => 2, 'is_nullify' => 0])->first();
|
|
|
|
$reservation_time='';
|
|
|
|
$reservation_time='';
|
|
|
|
|
|
|
|
$reservation_end_time='';
|
|
|
|
if(isset($entrust->roster_id) and !empty($entrust->roster_id)){
|
|
|
|
if(isset($entrust->roster_id) and !empty($entrust->roster_id)){
|
|
|
|
$plan= DB::table('s_source_roster_detail')->where(['id' => $entrust->roster_id])->first();
|
|
|
|
$plan= DB::table('s_source_roster_detail')->where(['id' => $entrust->roster_id])->first();
|
|
|
|
if(!!$plan){
|
|
|
|
if(!!$plan){
|
|
|
|
$reservation_time=$plan->begin_time;
|
|
|
|
$reservation_time=$plan->begin_time;
|
|
|
|
|
|
|
|
$reservation_end_time=$plan->end_time;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -53,7 +55,8 @@ public function SaveApply($orderNo)
|
|
|
|
'visitSqNo' => $entrust->episodeid,
|
|
|
|
'visitSqNo' => $entrust->episodeid,
|
|
|
|
'requestNo' => $entrust->app_num,
|
|
|
|
'requestNo' => $entrust->app_num,
|
|
|
|
'visitTypeCode' => $patientHisTypeMap[$entrust->patient_type],
|
|
|
|
'visitTypeCode' => $patientHisTypeMap[$entrust->patient_type],
|
|
|
|
'moOrder' => $entrust->entrust_id,
|
|
|
|
'orderStatus'=>1
|
|
|
|
|
|
|
|
//'feeFlag' => $entrust->is_pay == 0 ? 0 : 1, // 住院=0,其他=1
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$hisInfo=[];
|
|
|
|
$hisInfo=[];
|
|
|
|
$His = new HisController();
|
|
|
|
$His = new HisController();
|
|
|
|
@ -74,6 +77,7 @@ public function SaveApply($orderNo)
|
|
|
|
$sex = 'U';
|
|
|
|
$sex = 'U';
|
|
|
|
if ($entrust->user_sex == 1) $sex = 'M';
|
|
|
|
if ($entrust->user_sex == 1) $sex = 'M';
|
|
|
|
if ($entrust->user_sex == 2) $sex = 'F';
|
|
|
|
if ($entrust->user_sex == 2) $sex = 'F';
|
|
|
|
|
|
|
|
$hisiteminfo = collect($hisInfo['itemList']??[])->firstWhere('termCode', $entrust->entrust_code);
|
|
|
|
$send_data = [
|
|
|
|
$send_data = [
|
|
|
|
'Request' => [
|
|
|
|
'Request' => [
|
|
|
|
'Head' => [
|
|
|
|
'Head' => [
|
|
|
|
@ -90,39 +94,53 @@ public function SaveApply($orderNo)
|
|
|
|
'patientsex' => $sex,
|
|
|
|
'patientsex' => $sex,
|
|
|
|
'patientbirthday' => $entrust->user_brithday,
|
|
|
|
'patientbirthday' => $entrust->user_brithday,
|
|
|
|
'age' => \Tools::calculateAge($entrust->user_brithday),
|
|
|
|
'age' => \Tools::calculateAge($entrust->user_brithday),
|
|
|
|
|
|
|
|
'height' => '',
|
|
|
|
|
|
|
|
'weight' => '',
|
|
|
|
'identifyid' => $entrust->idCardNumber,
|
|
|
|
'identifyid' => $entrust->idCardNumber,
|
|
|
|
|
|
|
|
'healthcard' => '',
|
|
|
|
|
|
|
|
'insurance_type' => '',
|
|
|
|
'mobilephone' => $entrust->user_phone,
|
|
|
|
'mobilephone' => $entrust->user_phone,
|
|
|
|
'home_detail_address'=>$hisInfo['address']??'',
|
|
|
|
'home_detail_address'=>$hisInfo['address']??'',
|
|
|
|
'visitinfo' => [
|
|
|
|
'visitinfo' => [
|
|
|
|
'visitsqno' => $entrust->episodeid,
|
|
|
|
'visitsqno' => $entrust->episodeid,
|
|
|
|
'inpatientno'=>$hisInfo['patientNo']??'',
|
|
|
|
'inpatientno'=>substr($entrust->episodeid, -10), // 取 visitsqno 后10位
|
|
|
|
'outpatientno'=>$hisInfo['cardNo']??'',
|
|
|
|
'outpatientno'=>$hisInfo['cardNo']??'',
|
|
|
|
'caseno'=>$hisInfo['markNo']??'',
|
|
|
|
'caseno'=>$hisInfo['markNo']??'',
|
|
|
|
'source' => $patientTypeMap[$entrust->patient_type],
|
|
|
|
'source' => $patientTypeMap[$entrust->patient_type],
|
|
|
|
|
|
|
|
'hospitalization_count' => '',
|
|
|
|
'bed_no' => $hisInfo['bedNo']??'',
|
|
|
|
'bed_no' => $hisInfo['bedNo']??'',
|
|
|
|
|
|
|
|
'roomnumber' => '',
|
|
|
|
'inpatientareacode' => $hisInfo['areaCode']??'',
|
|
|
|
'inpatientareacode' => $hisInfo['areaCode']??'',
|
|
|
|
'inpatientarea' => $hisInfo['areaName']??'',
|
|
|
|
'inpatientarea' => $hisInfo['areaName']??'',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'applyinfo' =>
|
|
|
|
'applyinfo' =>
|
|
|
|
// [
|
|
|
|
[
|
|
|
|
// 'accessionnumber' => $entrust->app_num,
|
|
|
|
'accessionnumber' => $entrust->app_num,
|
|
|
|
// 'hisapplytime' => $entrust->reservation_date . ' ' . $reservation_time,//与pacs 张工沟通 传 预约的日期
|
|
|
|
'hisapplytime' => $hisInfo['requestDate']??'',
|
|
|
|
// 'hisapplydeptcode'=> $hisInfo['orderDeptCode']??'',
|
|
|
|
'hisapplydeptcode'=> $hisInfo['orderDeptCode']??'',
|
|
|
|
// 'hisapplydept'=> $hisInfo['orderDeptName']??'',
|
|
|
|
'hisapplydept'=> $hisInfo['orderDeptName']??'',
|
|
|
|
// 'hisapplydoctorcode'=> $hisInfo['orderPersonCode']??'',
|
|
|
|
'hisapplydoctorcode'=> $hisInfo['orderPersonCode']??'',
|
|
|
|
// 'hisapplydoctor'=> $hisInfo['orderPersonName']??'',
|
|
|
|
'hisapplydoctor'=> $hisInfo['orderPersonName']??'',
|
|
|
|
// 'diagnosis'=> $hisInfo['diagnosisName']??'',
|
|
|
|
'diagnosis'=> $entrust->diagnosisName,
|
|
|
|
// 'applyorderinfo' => [
|
|
|
|
'isemergency'=> $entrust->his_is_emergency,
|
|
|
|
// 'orderno' => $entrust->entrust_id,
|
|
|
|
'isarmyman'=> $hisInfo['armyFlag']??'',
|
|
|
|
// 'bodypartexamined' => $hisInfo['examPosiBigName']??'',
|
|
|
|
'vip_indicator'=> $hisInfo['vipFlag']??'',
|
|
|
|
// 'studyclass1his' => $hisInfo['requestTypeName']??'',
|
|
|
|
'applyorderinfo' => [
|
|
|
|
// 'checkitemcode' => $entrust->entrust_code,
|
|
|
|
'orderno' => $entrust->entrust_id,
|
|
|
|
// 'checkitemname' => $entrust->entrust,
|
|
|
|
'appoint_date' => $entrust->reservation_date . ' ' . substr($reservation_time, 0, 5),
|
|
|
|
// 'factprice' =>$hisInfo['itemList'][0]['itemCost']??'',
|
|
|
|
'register_date' => $entrust->reservation_date . ' ' . substr($reservation_end_time, 0, 5),
|
|
|
|
// ],
|
|
|
|
'bodypartexamined' => $hisiteminfo['examPosiSmallName']??'',
|
|
|
|
// ],
|
|
|
|
'studyclass1' => $hisInfo['requestTypeAlias']??'',
|
|
|
|
$hisInfo
|
|
|
|
'studyclass1his' => $hisiteminfo['execDeptName']??'',
|
|
|
|
// 'hisinfo'=>$hisInfo
|
|
|
|
'studyclass1name' => $hisiteminfo['execDeptName']??'',
|
|
|
|
|
|
|
|
'studyclass2hiscode' => $hisiteminfo['termCode']??'',
|
|
|
|
|
|
|
|
'studyclass2his' => $hisiteminfo['termName']??'',
|
|
|
|
|
|
|
|
'checkitemcode' => $entrust->entrust_code,
|
|
|
|
|
|
|
|
'checkitemname' => $entrust->entrust,
|
|
|
|
|
|
|
|
'factprice' =>$hisInfo['itemList'][0]['itemCost']??'',
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
// 'hisinfo'=>$hisInfo
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|