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
|
QueryWrapper<InHospitalRegisterQueryDto> queryWrapper
|
||||||
= HisQueryUtils.buildQueryWrapper(inHospitalRegisterQueryDto, searchKey,
|
= 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
|
IPage<InHospitalRegisterQueryDto> inHospitalRegisterInfo = inHospitalRegisterAppMapper
|
||||||
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
.getInHospitalRegisterInfo(new Page<>(pageNo, pageSize), EncounterClass.IMP.getValue(), encounterStatus,
|
||||||
|
|||||||
@@ -101,3 +101,4 @@ public class InHospitalRegisterQueryDto {
|
|||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// PLACEHOLDER_FOR_NEW_FIELDS
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
ihri.contract_no,
|
ihri.contract_no,
|
||||||
ihri.bus_no,
|
ihri.bus_no,
|
||||||
ihri.admit_source_code,
|
ihri.admit_source_code,
|
||||||
ihri.status_enum
|
ihri.status_enum,
|
||||||
|
ihri.id_card,
|
||||||
|
ihri.organization_name
|
||||||
from (SELECT ae.tenant_id,
|
from (SELECT ae.tenant_id,
|
||||||
ae.ID AS encounter_id,
|
ae.ID AS encounter_id,
|
||||||
ae.amb_encounter_id AS amb_encounter_id,
|
ae.amb_encounter_id AS amb_encounter_id,
|
||||||
@@ -34,8 +36,12 @@
|
|||||||
aa.contract_no,
|
aa.contract_no,
|
||||||
ae.bus_no,
|
ae.bus_no,
|
||||||
ae.admit_source_code,
|
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
|
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.
|
LEFT JOIN adm_encounter AS ambae ON ae.amb_encounter_id = ambae.
|
||||||
ID
|
ID
|
||||||
LEFT JOIN adm_organization AS ao ON ao.ID = ambae.organization_id
|
LEFT JOIN adm_organization AS ao ON ao.ID = ambae.organization_id
|
||||||
@@ -54,6 +60,15 @@
|
|||||||
AND aa.type_code = '04'
|
AND aa.type_code = '04'
|
||||||
WHERE ae.delete_flag = '0'
|
WHERE ae.delete_flag = '0'
|
||||||
AND ae.class_enum = #{encounterClass}
|
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()">
|
<if test="registeredFlag == '0'.toString()">
|
||||||
AND ae.status_enum = #{encounterStatus}
|
AND ae.status_enum = #{encounterStatus}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -2,113 +2,63 @@
|
|||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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">
|
<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 id="getPatientPage" resultType="com.healthlink.his.web.patientmanage.dto.PatientBaseInfoDto">
|
||||||
SELECT
|
SELECT
|
||||||
pt.identifier_no,
|
p.tenant_id,
|
||||||
pt.tenant_id,
|
p.id,
|
||||||
pt.id,
|
p.active_flag,
|
||||||
pt.active_flag,
|
p.temp_flag,
|
||||||
pt.temp_flag,
|
p.name,
|
||||||
pt.name,
|
p.name_json,
|
||||||
pt.name_json,
|
p.bus_no,
|
||||||
pt.bus_no,
|
p.gender_enum,
|
||||||
pt.gender_enum,
|
p.birth_date,
|
||||||
pt.birth_date,
|
p.deceased_date,
|
||||||
pt.deceased_date,
|
p.marital_status_enum,
|
||||||
pt.marital_status_enum,
|
p.prfs_enum,
|
||||||
pt.prfs_enum,
|
p.phone,
|
||||||
pt.phone,
|
p.address,
|
||||||
pt.address,
|
p.address_province,
|
||||||
pt.address_province,
|
p.address_city,
|
||||||
pt.address_city,
|
p.address_district,
|
||||||
pt.address_district,
|
p.address_street,
|
||||||
pt.address_street,
|
p.address_json,
|
||||||
pt.address_json,
|
p.nationality_code,
|
||||||
pt.nationality_code,
|
p.id_card,
|
||||||
pt.id_card,
|
p.py_str,
|
||||||
pt.py_str,
|
p.wb_str,
|
||||||
pt.wb_str,
|
p.blood_abo,
|
||||||
pt.blood_abo,
|
p.blood_rh,
|
||||||
pt.blood_rh,
|
p.work_company,
|
||||||
pt.work_company,
|
p.native_place,
|
||||||
pt.native_place,
|
p.country_code,
|
||||||
pt.country_code,
|
p.link_name,
|
||||||
pt.link_name,
|
p.link_relation_code,
|
||||||
pt.link_relation_code,
|
p.link_telcom,
|
||||||
pt.link_telcom,
|
p.link_jsons,
|
||||||
pt.link_jsons,
|
p.organization_id,
|
||||||
pt.organization_id,
|
p.create_time,
|
||||||
pt.create_time,
|
p.postal_code,
|
||||||
pt.postal_code,
|
p.hukou_address,
|
||||||
pt.hukou_address,
|
p.guardian_name,
|
||||||
pt.guardian_name,
|
p.guardian_relation,
|
||||||
pt.guardian_relation,
|
p.guardian_phone,
|
||||||
pt.guardian_phone,
|
p.guardian_id_type,
|
||||||
pt.guardian_id_type,
|
p.guardian_id_no,
|
||||||
pt.guardian_id_no,
|
p.guardian_address,
|
||||||
pt.guardian_address,
|
p.patient_derived,
|
||||||
pt.patient_derived,
|
p.education_level,
|
||||||
pt.education_level,
|
p.company_address
|
||||||
pt.company_address
|
FROM adm_patient p
|
||||||
FROM (
|
<where>
|
||||||
SELECT
|
p.delete_flag = '0'
|
||||||
(
|
<if test="ew != null and ew.sqlSegment != null and ew.sqlSegment != ''">
|
||||||
SELECT api.identifier_no
|
AND ${ew.sqlSegment}
|
||||||
FROM adm_patient_identifier api
|
</if>
|
||||||
WHERE api.tenant_id = p.tenant_id
|
</where>
|
||||||
AND api.patient_id = p.id
|
ORDER BY p.bus_no DESC
|
||||||
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
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPatientIdInfo" resultType="com.healthlink.his.web.patientmanage.dto.PatientIdInfoDto">
|
<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'
|
LEFT JOIN adm_patient AS pt ON enc.patient_id = pt.ID AND pt.delete_flag = '0'
|
||||||
<where>
|
<where>
|
||||||
enc.delete_flag = '0'
|
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}
|
AND ${ew.sqlSegment}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
@@ -334,8 +334,8 @@
|
|||||||
:key="`doctor-${filterParams.appointmentType}-${scope.row.id}`"
|
:key="`doctor-${filterParams.appointmentType}-${scope.row.id}`"
|
||||||
v-model="scope.row.doctorId"
|
v-model="scope.row.doctorId"
|
||||||
placeholder="请选"
|
placeholder="请选"
|
||||||
class="inline-select"
|
|
||||||
clearable
|
clearable
|
||||||
|
class="inline-select"
|
||||||
:disabled="!isEditMode"
|
:disabled="!isEditMode"
|
||||||
@change="(selectedId) => handleDoctorChange(selectedId, scope.row)"
|
@change="(selectedId) => handleDoctorChange(selectedId, scope.row)"
|
||||||
>
|
>
|
||||||
@@ -358,9 +358,9 @@
|
|||||||
v-model="scope.row.room"
|
v-model="scope.row.room"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
filterable
|
filterable
|
||||||
|
clearable
|
||||||
:remote-method="searchClinicRooms"
|
:remote-method="searchClinicRooms"
|
||||||
class="inline-select"
|
class="inline-select"
|
||||||
clearable
|
|
||||||
:disabled="!isEditMode"
|
:disabled="!isEditMode"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -444,8 +444,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.appointmentItem"
|
v-model="scope.row.appointmentItem"
|
||||||
placeholder="请选"
|
placeholder="请选"
|
||||||
class="inline-select"
|
|
||||||
clearable
|
clearable
|
||||||
|
class="inline-select"
|
||||||
:disabled="!isEditMode"
|
:disabled="!isEditMode"
|
||||||
@change="handleAppointmentItemChange(scope.row)"
|
@change="handleAppointmentItemChange(scope.row)"
|
||||||
>
|
>
|
||||||
@@ -476,8 +476,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="scope.row.clinicItem"
|
v-model="scope.row.clinicItem"
|
||||||
placeholder="请选择诊查项目"
|
placeholder="请选择诊查项目"
|
||||||
class="inline-select"
|
|
||||||
clearable
|
clearable
|
||||||
|
class="inline-select"
|
||||||
:disabled="!isEditMode"
|
:disabled="!isEditMode"
|
||||||
@change="handleClinicItemChange(scope.row)"
|
@change="handleClinicItemChange(scope.row)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,13 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="awaitList-container">
|
<div class="awaitList-container">
|
||||||
<div class="operate">
|
<div class="operate">
|
||||||
<el-space>
|
<el-space wrap>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.searchKey"
|
v-model="queryParams.searchKey"
|
||||||
style="max-width: 600px"
|
style="width: 160px"
|
||||||
placeholder="请输入内容"
|
placeholder="患者姓名"
|
||||||
class="input-with-select"
|
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 @click="resetQuery">
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -71,6 +101,32 @@
|
|||||||
{{ scope.row.contractNo || '-' }}
|
{{ scope.row.contractNo || '-' }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</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
|
<vxe-column
|
||||||
field="admitSourceCode"
|
field="admitSourceCode"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -100,11 +156,7 @@
|
|||||||
{{ scope.row.sourceName || '-' }}
|
{{ scope.row.sourceName || '-' }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column
|
|
||||||
field="requestTime"
|
|
||||||
align="center"
|
|
||||||
title="申请时间"
|
|
||||||
/>
|
|
||||||
<vxe-column
|
<vxe-column
|
||||||
field="wardName"
|
field="wardName"
|
||||||
align="center"
|
align="center"
|
||||||
@@ -195,7 +247,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import PatientRegister from './patientRegister.vue';
|
import PatientRegister from './patientRegister.vue';
|
||||||
import {ElMessage, ElMessageBox} from 'element-plus';
|
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 useUserStore from '@/store/modules/user';
|
||||||
import {printAdmissionCertificate, formatDate} from '@/utils/printUtils';
|
import {printAdmissionCertificate, formatDate} from '@/utils/printUtils';
|
||||||
|
|
||||||
@@ -205,6 +257,8 @@ const emits = defineEmits([]);
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const tableRef = ref(null);
|
const tableRef = ref(null);
|
||||||
const selectedRow = ref(null);
|
const selectedRow = ref(null);
|
||||||
|
const dateRange = ref([]);
|
||||||
|
const orgList = ref([]);
|
||||||
const total = ref();
|
const total = ref();
|
||||||
const inHospitalInfo = ref({});
|
const inHospitalInfo = ref({});
|
||||||
const alreadyEdit = ref(true);
|
const alreadyEdit = ref(true);
|
||||||
@@ -334,8 +388,16 @@ const handlePrintCertificate = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getContract();
|
getContract();
|
||||||
|
// 获取入院科室列表
|
||||||
|
function loadOrgList() {
|
||||||
|
getOrgList().then((res) => {
|
||||||
|
orgList.value = res.data || [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getList();
|
getList();
|
||||||
|
loadOrgList();
|
||||||
});
|
});
|
||||||
|
|
||||||
const patientRegisterOK = () => {
|
const patientRegisterOK = () => {
|
||||||
@@ -361,7 +423,12 @@ function resetQuery() {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
registeredFlag: '1',
|
registeredFlag: '1',
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
|
idCard: '',
|
||||||
|
organizationId: '',
|
||||||
|
startTime: '',
|
||||||
|
endTime: '',
|
||||||
};
|
};
|
||||||
|
dateRange.value = [];
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,6 +459,15 @@ const getList = () => {
|
|||||||
queryParams.value.sortField = 'requestTime';
|
queryParams.value.sortField = 'requestTime';
|
||||||
queryParams.value.sortOrder = 'DESC';
|
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;
|
selectedRow.value = null;
|
||||||
if (tableRef.value) {
|
if (tableRef.value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user