fix(i18n): rename Flyway migration to V111 per naming convention

This commit is contained in:
2026-06-24 12:09:30 +08:00
14 changed files with 190 additions and 111 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="dataSourceStorageLocal" created-in="IU-253.33514.17"> <component name="dataSourceStorageLocal" created-in="IU-253.29346.138">
<data-source name="postgresql@192.168.110.252" uuid="6f44e2a0-c865-4e9f-83bf-d35db0680dc5"> <data-source name="postgresql@192.168.110.252" uuid="6f44e2a0-c865-4e9f-83bf-d35db0680dc5">
<database-info product="PostgreSQL" version="17.6" jdbc-version="4.2" driver-name="PostgreSQL JDBC Driver" driver-version="42.7.3" dbms="POSTGRES" exact-version="17.6" exact-driver-version="42.7"> <database-info product="PostgreSQL" version="17.6" jdbc-version="4.2" driver-name="PostgreSQL JDBC Driver" driver-version="42.7.3" dbms="POSTGRES" exact-version="17.6" exact-driver-version="42.7">
<identifier-quote-string>&quot;</identifier-quote-string> <identifier-quote-string>&quot;</identifier-quote-string>

View File

@@ -176,7 +176,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
children.setQuery(menu.getQuery()); children.setQuery(menu.getQuery());
childrenList.add(children); childrenList.add(children);
router.setChildren(childrenList); router.setChildren(childrenList);
} else if (menu.getParentId().intValue() == 0 && isInnerLink(menu)) { } else if ((menu.getParentId() == null || menu.getParentId() == 0) && isInnerLink(menu)) {
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), false, null, menu.getVisible())); router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), false, null, menu.getVisible()));
router.setPath("/"); router.setPath("/");
List<RouterVo> childrenList = new ArrayList<RouterVo>(); List<RouterVo> childrenList = new ArrayList<RouterVo>();
@@ -524,11 +524,11 @@ public class SysMenuServiceImpl implements ISysMenuService {
public String getRouterPath(SysMenu menu) { public String getRouterPath(SysMenu menu) {
String routerPath = menu.getPath(); String routerPath = menu.getPath();
// 内链打开外网方式 // 内链打开外网方式
if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) { if (menu.getParentId() != null && menu.getParentId() != 0 && isInnerLink(menu)) {
routerPath = innerLinkReplaceEach(routerPath); routerPath = innerLinkReplaceEach(routerPath);
} }
// 非外链并且是一级目录(类型为目录) // 非外链并且是一级目录(类型为目录)
if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) if ((menu.getParentId() == null || menu.getParentId() == 0) && UserConstants.TYPE_DIR.equals(menu.getMenuType())
&& UserConstants.NO_FRAME.equals(menu.getIsFrame())) { && UserConstants.NO_FRAME.equals(menu.getIsFrame())) {
routerPath = "/" + menu.getPath(); routerPath = "/" + menu.getPath();
} }
@@ -549,7 +549,8 @@ public class SysMenuServiceImpl implements ISysMenuService {
String component = UserConstants.LAYOUT; String component = UserConstants.LAYOUT;
if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) { if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) {
component = menu.getComponent(); component = menu.getComponent();
} else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId().intValue() != 0 } else if (StringUtils.isEmpty(menu.getComponent()) && menu.getParentId() != null
&& menu.getParentId() != 0
&& isInnerLink(menu)) { && isInnerLink(menu)) {
component = UserConstants.INNER_LINK; component = UserConstants.INNER_LINK;
} else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) { } else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) {
@@ -565,7 +566,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
* @return 结果 * @return 结果
*/ */
public boolean isMenuFrame(SysMenu menu) { public boolean isMenuFrame(SysMenu menu) {
return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) return (menu.getParentId() == null || menu.getParentId() == 0) && UserConstants.TYPE_MENU.equals(menu.getMenuType())
&& menu.getIsFrame().equals(UserConstants.NO_FRAME); && menu.getIsFrame().equals(UserConstants.NO_FRAME);
} }
@@ -586,7 +587,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
* @return 结果 * @return 结果
*/ */
public boolean isParentView(SysMenu menu) { public boolean isParentView(SysMenu menu) {
return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); return menu.getParentId() != null && menu.getParentId() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType());
} }
/** /**
@@ -634,7 +635,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
Iterator<SysMenu> it = list.iterator(); Iterator<SysMenu> it = list.iterator();
while (it.hasNext()) { while (it.hasNext()) {
SysMenu n = (SysMenu)it.next(); SysMenu n = (SysMenu)it.next();
if (n.getParentId().longValue() == t.getMenuId().longValue()) { if (n.getParentId() != null && n.getParentId().longValue() == t.getMenuId().longValue()) {
tlist.add(n); tlist.add(n);
} }
} }

View File

@@ -236,7 +236,7 @@ public class AdviceBaseDto {
/** /**
* 用药说明 * 用药说明
*/ */
@Dict(dictCode = "dosage_instruction") @Dict(dictCode = "separate_decocting")
private String dosageInstruction; private String dosageInstruction;
private String dosageInstruction_dictText; private String dosageInstruction_dictText;
/* /*

View File

@@ -233,7 +233,7 @@ public class RequestBaseDto {
/** /**
* 用药说明 * 用药说明
*/ */
@Dict(dictCode = "dosage_instruction") @Dict(dictCode = "separate_decocting")
private String dosageInstruction; private String dosageInstruction;
private String dosageInstruction_dictText; private String dosageInstruction_dictText;
@@ -266,4 +266,22 @@ public class RequestBaseDto {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Date stopTime; private Date stopTime;
/**
* 诊断ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long conditionId;
/**
* 诊断定义ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long conditionDefinitionId;
/**
* 就诊诊断ID
*/
@JsonSerialize(using = ToStringSerializer.class)
private Long encounterDiagnosisId;
} }

