调整对接pacs ,拉取检查项目增加注意事项字段

main
yanzai 5 months ago
parent ad582a0628
commit f14ec93bb5

@ -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);自动绑定检查室 ,废弃
}
}

@ -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
]
]
]

@ -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()

Loading…
Cancel
Save