fix(i18n): rename Flyway migration to V111 per naming convention
This commit is contained in:
2
.idea/dataSources.local.xml
generated
2
.idea/dataSources.local.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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">
|
||||
<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>"</identifier-quote-string>
|
||||
|
||||
@@ -176,7 +176,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
children.setQuery(menu.getQuery());
|
||||
childrenList.add(children);
|
||||
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.setPath("/");
|
||||
List<RouterVo> childrenList = new ArrayList<RouterVo>();
|
||||
@@ -524,11 +524,11 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
public String getRouterPath(SysMenu menu) {
|
||||
String routerPath = menu.getPath();
|
||||
// 内链打开外网方式
|
||||
if (menu.getParentId().intValue() != 0 && isInnerLink(menu)) {
|
||||
if (menu.getParentId() != null && menu.getParentId() != 0 && isInnerLink(menu)) {
|
||||
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())) {
|
||||
routerPath = "/" + menu.getPath();
|
||||
}
|
||||
@@ -549,7 +549,8 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
String component = UserConstants.LAYOUT;
|
||||
if (StringUtils.isNotEmpty(menu.getComponent()) && !isMenuFrame(menu)) {
|
||||
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)) {
|
||||
component = UserConstants.INNER_LINK;
|
||||
} else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) {
|
||||
@@ -565,7 +566,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
* @return 结果
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -586,7 +587,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
* @return 结果
|
||||
*/
|
||||
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();
|
||||
while (it.hasNext()) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class AdviceBaseDto {
|
||||
/**
|
||||
* 用药说明
|
||||
*/
|
||||
@Dict(dictCode = "dosage_instruction")
|
||||
@Dict(dictCode = "separate_decocting")
|
||||
private String dosageInstruction;
|
||||
private String dosageInstruction_dictText;
|
||||
/*
|
||||
|
||||
@@ -233,7 +233,7 @@ public class RequestBaseDto {
|
||||
/**
|
||||
* 用药说明
|
||||
*/
|
||||
@Dict(dictCode = "dosage_instruction")
|
||||
@Dict(dictCode = "separate_decocting")
|
||||
private String dosageInstruction;
|
||||
private String dosageInstruction_dictText;
|
||||
|
||||
@@ -266,4 +266,22 @@ public class RequestBaseDto {
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
@@ -196,6 +196,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
List<RegAdviceSaveDto> activityList = regAdviceSaveList.stream()
|
||||
.filter(e -> ItemType.ACTIVITY.getValue().equals(e.getAdviceType())
|
||||
|| ItemType.SURGERY.getValue().equals(e.getAdviceType())
|
||||
|| ItemType.TEXT.getValue().equals(e.getAdviceType())
|
||||
|| (e.getAdviceType() != null && e.getAdviceType() == 26))
|
||||
.collect(Collectors.toList());
|
||||
// 耗材 🔧 Bug #147 修复
|
||||
@@ -687,7 +688,12 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
longServiceRequest.setRateCode(regAdviceSaveDto.getRateCode()); // 用药频次
|
||||
longServiceRequest.setCategoryEnum(regAdviceSaveDto.getCategoryEnum()); // 请求类型
|
||||
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.setRequesterId(regAdviceSaveDto.getPractitionerId()); // 开方医生
|
||||
longServiceRequest.setEncounterId(regAdviceSaveDto.getEncounterId()); // 就诊id
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
T1.dosage_instruction AS dosage_instruction,
|
||||
T2.part_percent AS part_percent,
|
||||
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
|
||||
FROM med_medication_request AS T1
|
||||
LEFT JOIN med_medication_definition AS T2 ON T2.ID = T1.medication_id
|
||||
|
||||
@@ -348,7 +348,7 @@
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="category in dosage_instruction"
|
||||
v-for="category in separate_decocting"
|
||||
:key="category.value"
|
||||
:label="category.label"
|
||||
:value="category.value"
|
||||
@@ -971,7 +971,7 @@ const {
|
||||
ddd_code,
|
||||
dose_from_code,
|
||||
rx_flag,
|
||||
dosage_instruction,
|
||||
separate_decocting,
|
||||
chrgitm_lv,
|
||||
} = proxy.useDict(
|
||||
'med_category_code',
|
||||
@@ -987,7 +987,7 @@ const {
|
||||
'ddd_code',
|
||||
'dose_from_code',
|
||||
'rx_flag',
|
||||
'dosage_instruction',
|
||||
'separate_decocting',
|
||||
'chrgitm_lv'
|
||||
);
|
||||
|
||||
|
||||
@@ -557,9 +557,10 @@ async function getList() {
|
||||
return;
|
||||
}
|
||||
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({
|
||||
name: item.name + '-' + tcmRes.data.symptom[index].name,
|
||||
name: item.name + (symptomName ? '-' + symptomName : ''),
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
ybNo: item.ybNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
@@ -567,10 +568,10 @@ async function getList() {
|
||||
typeName: '中医诊断',
|
||||
classification: '中医', // 中医诊断默认分类
|
||||
onsetDate: item.onsetDate,
|
||||
updateId:item.encounterDiagnosisId+'-'+tcmRes.data.symptom[index].encounterDiagnosisId,
|
||||
updateId: item.encounterDiagnosisId + '-' + (symptom?.encounterDiagnosisId || ''),
|
||||
illnessDefinitionId : item.definitionId,
|
||||
symptomDefinitionId : tcmRes.data.symptom[index].definitionId,
|
||||
symptomYbNo: tcmRes.data.symptom[index].ybNo,
|
||||
symptomDefinitionId : symptom?.definitionId || '',
|
||||
symptomYbNo: symptom?.ybNo || '',
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1861,10 +1861,7 @@ function handleSave() {
|
||||
ElMessage.warning('请至少选择一个检查明细项目');
|
||||
return;
|
||||
}
|
||||
if (selectedMethods.value.length === 0) {
|
||||
ElMessage.warning('请选择检查方法');
|
||||
return;
|
||||
}
|
||||
// Bug #675: 移除检查方法强制非空校验,字段非必填时允许空值保存
|
||||
// 从已选项目推导检查类型编码(取第一个项目的 checkType,如 CT / ECG / GI)
|
||||
const firstCheckType = selectedItems.value[0]?.checkType || 'unknown';
|
||||
form.examTypeCode = firstCheckType;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div style="width: 100%; display: flex; flex-direction: column;">
|
||||
<div style="margin-bottom: 5px">
|
||||
<el-button
|
||||
@@ -71,15 +71,15 @@
|
||||
<span class="descriptions-item-label"> 诊断: </span>
|
||||
<el-select
|
||||
v-model="conditionDefinitionId"
|
||||
placeholder="诊断"
|
||||
placeholder="请选择诊断"
|
||||
style="width: 180px"
|
||||
@change="handleDiagnosisChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisList"
|
||||
:key="item.conditionId"
|
||||
:key="item.definitionId"
|
||||
:label="item.name"
|
||||
:value="item.definitionId"
|
||||
@click="handleDiagnosisChange(item)"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="descriptions-item-label"> 费用性质: </span>
|
||||
@@ -377,12 +377,9 @@
|
||||
class="required-field"
|
||||
data-prop="executeNum"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.executeNum = el)"
|
||||
v-model="scope.row.executeNum"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 70px; margin-right: 20px"
|
||||
@keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.rowIndex)"
|
||||
/>
|
||||
@@ -419,15 +416,12 @@
|
||||
class="required-field"
|
||||
data-prop="doseQuantity"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.doseQuantity = el)"
|
||||
v-model="scope.row.doseQuantity"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 70px"
|
||||
@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)"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -455,11 +449,9 @@
|
||||
class="required-field"
|
||||
data-prop="dose"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.dose = el)"
|
||||
v-model="scope.row.dose"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
style="width: 70px"
|
||||
@input="convertDoseValues(scope.row, scope.rowIndex)"
|
||||
@keyup.enter.prevent="handleEnter('dose', scope.row, scope.rowIndex)"
|
||||
@@ -548,13 +540,10 @@
|
||||
class="required-field"
|
||||
data-prop="dispensePerDuration"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.dispensePerDuration = el)"
|
||||
v-model="scope.row.dispensePerDuration"
|
||||
style="width: 80px"
|
||||
:min="1"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@input="calculateTotalAmount(scope.row, scope.rowIndex)"
|
||||
@change="calculateTotalAmount(scope.row, scope.rowIndex)"
|
||||
@keyup.enter.prevent="
|
||||
@@ -564,7 +553,7 @@
|
||||
<template #suffix>
|
||||
天
|
||||
</template>
|
||||
</el-input-number>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="总量:"
|
||||
@@ -572,12 +561,10 @@
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.quantity = el)"
|
||||
v-model="scope.row.quantity"
|
||||
style="width: 70px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
|
||||
@input="calculateTotalPrice(scope.row, scope.rowIndex)"
|
||||
/>
|
||||
@@ -666,13 +653,11 @@
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.quantity = el)"
|
||||
v-model="scope.row.quantity"
|
||||
placeholder="数量"
|
||||
style="width: 70px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
|
||||
@input="calculateTotalAmount(scope.row, scope.rowIndex)"
|
||||
/>
|
||||
@@ -753,13 +738,11 @@
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.quantity = el)"
|
||||
v-model="scope.row.quantity"
|
||||
placeholder="数量"
|
||||
style="width: 70px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
|
||||
@input="calculateTotalAmount(scope.row, scope.rowIndex)"
|
||||
/>
|
||||
@@ -848,13 +831,11 @@
|
||||
class="required-field"
|
||||
data-prop="quantity"
|
||||
>
|
||||
<el-input-number
|
||||
<el-input
|
||||
:ref="(el) => (inputRefs.quantity = el)"
|
||||
v-model="scope.row.quantity"
|
||||
placeholder="执行次数"
|
||||
style="width: 100px"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.rowIndex)"
|
||||
@input="calculateTotalPrice(scope.row, scope.rowIndex)"
|
||||
/>
|
||||
@@ -1323,17 +1304,14 @@
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
title="退回原因"
|
||||
title="备注"
|
||||
align="center"
|
||||
field="reasonText"
|
||||
field="remarks"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="!scope.row.isEdit"
|
||||
style="color: #F59E0B;"
|
||||
>
|
||||
{{ scope.row.reasonText || '-' }}
|
||||
<span v-if="!scope.row.isEdit">
|
||||
{{ scope.row.remarks || '-' }}
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -2223,7 +2201,6 @@ function getListInfo(addNewRow) {
|
||||
// 关键:先等待处方列表数据获取完成
|
||||
isAdding.value = false;
|
||||
const res = await getPrescriptionList(props.patientInfo.encounterId);
|
||||
|
||||
// 🔧 BugFix: 过滤掉已作废(statusEnum=5)的会诊医嘱
|
||||
const filteredData = res.data.filter(item => {
|
||||
// 防止 contentJson 为空或 undefined 导致 JSON.parse 报错
|
||||
@@ -2332,13 +2309,6 @@ function getDiagnosisInfo() {
|
||||
encounterDiagnosisId.value = diagnosisInfo[0].encounterDiagnosisId;
|
||||
diagnosisName.value = diagnosisInfo[0].name;
|
||||
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;
|
||||
}).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;
|
||||
conditionId.value = item.conditionId;
|
||||
encounterDiagnosisId.value = item.encounterDiagnosisId;
|
||||
@@ -2671,15 +2643,15 @@ function selectAdviceBase(key, row) {
|
||||
const lastExpandedRow = expandedRows[expandedRows.length - 1];
|
||||
|
||||
// 查找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) {
|
||||
// 西药的情况:找第一个el-input-number
|
||||
targetInput = lastExpandedRow.querySelector('.el-input-number__inner');
|
||||
// 西药的情况:找第一个el-input
|
||||
targetInput = lastExpandedRow.querySelector('.el-input__inner');
|
||||
} else if (!targetInput) {
|
||||
// 诊疗/耗材的情况:找quantity输入框
|
||||
targetInput = lastExpandedRow.querySelector('[data-prop="quantity"] .el-input-number__inner');
|
||||
targetInput = lastExpandedRow.querySelector('[data-prop="quantity"] .el-input__inner');
|
||||
}
|
||||
|
||||
// 最后的备用方案
|
||||
|
||||
@@ -93,13 +93,13 @@
|
||||
v-model="prescription.conditionDefinitionId"
|
||||
placeholder="诊断"
|
||||
style="width: 180px"
|
||||
@change="(val) => handleDiagnosisChange(val, pIndex)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in diagnosisList"
|
||||
:key="item.definitionId"
|
||||
:label="item.name"
|
||||
:value="item.definitionId"
|
||||
@click="handleDiagnosisChange(item, pIndex)"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="doctor-station"> 费用性质: </span>
|
||||
@@ -288,7 +288,7 @@
|
||||
placeholder=" "
|
||||
>
|
||||
<template
|
||||
v-for="item in dosage_instruction"
|
||||
v-for="item in separate_decocting"
|
||||
:key="item.value"
|
||||
>
|
||||
<el-option
|
||||
@@ -514,6 +514,7 @@ import {
|
||||
getOrgTree,
|
||||
getTcmAdviceList,
|
||||
getTcmDiagnosis,
|
||||
getEncounterDiagnosis,
|
||||
savePrescription,
|
||||
saveTcmAdvice,
|
||||
signOutTcmAdvice,
|
||||
@@ -601,13 +602,13 @@ const inputRefs = ref({});
|
||||
const requiredProps = ref([]); // 存储必填项 prop 顺序
|
||||
const totalAmount = ref(0);
|
||||
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(
|
||||
'method_code',
|
||||
'unit_code',
|
||||
'rate_code',
|
||||
'distribution_category_code',
|
||||
'dosage_instruction',
|
||||
'separate_decocting',
|
||||
'method_of_decocting_medicine'
|
||||
);
|
||||
|
||||
@@ -718,6 +719,18 @@ async function getListInfo(addNewRow) {
|
||||
if (firstItem.dosageInstruction !== undefined && firstItem.dosageInstruction !== null) {
|
||||
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;
|
||||
@@ -755,6 +768,7 @@ async function getListInfo(addNewRow) {
|
||||
|
||||
tcmDiagnosisList.value = getFromDiagnosis(props.patientInfo.encounterId);
|
||||
accountId.value = props.patientInfo.accountId;
|
||||
getDiagnosisInfo();
|
||||
}
|
||||
|
||||
function getDiagnosisInfo() {
|
||||
@@ -766,29 +780,60 @@ function getDiagnosisInfo() {
|
||||
}
|
||||
|
||||
diagnosisList.value = [];
|
||||
console.log('【中医诊断】调用API,encounterId:', props.patientInfo.encounterId)
|
||||
getTcmDiagnosis({ encounterId: props.patientInfo.encounterId }).then((res) => {
|
||||
if (res.data.illness.length > 0) {
|
||||
res.data.illness.forEach((item, index) => {
|
||||
diagnosisList.value.push({
|
||||
name: item.name + '-' + res.data.symptom[index].name,
|
||||
console.log('【中医诊断】开始获取就诊诊断, encounterId:', props.patientInfo.encounterId)
|
||||
|
||||
// 同时获取中医就诊诊断和西医就诊诊断
|
||||
const p1 = getTcmDiagnosis({ encounterId: props.patientInfo.encounterId });
|
||||
const p2 = getEncounterDiagnosis(props.patientInfo.encounterId);
|
||||
|
||||
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,
|
||||
encounterDiagnosisId: item.encounterDiagnosisId,
|
||||
conditionId: item.conditionId,
|
||||
});
|
||||
});
|
||||
}
|
||||
console.log('【中医诊断】获取数据成功,诊断数量:', diagnosisList.value.length)
|
||||
// 默认选择第一个诊断
|
||||
if (diagnosisList.value.length > 0) {
|
||||
const firstDiagnosis = diagnosisList.value[0];
|
||||
tcmPrescriptionList.value.forEach((prescription) => {
|
||||
prescription.diagnosisName = firstDiagnosis.name;
|
||||
prescription.conditionId = firstDiagnosis.conditionId;
|
||||
prescription.encounterDiagnosisId = firstDiagnosis.encounterDiagnosisId;
|
||||
prescription.conditionDefinitionId = firstDiagnosis.definitionId;
|
||||
|
||||
// 2. 解析西医诊断
|
||||
const westernData = westernRes?.data || westernRes || [];
|
||||
if (Array.isArray(westernData) && westernData.length > 0) {
|
||||
westernData.forEach((item) => {
|
||||
mergedList.push({
|
||||
name: item.name + ' (西医)',
|
||||
definitionId: item.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];
|
||||
prescription.diagnosisName = item.name;
|
||||
prescription.conditionId = item.conditionId;
|
||||
|
||||
@@ -718,6 +718,7 @@ function handleClick(tab) {
|
||||
diagnosisRef.value.getDetail(patientInfo.value.encounterId);
|
||||
break;
|
||||
case 'prescription':
|
||||
prescriptionRef.value.getListInfo();
|
||||
prescriptionRef.value.getDiagnosisInfo();
|
||||
break;
|
||||
case 'tcm':
|
||||
@@ -848,7 +849,7 @@ function handleCardClick(item, index) {
|
||||
updatePatientInfo(item);
|
||||
activeTab.value = 'hospitalizationEmr';
|
||||
nextTick(() => {
|
||||
prescriptionRef.value.getListInfo();
|
||||
// 医嘱数据改为切换到对应tab时才加载
|
||||
tcmRef.value.getListInfo();
|
||||
inspectionRef.value.getList();
|
||||
if(examinationRef.value) examinationRef.value.getList();
|
||||
|
||||
@@ -274,11 +274,11 @@
|
||||
filterable
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@focus="loadSyndromeOptions(scope.row.ybNo)"
|
||||
@focus="loadSyndromeOptions(scope.row)"
|
||||
@change="(val) => handleSyndromeSelect(val, scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in syndromeOptions"
|
||||
v-for="item in (scope.row.syndromeOptions || [])"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -547,6 +547,7 @@ function getList() {
|
||||
syndromeGroupNo: '',
|
||||
showPopover: false,
|
||||
diagnosisTime: formatDisplayDate(item.diagnosisTime),
|
||||
syndromeOptions: []
|
||||
};
|
||||
if (obj.diagSrtNo == null) {
|
||||
obj.diagSrtNo = 1;
|
||||
@@ -566,6 +567,9 @@ function getList() {
|
||||
diagnosisNetDatas.value = res.data.illness;
|
||||
const newList = [];
|
||||
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({
|
||||
conditionId: item.conditionId || '',
|
||||
encounterDiagnosisId: item.encounterDiagnosisId || '',
|
||||
@@ -575,9 +579,10 @@ function getList() {
|
||||
ybNo: item.ybNo,
|
||||
definitionId: item.definitionId || '',
|
||||
diagnosisSystem: '中医',
|
||||
tcmSyndromeCode: res.data.symptom[index]?.ybNo || '',
|
||||
tcmSyndromeName: res.data.symptom[index]?.name || '',
|
||||
syndromeDefinitionId: res.data.symptom[index]?.definitionId || '',
|
||||
tcmSyndromeCode: syndromeCode,
|
||||
tcmSyndromeName: syndromeName,
|
||||
syndromeDefinitionId: syndromeId,
|
||||
syndromeOptions: syndromeCode ? [{ value: syndromeCode, label: syndromeName, id: syndromeId }] : [],
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
maindiseFlag: item.maindiseFlag,
|
||||
@@ -793,6 +798,7 @@ function addDiagnosisItem() {
|
||||
tcmSyndromeName: '',
|
||||
syndromeDefinitionId: '',
|
||||
syndromeGroupNo: '',
|
||||
syndromeOptions: [],
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: undefined,
|
||||
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 } : {};
|
||||
getTcmSyndrome(params).then((res) => {
|
||||
if (res.data && res.data.records) {
|
||||
syndromeOptions.value = res.data.records.map((item) => ({
|
||||
row.syndromeOptions = res.data.records.map((item) => ({
|
||||
value: item.ybNo,
|
||||
label: item.name,
|
||||
id: item.id,
|
||||
}));
|
||||
} else {
|
||||
syndromeOptions.value = [];
|
||||
row.syndromeOptions = [];
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -843,7 +850,7 @@ function loadSyndromeOptions(conditionCode) {
|
||||
// 中医证候选中赋值
|
||||
function handleSyndromeSelect(val, row) {
|
||||
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.syndromeDefinitionId = selected ? selected.id : '';
|
||||
} else {
|
||||
@@ -1166,6 +1173,7 @@ function handleNodeClick(data) {
|
||||
tcmSyndromeName: '',
|
||||
syndromeDefinitionId: '',
|
||||
syndromeGroupNo: '',
|
||||
syndromeOptions: [],
|
||||
verificationStatusEnum: 4,
|
||||
medTypeCode: undefined,
|
||||
diagSrtNo: form.value.diagnosisList.length + 1,
|
||||
|
||||
@@ -811,6 +811,7 @@ const popoverJustClosedByKey = ref(null);
|
||||
|
||||
// 医嘱检索下拉浮框对齐:跟踪表格水平滚动偏移与主体区域边界限制
|
||||
const tableScrollLeft = ref(0);
|
||||
const scrollLeftAtOpen = ref(0);
|
||||
const mainBoundary = ref(null);
|
||||
const advicePopperWidth = computed(() => {
|
||||
// 取主体区域宽度与 900px 中较小值,避免小屏幕溢出;下限 500px
|
||||
@@ -819,15 +820,17 @@ const advicePopperWidth = computed(() => {
|
||||
});
|
||||
const advicePopperStyle = computed(() => ({
|
||||
padding: '0',
|
||||
marginLeft: `-${tableScrollLeft.value}px`,
|
||||
marginLeft: `-${tableScrollLeft.value - scrollLeftAtOpen.value}px`,
|
||||
}));
|
||||
const advicePopperOptions = computed(() => ({
|
||||
modifiers: [
|
||||
{
|
||||
name: 'preventOverflow',
|
||||
options: {
|
||||
boundary: mainBoundary.value || 'viewport',
|
||||
},
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
name: 'flip',
|
||||
enabled: false,
|
||||
},
|
||||
],
|
||||
}));
|
||||
@@ -1066,6 +1069,12 @@ function refresh() {
|
||||
}
|
||||
// 获取列表信息
|
||||
function getListInfo(addNewRow) {
|
||||
if (!localPatient.value || !localPatient.value.encounterId) {
|
||||
loading.value = false;
|
||||
prescriptionList.value = [];
|
||||
isCategoryLoaded.value = false;
|
||||
return;
|
||||
}
|
||||
loading.value = true;
|
||||
isAdding.value = false;
|
||||
collapseAllExpanded();
|
||||
@@ -1229,6 +1238,10 @@ const filterPrescriptionList = computed(() => {
|
||||
});
|
||||
|
||||
function getDiagnosisInfo() {
|
||||
if (!localPatient.value || !localPatient.value.encounterId) {
|
||||
diagnosisList.value = [];
|
||||
return;
|
||||
}
|
||||
getEncounterDiagnosis(localPatient.value.encounterId).then((res) => {
|
||||
diagnosisList.value = res.data;
|
||||
let diagnosisInfo = diagnosisList.value.filter((item) => {
|
||||
@@ -1477,6 +1490,10 @@ function handleFocus(row, index) {
|
||||
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;
|
||||
}
|
||||
// 文字医嘱(type=8)不弹药品搜索框,直接展开填写面板
|
||||
const adviceType = row.adviceType !== undefined ? row.adviceType : adviceQueryParams.value.adviceType;
|
||||
@@ -1531,6 +1548,14 @@ function handleChange(value, row, index) {
|
||||
adviceQueryParams.value.searchKey = value;
|
||||
// popover 被 blur 关闭后,用户继续输入时自行打开
|
||||
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;
|
||||
}
|
||||
const tableRef = getAdviceTableRef();
|
||||
|
||||
Reference in New Issue
Block a user