PACS 调用

main
鹿和sa0ChunLuyu 4 days ago
parent 1731c50a4d
commit 74fb3ab43a

@ -205,6 +205,21 @@ public function SaveApply($orderNo)
if ($entrust->user_sex == 1) $sex = 'M';
if ($entrust->user_sex == 2) $sex = 'F';
$hisiteminfo = collect($hisInfo['itemList']??[])->firstWhere('termCode', $entrust->entrust_code);
// 获取顶级科室名称
$deptName = '';
if (!empty($entrust->department_id)) {
$execDept = DB::table('s_department')->where('id', $entrust->department_id)->where('is_del', 0)->first();
if ($execDept) {
if ($execDept->pid == 0) {
$deptName = $execDept->department_name;
} else {
$topDept = DB::table('s_department')->where('id', $execDept->pid)->where('is_del', 0)->first();
$deptName = $topDept->department_name ?? '';
}
}
}
$send_data = [
'Request' => [
'Head' => [
@ -257,7 +272,7 @@ public function SaveApply($orderNo)
'appoint_date' => $entrust->reservation_date . ' ' . substr($reservation_time, 0, 5),
'register_date' => $entrust->reservation_date . ' ' . substr($reservation_end_time, 0, 5),
'bodypartexamined' => $hisiteminfo['examPosiSmallName']??'',
'dept_name' => '',
'dept_name' => $deptName,
'studyclass1' => $hisInfo['requestTypeAlias']??'',
'studyclass1his' => $hisiteminfo['execDeptName']??'',
'studyclass1name' => $hisiteminfo['execDeptName']??'',

Loading…
Cancel
Save