diff --git a/Laravel/app/Http/Controllers/API/His/CheckItemController.php b/Laravel/app/Http/Controllers/API/His/CheckItemController.php index 885f054..b12a74f 100644 --- a/Laravel/app/Http/Controllers/API/His/CheckItemController.php +++ b/Laravel/app/Http/Controllers/API/His/CheckItemController.php @@ -110,6 +110,7 @@ class CheckItemController extends Controller 'item_desc' => $item_name, 'is_del' => 0, // 取消删除标记 'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE), + 'check_notice'=>$item['docmoTip'] ]); } else { // 不存在则插入新记录 @@ -123,9 +124,10 @@ class CheckItemController extends Controller 'limosis' =>0, 'check_time' =>0, 'hisExecDepts'=>json_encode($department_arr, JSON_UNESCAPED_UNICODE), + 'check_notice'=>$item['docmoTip'] ]); - $this->updateBindDrivers($item_code,$department_arr); + // $this->updateBindDrivers($item_code,$department_arr);自动绑定检查室 ,废弃 } } diff --git a/Laravel/app/Http/Controllers/API/Third/CSharpController.php b/Laravel/app/Http/Controllers/API/Third/CSharpController.php index 8477460..98239d0 100644 --- a/Laravel/app/Http/Controllers/API/Third/CSharpController.php +++ b/Laravel/app/Http/Controllers/API/Third/CSharpController.php @@ -45,7 +45,7 @@ class CSharpController extends Controller //查询his获取检查申请单 $patientHisTypeMap = [ 0 => '03', // I - 住院 - 1 => 'O1', // O - 门诊 + 1 => '01', // O - 门诊 2 => '02', // E - 急诊 3 => '04', // H - 体检 ]; @@ -92,20 +92,35 @@ class CSharpController extends Controller 'age' => \Tools::calculateAge($entrust->user_brithday), 'identifyid' => $entrust->idCardNumber, 'mobilephone' => $entrust->user_phone, + 'home_detail_address'=>$hisInfo['address']??'', 'visitinfo' => [ 'visitsqno' => $entrust->episodeid, + 'inpatientno'=>$hisInfo['patientNo']??'', + 'outpatientno'=>$hisInfo['cardNo']??'', + 'caseno'=>$hisInfo['markNo']??'', 'source' => $patientTypeMap[$entrust->patient_type], + 'bed_no' => $hisInfo['bedNo']??'', + 'inpatientareacode' => $hisInfo['areaCode']??'', + 'inpatientarea' => $hisInfo['areaName']??'', ], 'applyinfo' => [ 'accessionnumber' => $entrust->app_num, 'hisapplytime' => $entrust->reservation_date . ' ' . $reservation_time,//与pacs 张工沟通 传 预约的日期 + 'hisapplydeptcode'=> $hisInfo['orderDeptCode']??'', + 'hisapplydept'=> $hisInfo['orderDeptName']??'', + 'hisapplydoctorcode'=> $hisInfo['orderPersonCode']??'', + 'hisapplydoctor'=> $hisInfo['orderPersonName']??'', + 'diagnosis'=> $hisInfo['diagnosisName']??'', 'applyorderinfo' => [ 'orderno' => $entrust->entrust_id, + 'bodypartexamined' => $hisInfo['examPosiBigName']??'', + 'studyclass1his' => $hisInfo['requestTypeName']??'', 'checkitemcode' => $entrust->entrust_code, 'checkitemname' => $entrust->entrust, + 'factprice' =>$hisInfo['itemList'][0]['itemCost']??'', ], ], - 'hisinfo' => $hisInfo, + 'hisinfo'=>$hisInfo ] ] ] diff --git a/YiJi-admin/src/components/Yewu/YuYue202506.vue b/YiJi-admin/src/components/Yewu/YuYue202506.vue index dfd1659..e8ad12c 100644 --- a/YiJi-admin/src/components/Yewu/YuYue202506.vue +++ b/YiJi-admin/src/components/Yewu/YuYue202506.vue @@ -197,8 +197,13 @@ if (allPlanIdsSame) { selectedPlanId.value = selectedRows.value[0]?.roster_id; if(selectedPlanId.value!==0 && selectedPlanId.value){ + startDate.value=selectedRows.value[0]?.reservation_date - date_list.value = getDatesAfter(selectedRows.value[0]?.reservation_date) + if(checkDateDifference15Day(getTodayDate(),selectedRows.value[0]?.reservation_date) && !!selectedRows.value[0]?.reservation_date){ + date_list.value=getDatesAfter(selectedRows.value[0]?.reservation_date) + }else{ + date_list.value=getDatesAfter(getTodayDate()) + } activeZhenShi.value=selectedRows.value[0]?.department_resources?.department_resources_name } } else { @@ -287,8 +292,8 @@ entrustTableRef.value.toggleRowSelection(entrustTableDate.value[i], true) if(entrustTableDate.value[i].roster_id!=null){ selectedPlanId.value=entrustTableDate.value[i].roster_id - startDate.value=entrustTableDate.value[i].reservation_date - date_list.value = getDatesAfter(entrustTableDate.value[i].reservation_date) + // startDate.value=entrustTableDate.value[i].reservation_date + //date_list.value = getDatesAfter(entrustTableDate.value[i].reservation_date) activeZhenShi.value=entrustTableDate.value[i].department_resources?.department_resources_name } @@ -683,6 +688,46 @@ return dates; } + function isValidDate(dateString) { + // 简单的正则表达式来验证日期格式为 YYYY-MM-DD + const datePattern = /^\d{4}-\d{2}-\d{2}$/; + if (!datePattern.test(dateString)) { + return false; + } + + // 创建 Date 对象并检查是否为有效日期 + const date = new Date(dateString); + return date.toString() !== "Invalid Date" && + !isNaN(date.getTime()); + } + + function checkDateDifference15Day(date1, date2) { + // 校验日期格式是否正确 + if (!isValidDate(date1) || !isValidDate(date2)) { + console.error("日期格式不正确,请使用 YYYY-MM-DD"); + return false; // 或者抛出异常、提示用户等 + } + + const startDate = new Date(date1); + const endDate = new Date(date2); + + // 计算时间差(毫秒) + const diffInMs = endDate - startDate; + + // 转换为天数 + const diffInDays = diffInMs / (1000 * 60 * 60 * 24); + + return diffInDays > 15; + } + function getTodayDate() { + const today = new Date(); + + const year = today.getFullYear(); // 年份,如 2025 + const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,所以要 +1 + const day = String(today.getDate()).padStart(2, '0'); // 日期 + + return `${year}-${month}-${day}`; + } onMounted(() => { date_list.value = getDatesAfter() GetMainInfo()