View File

@@ -196,6 +196,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
List<RegAdviceSaveDto> activityList = regAdviceSaveList.stream() List<RegAdviceSaveDto> activityList = regAdviceSaveList.stream()
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType()) .filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|| ItemType.SURGERY.getValue().equals(e.getAdviceType()) || ItemType.SURGERY.getValue().equals(e.getAdviceType())
|| ItemType.TEXT.getValue().equals(e.getAdviceType())
|| (e.getAdviceType() != null && e.getAdviceType() == 26)) || (e.getAdviceType() != null && e.getAdviceType() == 26))
.collect(Collectors.toList()); .collect(Collectors.toList());
// 耗材 🔧 Bug #147 修复 // 耗材 🔧 Bug #147 修复
@@ -687,7 +688,12 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
longServiceRequest.setRateCode(regAdviceSaveDto.getRateCode()); // 用药频次 longServiceRequest.setRateCode(regAdviceSaveDto.getRateCode()); // 用药频次
longServiceRequest.setCategoryEnum(regAdviceSaveDto.getCategoryEnum()); // 请求类型 longServiceRequest.setCategoryEnum(regAdviceSaveDto.getCategoryEnum()); // 请求类型
longServiceRequest.setTherapyEnum(regAdviceSaveDto.getTherapyEnum()); // 治疗类型,长期(需要前端传) longServiceRequest.setTherapyEnum(regAdviceSaveDto.getTherapyEnum()); // 治疗类型,长期(需要前端传)
longServiceRequest.setActivityId(regAdviceSaveDto.getAdviceDefinitionId());// 诊疗定义id // 文字医嘱(type=8)不走定价体系activityId设置为0L占位
if (ItemType.TEXT.getValue().equals(regAdviceSaveDto.getAdviceType())) {
longServiceRequest.setActivityId(0L);
} else {
longServiceRequest.setActivityId(regAdviceSaveDto.getAdviceDefinitionId());// 诊疗定义id
}
longServiceRequest.setPatientId(regAdviceSaveDto.getPatientId()); // 患者 longServiceRequest.setPatientId(regAdviceSaveDto.getPatientId()); // 患者
longServiceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId()); // 开方医生 longServiceRequest.setRequesterId(regAdviceSaveDto.getPractitionerId()); // 开方医生
longServiceRequest.setEncounterId(regAdviceSaveDto.getEncounterId()); // 就诊id longServiceRequest.setEncounterId(regAdviceSaveDto.getEncounterId()); // 就诊id

View File

@@ -63,6 +63,9 @@
T1.dosage_instruction AS dosage_instruction, T1.dosage_instruction AS dosage_instruction,
T2.part_percent AS part_percent, T2.part_percent AS part_percent,
ccd.name AS condition_definition_name, ccd.name AS condition_definition_name,
T1.condition_id AS condition_id,
cc.definition_id AS condition_definition_id,
T1.encounter_diagnosis_id AS encounter_diagnosis_id,
T4.account_id AS account_id T4.account_id AS account_id
FROM med_medication_request AS T1 FROM med_medication_request AS T1
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id

View File

@@ -348,7 +348,7 @@
filterable filterable
> >
<el-option <el-option
v-for="category in dosage_instruction" v-for="category in separate_decocting"
:key="category.value" :key="category.value"
:label="category.label" :label="category.label"
:value="category.value" :value="category.value"
@@ -971,7 +971,7 @@ const {
ddd_code, ddd_code,
dose_from_code, dose_from_code,
rx_flag, rx_flag,
dosage_instruction, separate_decocting,
chrgitm_lv, chrgitm_lv,
} = proxy.useDict( } = proxy.useDict(
'med_category_code', 'med_category_code',
@@ -987,7 +987,7 @@ const {
'ddd_code', 'ddd_code',
'dose_from_code', 'dose_from_code',
'rx_flag', 'rx_flag',
'dosage_instruction', 'separate_decocting',
'chrgitm_lv' 'chrgitm_lv'
); );

View File

