Compare commits
3 Commits
8e8b35faa4
...
4b544dc214
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b544dc214 | |||
| 597e621b69 | |||
| 725ac4b76a |
@@ -351,6 +351,10 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
||||||
encounterDiagnosis.setTenantId(tenantId);
|
encounterDiagnosis.setTenantId(tenantId);
|
||||||
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
||||||
|
encounterDiagnosis.setOnsetDate(saveDiagnosisChildParam.getOnsetDate());
|
||||||
|
encounterDiagnosis.setDiagnosisTime(saveDiagnosisChildParam.getDiagnosisTime());
|
||||||
|
encounterDiagnosis.setOnsetDate(saveDiagnosisChildParam.getOnsetDate());
|
||||||
|
encounterDiagnosis.setDiagnosisTime(saveDiagnosisChildParam.getDiagnosisTime());
|
||||||
if(encounterDiagnosis.getCreateBy() == null){
|
if(encounterDiagnosis.getCreateBy() == null){
|
||||||
encounterDiagnosis.setCreateBy(username);
|
encounterDiagnosis.setCreateBy(username);
|
||||||
}
|
}
|
||||||
@@ -377,6 +381,10 @@ public class DoctorStationDiagnosisAppServiceImpl implements IDoctorStationDiagn
|
|||||||
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
encounterDiagnosis.setName(saveDiagnosisChildParam.getName());
|
||||||
encounterDiagnosis.setTenantId(tenantId);
|
encounterDiagnosis.setTenantId(tenantId);
|
||||||
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
encounterDiagnosis.setLongTermFlag(saveDiagnosisChildParam.getLongTermFlag());
|
||||||
|
encounterDiagnosis.setOnsetDate(saveDiagnosisChildParam.getOnsetDate());
|
||||||
|
encounterDiagnosis.setDiagnosisTime(saveDiagnosisChildParam.getDiagnosisTime());
|
||||||
|
encounterDiagnosis.setOnsetDate(saveDiagnosisChildParam.getOnsetDate());
|
||||||
|
encounterDiagnosis.setDiagnosisTime(saveDiagnosisChildParam.getDiagnosisTime());
|
||||||
if(encounterDiagnosis.getCreateBy() == null){
|
if(encounterDiagnosis.getCreateBy() == null){
|
||||||
encounterDiagnosis.setCreateBy(username);
|
encounterDiagnosis.setCreateBy(username);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import com.openhis.common.annotation.Dict;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 诊断查询 dto
|
* 诊断查询 dto
|
||||||
*
|
*
|
||||||
@@ -79,4 +81,14 @@ public class DiagnosisQueryDto {
|
|||||||
*/
|
*/
|
||||||
private String diagnosisDesc;
|
private String diagnosisDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发病日期
|
||||||
|
*/
|
||||||
|
private Date onsetDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断日期
|
||||||
|
*/
|
||||||
|
private Date diagnosisTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,9 @@
|
|||||||
T1.med_type_code,
|
T1.med_type_code,
|
||||||
T1.diagnosis_desc,
|
T1.diagnosis_desc,
|
||||||
T2.verification_status_enum,
|
T2.verification_status_enum,
|
||||||
T2.yb_no
|
T2.yb_no,
|
||||||
|
T1.onset_date AS onsetDate,
|
||||||
|
T1.diagnosis_time AS diagnosisTime
|
||||||
FROM adm_encounter_diagnosis AS T1
|
FROM adm_encounter_diagnosis AS T1
|
||||||
LEFT JOIN cli_condition AS T2 ON T2.ID = T1.condition_id
|
LEFT JOIN cli_condition AS T2 ON T2.ID = T1.condition_id
|
||||||
AND T2.delete_flag = '0' AND T2.tcm_flag = 0
|
AND T2.delete_flag = '0' AND T2.tcm_flag = 0
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import lombok.Data;
|
|||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 就诊诊断管理Entity实体
|
* 就诊诊断管理Entity实体
|
||||||
*
|
*
|
||||||
@@ -86,5 +88,15 @@ public class EncounterDiagnosis extends HisBaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Integer longTermFlag;
|
private Integer longTermFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发病日期
|
||||||
|
*/
|
||||||
|
private Date onsetDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断日期
|
||||||
|
*/
|
||||||
|
private Date diagnosisTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -103,32 +103,45 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="诊断" align="center" prop="name" width="180" :show-overflow-tooltip="true">
|
<el-table-column label="诊断" align="center" prop="name" min-width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name" style="margin-bottom: 0;">
|
<el-form-item :prop="`diagnosisList.${scope.$index}.name`" :rules="rules.name" style="margin-bottom: 0;">
|
||||||
<el-popover
|
<el-popover
|
||||||
:popper-style="{ padding: '0' }"
|
:popper-style="{ padding: '0', width: '600px' }"
|
||||||
placement="bottom-start"
|
placement="bottom-start"
|
||||||
:visible="scope.row.showPopover"
|
:visible="scope.row.showPopover"
|
||||||
trigger="manual"
|
trigger="manual"
|
||||||
:width="800"
|
:show-arrow="false"
|
||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<diagnosislist
|
<div class="diagnosis-popover-container">
|
||||||
:diagnosisSearchkey="diagnosisSearchkey"
|
<div class="diagnosis-popover-header">
|
||||||
@selectDiagnosis="handleSelsectDiagnosis"
|
<span class="diagnosis-popover-title">选择诊断</span>
|
||||||
/>
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
:icon="Close"
|
||||||
|
@click="closeDiagnosisPopover(scope.row)"
|
||||||
|
class="diagnosis-popover-close"
|
||||||
|
>关闭</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="diagnosis-popover-body">
|
||||||
|
<diagnosislist
|
||||||
|
:diagnosisSearchkey="diagnosisSearchkey"
|
||||||
|
@selectDiagnosis="(row) => handleSelectDiagnosis(row, scope.row, scope.$index)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-input
|
<div
|
||||||
v-model="scope.row.name"
|
class="diagnosis-text"
|
||||||
placeholder="请选择诊断"
|
@click="handleFocus(scope.row, scope.$index)"
|
||||||
@input="handleChange"
|
:title="scope.row.name || '点击选择诊断'"
|
||||||
@focus="handleFocus(scope.row, scope.$index)"
|
>
|
||||||
@blur="handleBlur(scope.row)"
|
<span class="diagnosis-text-content">{{ scope.row.name || '点击选择诊断' }}</span>
|
||||||
style="width: 180px"
|
<el-icon class="diagnosis-text-icon"><ArrowDown /></el-icon>
|
||||||
:title="scope.row.name"
|
</div>
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -251,6 +264,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getCurrentInstance} from 'vue';
|
import {getCurrentInstance} from 'vue';
|
||||||
|
import { Close, ArrowDown } from '@element-plus/icons-vue';
|
||||||
import useUserStore from '@/store/modules/user';
|
import useUserStore from '@/store/modules/user';
|
||||||
import {
|
import {
|
||||||
delEncounterDiagnosis,
|
delEncounterDiagnosis,
|
||||||
@@ -721,12 +735,22 @@ function handleChange(value) {
|
|||||||
/**
|
/**
|
||||||
* 选择诊断并赋值到列表
|
* 选择诊断并赋值到列表
|
||||||
*/
|
*/
|
||||||
function handleSelsectDiagnosis(row) {
|
function handleSelectDiagnosis(row, rowData, index) {
|
||||||
console.log(row);
|
console.log('选择诊断:', row);
|
||||||
form.value.diagnosisList[rowIndex.value].ybNo = row.ybNo;
|
rowData.name = row.name;
|
||||||
form.value.diagnosisList[rowIndex.value].name = row.name;
|
rowData.ybNo = row.ybNo;
|
||||||
form.value.diagnosisList[rowIndex.value].definitionId = row.id;
|
rowData.definitionId = row.id;
|
||||||
|
rowData.showPopover = false;
|
||||||
|
emits('diagnosisSave', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭诊断选择弹窗
|
||||||
|
*/
|
||||||
|
function closeDiagnosisPopover(row) {
|
||||||
|
row.showPopover = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**获取焦点时 打开列表 */
|
/**获取焦点时 打开列表 */
|
||||||
function handleFocus(row, index) {
|
function handleFocus(row, index) {
|
||||||
if(row.typeName==='中医诊断'){
|
if(row.typeName==='中医诊断'){
|
||||||
@@ -743,16 +767,16 @@ function handleFocus(row, index) {
|
|||||||
});
|
});
|
||||||
openAddDiagnosisDialog.value = true;
|
openAddDiagnosisDialog.value = true;
|
||||||
}else{
|
}else{
|
||||||
|
// 关闭其他行的弹窗
|
||||||
|
form.value.diagnosisList.forEach((item, idx) => {
|
||||||
|
if (idx !== index) {
|
||||||
|
item.showPopover = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
rowIndex.value = index;
|
rowIndex.value = index;
|
||||||
row.showPopover = true;
|
row.showPopover = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/**失去焦点时 关闭列表 */
|
|
||||||
function handleBlur(row) {
|
|
||||||
row.showPopover = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleNodeClick(data) {
|
function handleNodeClick(data) {
|
||||||
console.log(data.children);
|
console.log(data.children);
|
||||||
// 检查节点是否为根节点
|
// 检查节点是否为根节点
|
||||||
@@ -830,4 +854,89 @@ defineExpose({ getList, getDetail, handleSaveDiagnosis });
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.diagnosis-text {
|
||||||
|
min-height: 32px;
|
||||||
|
line-height: 1.4;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
max-width: 200px;
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text-content {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text-icon {
|
||||||
|
color: #909399;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text:hover .diagnosis-text-icon {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 诊断选择弹窗样式 */
|
||||||
|
.diagnosis-popover-container {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-popover-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-bottom: 1px solid #e4e7ed;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-popover-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-popover-close {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-popover-body {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text:empty::before {
|
||||||
|
content: '点击选择诊断';
|
||||||
|
color: #a8abb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-text:empty::before {
|
||||||
|
content: '请选择诊断';
|
||||||
|
color: #a8abb2;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,21 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="diagnosis-list-container">
|
||||||
|
<div class="diagnosis-search-box">
|
||||||
|
<el-input
|
||||||
|
v-model="searchText"
|
||||||
|
placeholder="输入诊断名称或ICD代码搜索"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="handleSearch"
|
||||||
|
@clear="handleClear"
|
||||||
|
>
|
||||||
|
<template #append>
|
||||||
|
<el-button :icon="Search" @click="handleSearch" />
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="diagnosisDefinitionRef"
|
ref="diagnosisDefinitionRef"
|
||||||
:data="diagnosisDefinitionList"
|
:data="diagnosisDefinitionList"
|
||||||
row-key="patientId"
|
row-key="id"
|
||||||
@cell-click="clickRow"
|
@cell-click="clickRow"
|
||||||
max-height="400"
|
max-height="350"
|
||||||
|
highlight-current-row
|
||||||
|
border
|
||||||
>
|
>
|
||||||
<el-table-column label="诊断名称" align="center" prop="name" />
|
<el-table-column label="诊断名称" align="left" prop="name" min-width="200" show-overflow-tooltip />
|
||||||
<el-table-column label="ICD代码" align="center" prop="ybNo" />
|
<el-table-column label="ICD代码" align="center" prop="ybNo" width="120" />
|
||||||
<el-table-column label="诊断类型" align="center" prop="typeName" width="180"/>
|
<el-table-column label="诊断类型" align="center" prop="typeName" width="100" />
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div class="diagnosis-pagination" v-if="total > queryParams.pageSize">
|
||||||
|
<el-pagination
|
||||||
|
small
|
||||||
|
layout="prev, pager, next"
|
||||||
|
:total="total"
|
||||||
|
:page-size="queryParams.pageSize"
|
||||||
|
:current-page="queryParams.pageNo"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {getDiagnosisDefinitionList} from '../api';
|
import { ref, watch } from 'vue';
|
||||||
|
import { Search } from '@element-plus/icons-vue';
|
||||||
|
import { getDiagnosisDefinitionList } from '../api';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
diagnosisSearchkey: {
|
diagnosisSearchkey: {
|
||||||
@@ -23,36 +50,87 @@ const props = defineProps({
|
|||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['selectDiagnosis']);
|
const emit = defineEmits(['selectDiagnosis']);
|
||||||
|
|
||||||
|
const searchText = ref('');
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageSize: 1000,
|
pageSize: 10,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
// typeCode: 1,
|
|
||||||
});
|
});
|
||||||
const diagnosisDefinitionList = ref([]);
|
const diagnosisDefinitionList = ref([]);
|
||||||
|
|
||||||
|
// 监听外部传入的搜索关键字
|
||||||
watch(
|
watch(
|
||||||
() => props.diagnosisSearchkey,
|
() => props.diagnosisSearchkey,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
searchText.value = newValue;
|
||||||
queryParams.value.searchKey = newValue;
|
queryParams.value.searchKey = newValue;
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
getList();
|
getList();
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
getList();
|
// 获取诊断列表
|
||||||
function getList() {
|
function getList() {
|
||||||
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
getDiagnosisDefinitionList(queryParams.value).then((res) => {
|
||||||
diagnosisDefinitionList.value = res.data.records;
|
diagnosisDefinitionList.value = res.data.records || [];
|
||||||
total.value = res.data.total;
|
total.value = res.data.total || 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 搜索
|
||||||
|
function handleSearch() {
|
||||||
|
queryParams.value.searchKey = searchText.value;
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空搜索
|
||||||
|
function handleClear() {
|
||||||
|
searchText.value = '';
|
||||||
|
queryParams.value.searchKey = '';
|
||||||
|
queryParams.value.pageNo = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页变化
|
||||||
|
function handlePageChange(page) {
|
||||||
|
queryParams.value.pageNo = page;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 点击行选择诊断
|
||||||
function clickRow(row) {
|
function clickRow(row) {
|
||||||
emit('selectDiagnosis', row);
|
emit('selectDiagnosis', row);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
</style>
|
.diagnosis-list-container {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-search-box {
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-bottom: 1px solid #e4e7ed;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.diagnosis-pagination {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-top: 1px solid #e4e7ed;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table__row) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-table__row:hover) {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
16
sql/20260311_add_diagnosis_date_fields.sql
Normal file
16
sql/20260311_add_diagnosis_date_fields.sql
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
-- 为 adm_encounter_diagnosis 表添加发病日期和诊断日期字段
|
||||||
|
-- 执行日期: 2026-03-11
|
||||||
|
-- 问题: 诊断保存后发病日期和诊断日期不显示
|
||||||
|
-- 原因: 数据库表缺少这两个字段
|
||||||
|
|
||||||
|
-- 添加发病日期字段
|
||||||
|
ALTER TABLE public.adm_encounter_diagnosis
|
||||||
|
ADD COLUMN IF NOT EXISTS onset_date date;
|
||||||
|
|
||||||
|
COMMENT ON COLUMN public.adm_encounter_diagnosis.onset_date IS '发病日期';
|
||||||
|
|
||||||
|
-- 添加诊断日期字段
|
||||||
|
ALTER TABLE public.adm_encounter_diagnosis
|
||||||
|
ADD COLUMN IF NOT EXISTS diagnosis_time date;
|
||||||
|
|
||||||
|
COMMENT ON COLUMN public.adm_encounter_diagnosis.diagnosis_time IS '诊断日期';
|
||||||
Reference in New Issue
Block a user