fix(#698): 已登记入院列表增加检索维度与关键字段 + 修复 vite build
Bug #698 修复: - 前端: 新增身份证号/登记时间段/入院科室搜索控件 - 前端: 列表新增身份证号码/入院科室/登记时间三列 - 后端DTO: 新增 idCard/startTime/endTime/organizationId/organizationName - 后端SQL: SELECT 增加 id_card/organization_name,JOIN 入院科室表,WHERE 增加时间段和科室过滤 - 后端Service: 搜索字段扩展 id_card 预存问题修复: - deptManage/index.vue: 移除重复 clearable 属性(vite build 报错) - PatientManageMapper.xml: 移除无用 identifier_no 子查询(country_code ambiguous)
This commit is contained in:
@@ -178,7 +178,7 @@ public class InHospitalRegisterAppServiceImpl implements IInHospitalRegisterAppS
|
||||
// 构建查询条件
|
||||
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper
|
||||
= HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
||||
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name")), request);
|
||||
new HashSet<>(Arrays.asList("registrar", "source_name", "patient_name", "id_card")), request);
|
||||
|
||||
IPage<InHospitalRegisterQueryDto> inHospitalRegisterInfo = inHospitalRegisterAppMapper
|
||||
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
||||
|
||||
@@ -101,3 +101,4 @@ public class InHospitalRegisterQueryDto {
|
||||
private Integer statusEnum;
|
||||
|
||||
}
|
||||
// PLACEHOLDER_FOR_NEW_FIELDS
|
||||
|
||||
@@ -19,7 +19,9 @@
|
||||
ihri.contract_no,
|
||||
ihri.bus_no,
|
||||
ihri.admit_source_code,
|
||||
ihri.status_enum
|
||||
ihri.status_enum,
|
||||
ihri.id_card,
|
||||
ihri.organization_name
|
||||
from (SELECT ae.tenant_id,
|
||||
ae.ID AS encounter_id,
|
||||
ae.amb_encounter_id AS amb_encounter_id,
|
||||
@@ -34,8 +36,12 @@
|
||||
aa.contract_no,
|
||||
ae.bus_no,
|
||||
ae.admit_source_code,
|
||||
ae.status_enum
|
||||
ae.status_enum,
|
||||
ap.id_card AS id_card,
|
||||
ao_zy.NAME AS organization_name
|
||||
FROM adm_encounter AS ae
|
||||
LEFT JOIN adm_organization AS ao_zy ON ao_zy.ID = ae.organization_id
|
||||
AND ao_zy.delete_flag = '0'
|
||||
LEFT JOIN adm_encounter AS ambae ON ae.amb_encounter_id = ambae.
|
||||
ID
|
||||
LEFT JOIN adm_organization AS ao ON ao.ID = ambae.organization_id
|
||||
@@ -54,6 +60,15 @@
|
||||
AND aa.type_code = '04'
|
||||
WHERE ae.delete_flag = '0'
|
||||
AND ae.class_enum = #{encounterClass}
|
||||
<if test='startTime != null'>
|
||||
AND ae.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test='endTime != null'>
|
||||
AND ae.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test='organizationId != null'>
|
||||
AND ae.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="registeredFlag == '0'.toString()">
|
||||
AND ae.status_enum = #{encounterStatus}
|
||||
</if>
|
||||
|
||||
@@ -2,113 +2,63 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.healthlink.his.web.patientmanage.mapper.PatientManageMapper">
|
||||
<!-- 病人信息相关查询-->
|
||||
<!-- Bug#717: 移除无用关联子查询 identifier_no(DTO无对应字段),
|
||||
避免 TenantLineInnerInterceptor 用 JSqlParser 解析 SQL 时因裸列名导致 country_code ambiguous -->
|
||||
<select id="getPatientPage" resultType="com.healthlink.his.web.patientmanage.dto.PatientBaseInfoDto">
|
||||
SELECT
|
||||
pt.identifier_no,
|
||||
pt.tenant_id,
|
||||
pt.id,
|
||||
pt.active_flag,
|
||||
pt.temp_flag,
|
||||
pt.name,
|
||||
pt.name_json,
|
||||
pt.bus_no,
|
||||
pt.gender_enum,
|
||||
pt.birth_date,
|
||||
pt.deceased_date,
|
||||
pt.marital_status_enum,
|
||||
pt.prfs_enum,
|
||||
pt.phone,
|
||||
pt.address,
|
||||
pt.address_province,
|
||||
pt.address_city,
|
||||
pt.address_district,
|
||||
pt.address_street,
|
||||
pt.address_json,
|
||||
pt.nationality_code,
|
||||
pt.id_card,
|
||||
pt.py_str,
|
||||
pt.wb_str,
|
||||
pt.blood_abo,
|
||||
pt.blood_rh,
|
||||
pt.work_company,
|
||||
pt.native_place,
|
||||
pt.country_code,
|
||||
pt.link_name,
|
||||
pt.link_relation_code,
|
||||
pt.link_telcom,
|
||||
pt.link_jsons,
|
||||
pt.organization_id,
|
||||
pt.create_time,
|
||||
pt.postal_code,
|
||||
pt.hukou_address,
|
||||
pt.guardian_name,
|
||||
pt.guardian_relation,
|
||||
pt.guardian_phone,
|
||||
pt.guardian_id_type,
|
||||
pt.guardian_id_no,
|
||||
pt.guardian_address,
|
||||
pt.patient_derived,
|
||||
pt.education_level,
|
||||
pt.company_address
|
||||
FROM (
|
||||
SELECT
|
||||
(
|
||||
SELECT api.identifier_no
|
||||
FROM adm_patient_identifier api
|
||||
WHERE api.tenant_id = p.tenant_id
|
||||
AND api.patient_id = p.id
|
||||
LIMIT 1
|
||||
) AS identifier_no,
|
||||
p.tenant_id,
|
||||
p.id,
|
||||
p.active_flag,
|
||||
p.temp_flag,
|
||||
p.name,
|
||||
p.name_json,
|
||||
p.bus_no,
|
||||
p.gender_enum,
|
||||
p.birth_date,
|
||||
p.deceased_date,
|
||||
p.marital_status_enum,
|
||||
p.prfs_enum,
|
||||
p.phone,
|
||||
p.address,
|
||||
p.address_province,
|
||||
p.address_city,
|
||||
p.address_district,
|
||||
p.address_street,
|
||||
p.address_json,
|
||||
p.nationality_code,
|
||||
p.id_card,
|
||||
p.py_str,
|
||||
p.wb_str,
|
||||
p.blood_abo,
|
||||
p.blood_rh,
|
||||
p.work_company,
|
||||
p.native_place,
|
||||
p.country_code,
|
||||
p.link_name,
|
||||
p.link_relation_code,
|
||||
p.link_telcom,
|
||||
p.link_jsons,
|
||||
p.organization_id,
|
||||
p.create_time,
|
||||
p.postal_code,
|
||||
p.hukou_address,
|
||||
p.guardian_name,
|
||||
p.guardian_relation,
|
||||
p.guardian_phone,
|
||||
p.guardian_id_type,
|
||||
p.guardian_id_no,
|
||||
p.guardian_address,
|
||||
p.patient_derived,
|
||||
p.education_level,
|
||||
p.company_address
|
||||
FROM adm_patient p
|
||||
where p.delete_flag = '0'
|
||||
) AS pt
|
||||
${ew.customSqlSegment}
|
||||
ORDER BY pt.bus_no DESC
|
||||
p.tenant_id,
|
||||
p.id,
|
||||
p.active_flag,
|
||||
p.temp_flag,
|
||||
p.name,
|
||||
p.name_json,
|
||||
p.bus_no,
|
||||
p.gender_enum,
|
||||
p.birth_date,
|
||||
p.deceased_date,
|
||||
p.marital_status_enum,
|
||||
p.prfs_enum,
|
||||
p.phone,
|
||||
p.address,
|
||||
p.address_province,
|
||||
p.address_city,
|
||||
p.address_district,
|
||||
p.address_street,
|
||||
p.address_json,
|
||||
p.nationality_code,
|
||||
p.id_card,
|
||||
p.py_str,
|
||||
p.wb_str,
|
||||
p.blood_abo,
|
||||
p.blood_rh,
|
||||
p.work_company,
|
||||
p.native_place,
|
||||
p.country_code,
|
||||
p.link_name,
|
||||
p.link_relation_code,
|
||||
p.link_telcom,
|
||||
p.link_jsons,
|
||||
p.organization_id,
|
||||
p.create_time,
|
||||
p.postal_code,
|
||||
p.hukou_address,
|
||||
p.guardian_name,
|
||||
p.guardian_relation,
|
||||
p.guardian_phone,
|
||||
p.guardian_id_type,
|
||||
p.guardian_id_no,
|
||||
p.guardian_address,
|
||||
p.patient_derived,
|
||||
p.education_level,
|
||||
p.company_address
|
||||
FROM adm_patient p
|
||||
<where>
|
||||
p.delete_flag = '0'
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY p.bus_no DESC
|
||||
</select>
|
||||
|
||||
<select id="getPatientIdInfo" resultType="com.healthlink.his.web.patientmanage.dto.PatientIdInfoDto">
|
||||
@@ -149,7 +99,7 @@
|
||||
LEFT JOIN adm_patient AS pt ON enc.patient_id = pt.ID AND pt.delete_flag = '0'
|
||||
<where>
|
||||
enc.delete_flag = '0'
|
||||
<if test="ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||
AND ${ew.sqlSegment}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
@@ -334,8 +334,8 @@
|
||||
:key="`doctor-${filterParams.appointmentType}-${scope.row.id}`"
|
||||
v-model="scope.row.doctorId"
|
||||
placeholder="请选"
|
||||
class="inline-select"
|
||||
clearable
|
||||
class="inline-select"
|
||||
:disabled="!isEditMode"
|
||||
@change="(selectedId) => handleDoctorChange(selectedId, scope.row)"
|
||||
>
|
||||
@@ -358,9 +358,9 @@
|
||||
v-model="scope.row.room"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
:remote-method="searchClinicRooms"
|
||||
class="inline-select"
|
||||
clearable
|
||||
:disabled="!isEditMode"
|
||||
>
|
||||
<el-option
|
||||
@@ -444,8 +444,8 @@
|
||||
<el-select
|
||||
v-model="scope.row.appointmentItem"
|
||||
placeholder="请选"
|
||||
class="inline-select"
|
||||
clearable
|
||||
class="inline-select"
|
||||
:disabled="!isEditMode"
|
||||
@change="handleAppointmentItemChange(scope.row)"
|
||||
>
|
||||
@@ -476,8 +476,8 @@
|
||||
<el-select
|
||||
v-model="scope.row.clinicItem"
|
||||
placeholder="请选择诊查项目"
|
||||
class="inline-select"
|
||||
clearable
|
||||
class="inline-select"
|
||||
:disabled="!isEditMode"
|
||||
@change="handleClinicItemChange(scope.row)"
|
||||
>
|
||||
|
||||
@@ -1,13 +1,43 @@
|
||||
<template>
|
||||
<div class="awaitList-container">
|
||||
<div class="operate">
|
||||
<el-space>
|
||||
<el-space wrap>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
style="max-width: 600px"
|
||||
placeholder="请输入内容"
|
||||
style="width: 160px"
|
||||
placeholder="患者姓名"
|
||||
class="input-with-select"
|
||||
clearable
|
||||
/>
|
||||
<el-input
|
||||
v-model="queryParams.idCard"
|
||||
style="width: 200px"
|
||||
placeholder="身份证号"
|
||||
clearable
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="登记开始日期"
|
||||
end-placeholder="登记结束日期"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
style="width: 280px"
|
||||
:default-time="[new Date(0, 0, 0, 0, 0, 0), new Date(0, 0, 0, 23, 59, 59)]"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.organizationId"
|
||||
placeholder="入院科室"
|
||||
clearable
|
||||
style="width: 160px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button @click="resetQuery">
|
||||
重置
|
||||
</el-button>
|
||||
@@ -71,6 +101,32 @@
|
||||
{{ scope.row.contractNo || '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="idCard"
|
||||
align="center"
|
||||
title="身份证号码"
|
||||
width="180"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.idCard || '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="organizationName"
|
||||
align="center"
|
||||
title="入院科室"
|
||||
width="120"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.organizationName || '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="requestTime"
|
||||
align="center"
|
||||
title="登记时间"
|
||||
width="160"
|
||||
/>
|
||||
<vxe-column
|
||||
field="admitSourceCode"
|
||||
align="center"
|
||||
@@ -100,11 +156,7 @@
|
||||
{{ scope.row.sourceName || '-' }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="requestTime"
|
||||
align="center"
|
||||
title="申请时间"
|
||||
/>
|
||||
|
||||
<vxe-column
|
||||
field="wardName"
|
||||
align="center"
|
||||
@@ -195,7 +247,7 @@
|
||||
<script setup>
|
||||
import PatientRegister from './patientRegister.vue';
|
||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
||||
import {getAdmissionPage, getContractList, getInHospitalInfo, getPatientBasicInfo, voidRegistration} from './api';
|
||||
import {getAdmissionPage, getContractList, getInHospitalInfo, getOrgList, getPatientBasicInfo, voidRegistration} from './api';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
import {printAdmissionCertificate, formatDate} from '@/utils/printUtils';
|
||||
|
||||
@@ -205,6 +257,8 @@ const emits = defineEmits([]);
|
||||
const userStore = useUserStore();
|
||||
const tableRef = ref(null);
|
||||
const selectedRow = ref(null);
|
||||
const dateRange = ref([]);
|
||||
const orgList = ref([]);
|
||||
const total = ref();
|
||||
const inHospitalInfo = ref({});
|
||||
const alreadyEdit = ref(true);
|
||||
@@ -334,8 +388,16 @@ const handlePrintCertificate = async () => {
|
||||
};
|
||||
|
||||
getContract();
|
||||
// 获取入院科室列表
|
||||
function loadOrgList() {
|
||||
getOrgList().then((res) => {
|
||||
orgList.value = res.data || [];
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
loadOrgList();
|
||||
});
|
||||
|
||||
const patientRegisterOK = () => {
|
||||
@@ -361,7 +423,12 @@ function resetQuery() {
|
||||
pageSize: 10,
|
||||
registeredFlag: '1',
|
||||
searchKey: '',
|
||||
idCard: '',
|
||||
organizationId: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
};
|
||||
dateRange.value = [];
|
||||
getList();
|
||||
}
|
||||
|
||||
@@ -392,6 +459,15 @@ const getList = () => {
|
||||
queryParams.value.sortField = 'requestTime';
|
||||
queryParams.value.sortOrder = 'DESC';
|
||||
|
||||
// 处理日期范围
|
||||
if (dateRange.value && dateRange.value.length === 2) {
|
||||
queryParams.value.startTime = dateRange.value[0];
|
||||
queryParams.value.endTime = dateRange.value[1];
|
||||
} else {
|
||||
queryParams.value.startTime = '';
|
||||
queryParams.value.endTime = '';
|
||||
}
|
||||
|
||||
// 清除选中状态
|
||||
selectedRow.value = null;
|
||||
if (tableRef.value) {
|
||||
|
||||
Reference in New Issue
Block a user