@@ -557,9 +557,10 @@ async function getList() {
return; return;
} }
existingTcmGroups.add(item.syndromeGroupNo); existingTcmGroups.add(item.syndromeGroupNo);
console.log('[diagnosis] getList() 添加中医诊断到表格: illness=', item.name, 'symptom=', tcmRes.data.symptom[index]?.name, 'syndromeGroupNo=', item.syndromeGroupNo); const symptom = tcmRes.data?.symptom?.[index];
const symptomName = symptom?.name || '';
form.value.diagnosisList.push({ form.value.diagnosisList.push({
name: item.name + '-' + tcmRes.data.symptom[index].name, name: item.name + (symptomName ? '-' + symptomName : ''),
diagSrtNo: item.diagSrtNo, diagSrtNo: item.diagSrtNo,
ybNo: item.ybNo, ybNo: item.ybNo,
medTypeCode: item.medTypeCode, medTypeCode: item.medTypeCode,
@@ -567,10 +568,10 @@ async function getList() {
typeName: '中医诊断', typeName: '中医诊断',
classification: '中医', // 中医诊断默认分类 classification: '中医', // 中医诊断默认分类
onsetDate: item.onsetDate, onsetDate: item.onsetDate,
updateId:item.encounterDiagnosisId+'-'+tcmRes.data.symptom[index].encounterDiagnosisId, updateId: item.encounterDiagnosisId + '-' + (symptom?.encounterDiagnosisId || ''),
illnessDefinitionId : item.definitionId, illnessDefinitionId : item.definitionId,
symptomDefinitionId : tcmRes.data.symptom[index].definitionId, symptomDefinitionId : symptom?.definitionId || '',
symptomYbNo: tcmRes.data.symptom[index].ybNo, symptomYbNo: symptom?.ybNo || '',
}); });
}); });
} }

View File

@@ -1861,10 +1861,7 @@ function handleSave() {
ElMessage.warning('请至少选择一个检查明细项目'); ElMessage.warning('请至少选择一个检查明细项目');
return; return;
} }
if (selectedMethods.value.length === 0) { // Bug #675: 移除检查方法强制非空校验,字段非必填时允许空值保存
ElMessage.warning('请选择检查方法');
return;
}
// 从已选项目推导检查类型编码(取第一个项目的 checkType如 CT / ECG / GI // 从已选项目推导检查类型编码(取第一个项目的 checkType如 CT / ECG / GI
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown'; const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
form.examTypeCode = firstCheckType; form.examTypeCode = firstCheckType;

View File

@@ -1,4 +1,4 @@
<template> <template>
<div style="width: 100%; display: flex; flex-direction: column;"> <div style="width: 100%; display: flex; flex-direction: column;">
<div style="margin-bottom: 5px"> <div style="margin-bottom: 5px">
<el-button <el-button
@@ -71,15 +71,15 @@
<span class="descriptions-item-label"> 诊断 </span> <span class="descriptions-item-label"> 诊断 </span>
<el-select <el-select
v-model="conditionDefinitionId" v-model="conditionDefinitionId"
placeholder="诊断" placeholder="请选择诊断"
style="width: 180px" style="width: 180px"
@change="handleDiagnosisChange"
> >
<el-option <el-option
v-for="item in diagnosisList" v-for="item in diagnosisList"
:key="item.conditionId" :key="item.definitionId"
:label="item.name" :label="item.name"
:value="item.definitionId" :value="item.definitionId"
@click="handleDiagnosisChange(item)"
/> />
</el-select> </el-select>
<span class="descriptions-item-label"> 费用性质 </span> <span class="descriptions-item-label"> 费用性质 </span>
@@ -377,12 +377,9 @@
class="required-field" class="required-field"
data-prop="executeNum" data-prop="executeNum"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.executeNum = el)" :ref="(el) => (inputRefs.executeNum = el)"
v-model="scope.row.executeNum" v-model="scope.row.executeNum"
:min="1"
controls-position="right"
:controls="false"
style="width: 70px; margin-right: 20px" style="width: 70px; margin-right: 20px"
@keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.rowIndex)"
/> />
@@ -419,15 +416,12 @@
class="required-field" class="required-field"
data-prop="doseQuantity" data-prop="doseQuantity"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.doseQuantity = el)" :ref="(el) => (inputRefs.doseQuantity = el)"
v-model="scope.row.doseQuantity" v-model="scope.row.doseQuantity"
:min="0"
controls-position="right"
:controls="false"
style="width: 70px" style="width: 70px"
@input="convertValues(scope.row, scope.rowIndex)" @input="convertValues(scope.row, scope.rowIndex)"
@keyup.enter.prevent="handleEnter('doseQuantity', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('doseQuantity', scope.row, scope.rowIndex)"
@change="calculateTotalAmount(scope.row, scope.rowIndex)" @change="calculateTotalAmount(scope.row, scope.rowIndex)"
/> />
</el-form-item> </el-form-item>
@@ -455,11 +449,9 @@
class="required-field" class="required-field"
data-prop="dose" data-prop="dose"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.dose = el)" :ref="(el) => (inputRefs.dose = el)"
v-model="scope.row.dose" v-model="scope.row.dose"
controls-position="right"
:controls="false"
style="width: 70px" style="width: 70px"
@input="convertDoseValues(scope.row, scope.rowIndex)" @input="convertDoseValues(scope.row, scope.rowIndex)"
@keyup.enter.prevent="handleEnter('dose', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('dose', scope.row, scope.rowIndex)"
@@ -548,13 +540,10 @@
class="required-field" class="required-field"
data-prop="dispensePerDuration" data-prop="dispensePerDuration"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.dispensePerDuration = el)" :ref="(el) => (inputRefs.dispensePerDuration = el)"
v-model="scope.row.dispensePerDuration" v-model="scope.row.dispensePerDuration"
style="width: 80px" style="width: 80px"
:min="1"
controls-position="right"
:controls="false"
@input="calculateTotalAmount(scope.row, scope.rowIndex)" @input="calculateTotalAmount(scope.row, scope.rowIndex)"
@change="calculateTotalAmount(scope.row, scope.rowIndex)" @change="calculateTotalAmount(scope.row, scope.rowIndex)"
@keyup.enter.prevent=" @keyup.enter.prevent="
@@ -564,7 +553,7 @@
<template #suffix> <template #suffix>
</template> </template>
</el-input-number> </el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="总量:" label="总量:"
@@ -572,12 +561,10 @@
class="required-field" class="required-field"
data-prop="quantity" data-prop="quantity"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.quantity = el)" :ref="(el) => (inputRefs.quantity = el)"
v-model="scope.row.quantity" v-model="scope.row.quantity"
style="width: 70px" style="width: 70px"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
@input="calculateTotalPrice(scope.row, scope.rowIndex)" @input="calculateTotalPrice(scope.row, scope.rowIndex)"
/> />
@@ -666,13 +653,11 @@
class="required-field" class="required-field"
data-prop="quantity" data-prop="quantity"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.quantity = el)" :ref="(el) => (inputRefs.quantity = el)"
v-model="scope.row.quantity" v-model="scope.row.quantity"
placeholder="数量" placeholder="数量"
style="width: 70px" style="width: 70px"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
@input="calculateTotalAmount(scope.row, scope.rowIndex)" @input="calculateTotalAmount(scope.row, scope.rowIndex)"
/> />
@@ -753,13 +738,11 @@
class="required-field" class="required-field"
data-prop="quantity" data-prop="quantity"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.quantity = el)" :ref="(el) => (inputRefs.quantity = el)"
v-model="scope.row.quantity" v-model="scope.row.quantity"
placeholder="数量" placeholder="数量"
style="width: 70px" style="width: 70px"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
@input="calculateTotalAmount(scope.row, scope.rowIndex)" @input="calculateTotalAmount(scope.row, scope.rowIndex)"
/> />
@@ -848,13 +831,11 @@
class="required-field" class="required-field"
data-prop="quantity" data-prop="quantity"
> >
<el-input-number <el-input
:ref="(el) => (inputRefs.quantity = el)" :ref="(el) => (inputRefs.quantity = el)"
v-model="scope.row.quantity" v-model="scope.row.quantity"
placeholder="执行次数" placeholder="执行次数"
style="width: 100px" style="width: 100px"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)" @keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
@input="calculateTotalPrice(scope.row, scope.rowIndex)" @input="calculateTotalPrice(scope.row, scope.rowIndex)"
/> />
@@ -1323,17 +1304,14 @@
</template> </template>
</vxe-column> </vxe-column>
<vxe-column <vxe-column
title="退回原因" title="备注"
align="center" align="center"
field="reasonText" field="remarks"
width="160" width="160"
> >
<template #default="scope"> <template #default="scope">
<span <span v-if="!scope.row.isEdit">
v-if="!scope.row.isEdit" {{ scope.row.remarks || '-' }}
style="color: #F59E0B;"
>
{{ scope.row.reasonText || '-' }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
@@ -2223,7 +2201,6 @@ function getListInfo(addNewRow) {
// 关键:先等待处方列表数据获取完成 // 关键:先等待处方列表数据获取完成
isAdding.value = false; isAdding.value = false;
const res = await getPrescriptionList(props.patientInfo.encounterId); const res = await getPrescriptionList(props.patientInfo.encounterId);
// 🔧 BugFix: 过滤掉已作废statusEnum=5的会诊医嘱 // 🔧 BugFix: 过滤掉已作废statusEnum=5的会诊医嘱
const filteredData = res.data.filter(item => { const filteredData = res.data.filter(item => {
// 防止 contentJson 为空或 undefined 导致 JSON.parse 报错 // 防止 contentJson 为空或 undefined 导致 JSON.parse 报错
@@ -2332,13 +2309,6 @@ function getDiagnosisInfo() {
encounterDiagnosisId.value = diagnosisInfo[0].encounterDiagnosisId; encounterDiagnosisId.value = diagnosisInfo[0].encounterDiagnosisId;
diagnosisName.value = diagnosisInfo[0].name; diagnosisName.value = diagnosisInfo[0].name;
console.log('getDiagnosisInfo - 已设置主诊断:', diagnosisInfo[0]); console.log('getDiagnosisInfo - 已设置主诊断:', diagnosisInfo[0]);
} else if (diagnosisList.value.length > 0) {
// 如果没有主诊断,使用第一个诊断
conditionDefinitionId.value = diagnosisList.value[0].definitionId;
conditionId.value = diagnosisList.value[0].conditionId;
encounterDiagnosisId.value = diagnosisList.value[0].encounterDiagnosisId;
diagnosisName.value = diagnosisList.value[0].name;
console.log('getDiagnosisInfo - 已设置第一个诊断:', diagnosisList.value[0]);
} }
return res; return res;
}).catch((error) => { }).catch((error) => {
@@ -2466,7 +2436,9 @@ function clickRowDb(row, column, event) {
} }
} }
function handleDiagnosisChange(item) { function handleDiagnosisChange(val) {
const item = diagnosisList.value.find(d => d.definitionId === val);
if (!item) return;
diagnosisName.value = item.name; diagnosisName.value = item.name;
conditionId.value = item.conditionId; conditionId.value = item.conditionId;
encounterDiagnosisId.value = item.encounterDiagnosisId; encounterDiagnosisId.value = item.encounterDiagnosisId;
@@ -2671,15 +2643,15 @@ function selectAdviceBase(key, row) {
const lastExpandedRow = expandedRows[expandedRows.length - 1]; const lastExpandedRow = expandedRows[expandedRows.length - 1];
// 查找doseQuantity输入框优先 // 查找doseQuantity输入框优先
let targetInput = lastExpandedRow.querySelector('[data-prop="doseQuantity"] .el-input-number__inner'); let targetInput = lastExpandedRow.querySelector('[data-prop="doseQuantity"] .el-input__inner');
// 如果没找到,尝试其他方式 // 如果没找到,尝试其他方式
if (!targetInput && row.adviceType == 1) { if (!targetInput && row.adviceType == 1) {
// 西药的情况找第一个el-input-number // 西药的情况找第一个el-input
targetInput = lastExpandedRow.querySelector('.el-input-number__inner'); targetInput = lastExpandedRow.querySelector('.el-input__inner');
} else if (!targetInput) { } else if (!targetInput) {
// 诊疗/耗材的情况找quantity输入框 // 诊疗/耗材的情况找quantity输入框
targetInput = lastExpandedRow.querySelector('[data-prop="quantity"] .el-input-number__inner'); targetInput = lastExpandedRow.querySelector('[data-prop="quantity"] .el-input__inner');
} }
// 最后的备用方案 // 最后的备用方案

View File

@@ -93,13 +93,13 @@
v-model="prescription.conditionDefinitionId" v-model="prescription.conditionDefinitionId"
placeholder="诊断" placeholder="诊断"
style="width: 180px" style="width: 180px"
@change="(val) => handleDiagnosisChange(val, pIndex)"
> >
<el-option <el-option
v-for="item in diagnosisList" v-for="item in diagnosisList"
:key="item.definitionId" :key="item.definitionId"
:label="item.name" :label="item.name"
:value="item.definitionId" :value="item.definitionId"
@click="handleDiagnosisChange(item, pIndex)"
/> />
</el-select> </el-select>
<span class="doctor-station"> 费用性质 </span> <span class="doctor-station"> 费用性质 </span>
@@ -288,7 +288,7 @@
placeholder=" " placeholder=" "
> >
<template <template
v-for="item in dosage_instruction" v-for="item in separate_decocting"
:key="item.value" :key="item.value"
> >
<el-option <el-option
@@ -514,6 +514,7 @@ import {
getOrgTree, getOrgTree,
getTcmAdviceList, getTcmAdviceList,
getTcmDiagnosis, getTcmDiagnosis,
getEncounterDiagnosis,
savePrescription, savePrescription,
saveTcmAdvice, saveTcmAdvice,
signOutTcmAdvice, signOutTcmAdvice,
@@ -601,13 +602,13 @@ const inputRefs = ref({});
const requiredProps = ref([]); // 存储必填项 prop 顺序 const requiredProps = ref([]); // 存储必填项 prop 顺序
const totalAmount = ref(0); const totalAmount = ref(0);
const tcmDianosis = ref(); const tcmDianosis = ref();
const { method_code, unit_code, rate_code, distribution_category_code, dosage_instruction, method_of_decocting_medicine } = const { method_code, unit_code, rate_code, distribution_category_code, separate_decocting, method_of_decocting_medicine } =
proxy.useDict( proxy.useDict(
'method_code', 'method_code',
'unit_code', 'unit_code',
'rate_code', 'rate_code',
'distribution_category_code', 'distribution_category_code',
'dosage_instruction', 'separate_decocting',
'method_of_decocting_medicine' 'method_of_decocting_medicine'
); );
@@ -718,6 +719,18 @@ async function getListInfo(addNewRow) {
if (firstItem.dosageInstruction !== undefined && firstItem.dosageInstruction !== null) { if (firstItem.dosageInstruction !== undefined && firstItem.dosageInstruction !== null) {
prescription.dosageInstruction = firstItem.dosageInstruction; prescription.dosageInstruction = firstItem.dosageInstruction;
} }
if (firstItem.conditionDefinitionId !== undefined && firstItem.conditionDefinitionId !== null) {
prescription.conditionDefinitionId = firstItem.conditionDefinitionId;
}
if (firstItem.conditionId !== undefined && firstItem.conditionId !== null) {
prescription.conditionId = firstItem.conditionId;
}
if (firstItem.encounterDiagnosisId !== undefined && firstItem.encounterDiagnosisId !== null) {
prescription.encounterDiagnosisId = firstItem.encounterDiagnosisId;
}
if (firstItem.conditionDefinitionName !== undefined && firstItem.conditionDefinitionName !== null) {
prescription.diagnosisName = firstItem.conditionDefinitionName;
}
} }
return prescription; return prescription;
@@ -755,6 +768,7 @@ async function getListInfo(addNewRow) {
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId); tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
accountId.value = props.patientInfo.accountId; accountId.value = props.patientInfo.accountId;
getDiagnosisInfo();
} }
function getDiagnosisInfo() { function getDiagnosisInfo() {
@@ -766,29 +780,60 @@ function getDiagnosisInfo() {
} }
diagnosisList.value = []; diagnosisList.value = [];
console.log('【中医诊断】调用API,encounterId:', props.patientInfo.encounterId) console.log('【中医诊断】开始获取就诊诊断, encounterId:', props.patientInfo.encounterId)
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
if (res.data.illness.length > 0) { // 同时获取中医就诊诊断和西医就诊诊断
res.data.illness.forEach((item, index) => { const p1 = getTcmDiagnosis({ encounterId: props.patientInfo.encounterId });
diagnosisList.value.push({ const p2 = getEncounterDiagnosis(props.patientInfo.encounterId);
name: item.name + '-' + res.data.symptom[index].name,
Promise.all([p1, p2]).then(([tcmRes, westernRes]) => {
const mergedList = [];
// 1. 解析中医诊断
if (tcmRes && tcmRes.data && tcmRes.data.illness && tcmRes.data.illness.length > 0) {
const symptomList = tcmRes.data.symptom || [];
tcmRes.data.illness.forEach((item, index) => {
const symptomName = symptomList[index]?.name || '';
mergedList.push({
name: item.name + (symptomName ? '-' + symptomName : '') + ' (中医)',
definitionId: item.definitionId, definitionId: item.definitionId,
encounterDiagnosisId: item.encounterDiagnosisId, encounterDiagnosisId: item.encounterDiagnosisId,
conditionId: item.conditionId, conditionId: item.conditionId,
}); });
}); });
} }
console.log('【中医诊断】获取数据成功,诊断数量:', diagnosisList.value.length)
// 默认选择第一个诊断 // 2. 解析西医诊断
if (diagnosisList.value.length > 0) { const westernData = westernRes?.data || westernRes || [];
const firstDiagnosis = diagnosisList.value[0]; if (Array.isArray(westernData) && westernData.length > 0) {
tcmPrescriptionList.value.forEach((prescription) => { westernData.forEach((item) => {
prescription.diagnosisName = firstDiagnosis.name; mergedList.push({
prescription.conditionId = firstDiagnosis.conditionId; name: item.name + ' (西医)',
prescription.encounterDiagnosisId = firstDiagnosis.encounterDiagnosisId; definitionId: item.definitionId,
prescription.conditionDefinitionId = firstDiagnosis.definitionId; encounterDiagnosisId: item.encounterDiagnosisId,
conditionId: item.conditionId,
});
}); });
} }
diagnosisList.value = mergedList;
console.log('【中医诊断】获取数据成功,总诊断数量:', diagnosisList.value.length)
// 默认选择第一个诊断 (仅当没有选择或原本选择的值不在列表中时)
if (diagnosisList.value.length > 0) {
tcmPrescriptionList.value.forEach((prescription) => {
const exists = diagnosisList.value.some(d => d.definitionId === prescription.conditionDefinitionId);
if (!exists || !prescription.conditionDefinitionId) {
const firstDiagnosis = diagnosisList.value[0];
prescription.diagnosisName = firstDiagnosis.name;
prescription.conditionId = firstDiagnosis.conditionId;
prescription.encounterDiagnosisId = firstDiagnosis.encounterDiagnosisId;
prescription.conditionDefinitionId = firstDiagnosis.definitionId;
}
});
}
}).catch(err => {
console.error('【中医诊断】获取诊断信息失败:', err);
}); });
} }
@@ -852,7 +897,9 @@ function clickRowDb(row, pIndex) {
} }
} }
function handleDiagnosisChange(item, pIndex) { function handleDiagnosisChange(val, pIndex) {
const item = diagnosisList.value.find(d => d.definitionId === val);
if (!item) return;
const prescription = tcmPrescriptionList.value[pIndex]; const prescription = tcmPrescriptionList.value[pIndex];
prescription.diagnosisName = item.name; prescription.diagnosisName = item.name;
prescription.conditionId = item.conditionId; prescription.conditionId = item.conditionId;

View File

@@ -718,6 +718,7 @@ function handleClick(tab) {
diagnosisRef.value.getDetail(patientInfo.value.encounterId); diagnosisRef.value.getDetail(patientInfo.value.encounterId);
break; break;
case 'prescription': case 'prescription':
prescriptionRef.value.getListInfo();
prescriptionRef.value.getDiagnosisInfo(); prescriptionRef.value.getDiagnosisInfo();
break; break;
case 'tcm': case 'tcm':
@@ -848,7 +849,7 @@ function handleCardClick(item, index) {
updatePatientInfo(item); updatePatientInfo(item);
activeTab.value = 'hospitalizationEmr'; activeTab.value = 'hospitalizationEmr';
nextTick(() => { nextTick(() => {
prescriptionRef.value.getListInfo(); // 医嘱数据改为切换到对应tab时才加载
tcmRef.value.getListInfo(); tcmRef.value.getListInfo();
inspectionRef.value.getList(); inspectionRef.value.getList();
if(examinationRef.value) examinationRef.value.getList(); if(examinationRef.value) examinationRef.value.getList();

View File

@@ -274,11 +274,11 @@
filterable filterable
clearable clearable
style="width: 100%" style="width: 100%"
@focus="loadSyndromeOptions(scope.row.ybNo)" @focus="loadSyndromeOptions(scope.row)"
@change="(val) => handleSyndromeSelect(val, scope.row)" @change="(val) => handleSyndromeSelect(val, scope.row)"
> >
<el-option <el-option
v-for="item in syndromeOptions" v-for="item in (scope.row.syndromeOptions || [])"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@@ -547,6 +547,7 @@ function getList() {
syndromeGroupNo: '', syndromeGroupNo: '',
showPopover: false, showPopover: false,
diagnosisTime: formatDisplayDate(item.diagnosisTime), diagnosisTime: formatDisplayDate(item.diagnosisTime),
syndromeOptions: []
}; };
if (obj.diagSrtNo == null) { if (obj.diagSrtNo == null) {
obj.diagSrtNo = 1; obj.diagSrtNo = 1;
@@ -566,6 +567,9 @@ function getList() {
diagnosisNetDatas.value = res.data.illness; diagnosisNetDatas.value = res.data.illness;
const newList = []; const newList = [];
res.data.illness.forEach((item, index) => { res.data.illness.forEach((item, index) => {
const syndromeCode = res.data.symptom[index]?.ybNo || '';
const syndromeName = res.data.symptom[index]?.name || '';
const syndromeId = res.data.symptom[index]?.definitionId || '';
newList.push({ newList.push({
conditionId: item.conditionId || '', conditionId: item.conditionId || '',
encounterDiagnosisId: item.encounterDiagnosisId || '', encounterDiagnosisId: item.encounterDiagnosisId || '',
@@ -575,9 +579,10 @@ function getList() {
ybNo: item.ybNo, ybNo: item.ybNo,
definitionId: item.definitionId || '', definitionId: item.definitionId || '',
diagnosisSystem: '中医', diagnosisSystem: '中医',
tcmSyndromeCode: res.data.symptom[index]?.ybNo || '', tcmSyndromeCode: syndromeCode,
tcmSyndromeName: res.data.symptom[index]?.name || '', tcmSyndromeName: syndromeName,
syndromeDefinitionId: res.data.symptom[index]?.definitionId || '', syndromeDefinitionId: syndromeId,
syndromeOptions: syndromeCode ? [{ value: syndromeCode, label: syndromeName, id: syndromeId }] : [],
diagSrtNo: item.diagSrtNo, diagSrtNo: item.diagSrtNo,
medTypeCode: item.medTypeCode, medTypeCode: item.medTypeCode,
maindiseFlag: item.maindiseFlag, maindiseFlag: item.maindiseFlag,
@@ -793,6 +798,7 @@ function addDiagnosisItem() {
tcmSyndromeName: '', tcmSyndromeName: '',
syndromeDefinitionId: '', syndromeDefinitionId: '',
syndromeGroupNo: '', syndromeGroupNo: '',
syndromeOptions: [],
verificationStatusEnum: 4, verificationStatusEnum: 4,
medTypeCode: undefined, medTypeCode: undefined,
diagSrtNo: form.value.diagnosisList.length + 1, diagSrtNo: form.value.diagnosisList.length + 1,
@@ -825,17 +831,18 @@ function handleDiagnosisSystemChange(row) {
} }
// 加载中医证候选项(按诊断名称关联过滤) // 加载中医证候选项(按诊断名称关联过滤)
function loadSyndromeOptions(conditionCode) { function loadSyndromeOptions(row) {
const conditionCode = row.ybNo;
const params = conditionCode ? { conditionCode } : {}; const params = conditionCode ? { conditionCode } : {};
getTcmSyndrome(params).then((res) => { getTcmSyndrome(params).then((res) => {
if (res.data && res.data.records) { if (res.data && res.data.records) {
syndromeOptions.value = res.data.records.map((item) => ({ row.syndromeOptions = res.data.records.map((item) => ({
value: item.ybNo, value: item.ybNo,
label: item.name, label: item.name,
id: item.id, id: item.id,
})); }));
} else { } else {
syndromeOptions.value = []; row.syndromeOptions = [];
} }
}); });
} }
@@ -843,7 +850,7 @@ function loadSyndromeOptions(conditionCode) {
// 中医证候选中赋值 // 中医证候选中赋值
function handleSyndromeSelect(val, row) { function handleSyndromeSelect(val, row) {
if (val) { if (val) {
const selected = syndromeOptions.value.find((item) => item.value === val); const selected = (row.syndromeOptions || []).find((item) => item.value === val);
row.tcmSyndromeName = selected ? selected.label : ''; row.tcmSyndromeName = selected ? selected.label : '';
row.syndromeDefinitionId = selected ? selected.id : ''; row.syndromeDefinitionId = selected ? selected.id : '';
} else { } else {
@@ -1166,6 +1173,7 @@ function handleNodeClick(data) {
tcmSyndromeName: '', tcmSyndromeName: '',
syndromeDefinitionId: '', syndromeDefinitionId: '',
syndromeGroupNo: '', syndromeGroupNo: '',
syndromeOptions: [],
verificationStatusEnum: 4, verificationStatusEnum: 4,
medTypeCode: undefined, medTypeCode: undefined,
diagSrtNo: form.value.diagnosisList.length + 1, diagSrtNo: form.value.diagnosisList.length + 1,

View File

@@ -811,6 +811,7 @@ const popoverJustClosedByKey = ref(null);
// 医嘱检索下拉浮框对齐:跟踪表格水平滚动偏移与主体区域边界限制 // 医嘱检索下拉浮框对齐:跟踪表格水平滚动偏移与主体区域边界限制
const tableScrollLeft = ref(0); const tableScrollLeft = ref(0);
const scrollLeftAtOpen = ref(0);
const mainBoundary = ref(null); const mainBoundary = ref(null);
const advicePopperWidth = computed(() => { const advicePopperWidth = computed(() => {
// 取主体区域宽度与 900px 中较小值,避免小屏幕溢出;下限 500px // 取主体区域宽度与 900px 中较小值,避免小屏幕溢出;下限 500px
@@ -819,15 +820,17 @@ const advicePopperWidth = computed(() => {
}); });
const advicePopperStyle = computed(() => ({ const advicePopperStyle = computed(() => ({
padding: '0', padding: '0',
marginLeft: `-${tableScrollLeft.value}px`, marginLeft: `-${tableScrollLeft.value - scrollLeftAtOpen.value}px`,
})); }));
const advicePopperOptions = computed(() => ({ const advicePopperOptions = computed(() => ({
modifiers: [ modifiers: [
{ {
name: 'preventOverflow', name: 'preventOverflow',
options: { enabled: false,
boundary: mainBoundary.value || 'viewport', },
}, {
name: 'flip',
enabled: false,
}, },
], ],
})); }));
@@ -1066,6 +1069,12 @@ function refresh() {
} }
// 获取列表信息 // 获取列表信息
function getListInfo(addNewRow) { function getListInfo(addNewRow) {
if (!localPatient.value || !localPatient.value.encounterId) {
loading.value = false;
prescriptionList.value = [];
isCategoryLoaded.value = false;
return;
}
loading.value = true; loading.value = true;
isAdding.value = false; isAdding.value = false;
collapseAllExpanded(); collapseAllExpanded();
@@ -1229,6 +1238,10 @@ const filterPrescriptionList = computed(() => {
}); });
function getDiagnosisInfo() { function getDiagnosisInfo() {
if (!localPatient.value || !localPatient.value.encounterId) {
diagnosisList.value = [];
return;
}
getEncounterDiagnosis(localPatient.value.encounterId).then((res) => { getEncounterDiagnosis(localPatient.value.encounterId).then((res) => {
diagnosisList.value = res.data; diagnosisList.value = res.data;
let diagnosisInfo = diagnosisList.value.filter((item) => { let diagnosisInfo = diagnosisList.value.filter((item) => {
@@ -1477,6 +1490,10 @@ function handleFocus(row, index) {
const scrollWrapper = document.querySelector('.vxe-table--body-wrapper'); const scrollWrapper = document.querySelector('.vxe-table--body-wrapper');
if (scrollWrapper) { if (scrollWrapper) {
tableScrollLeft.value = scrollWrapper.scrollLeft || 0; tableScrollLeft.value = scrollWrapper.scrollLeft || 0;
scrollLeftAtOpen.value = scrollWrapper.scrollLeft || 0;
} else {
tableScrollLeft.value = 0;
scrollLeftAtOpen.value = 0;
} }
// 文字医嘱(type=8)不弹药品搜索框,直接展开填写面板 // 文字医嘱(type=8)不弹药品搜索框,直接展开填写面板
const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType; const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
@@ -1531,6 +1548,14 @@ function handleChange(value, row, index) {
adviceQueryParams.value.searchKey = value; adviceQueryParams.value.searchKey = value;
// popover 被 blur 关闭后,用户继续输入时自行打开 // popover 被 blur 关闭后,用户继续输入时自行打开
if (!row.showPopover) { if (!row.showPopover) {
const scrollWrapper = document.querySelector('.vxe-table--body-wrapper');
if (scrollWrapper) {
tableScrollLeft.value = scrollWrapper.scrollLeft || 0;
scrollLeftAtOpen.value = scrollWrapper.scrollLeft || 0;
} else {
tableScrollLeft.value = 0;
scrollLeftAtOpen.value = 0;
}
row.showPopover = true; row.showPopover = true;
} }
const tableRef = getAdviceTableRef(); const tableRef = getAdviceTableRef();