bug 588 628 642 670
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"?>
|
<?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>"</identifier-quote-string>
|
<identifier-quote-string>"</identifier-quote-string>
|
||||||
|
|||||||
@@ -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;
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -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 || '',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -69,13 +69,19 @@
|
|||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<span class="descriptions-item-label"> 诊断: </span>
|
<span class="descriptions-item-label"> 诊断: </span>
|
||||||
<el-input
|
<el-select
|
||||||
:model-value="diagnosisName"
|
v-model="conditionDefinitionId"
|
||||||
placeholder=""
|
placeholder="请选择诊断"
|
||||||
style="width: 180px"
|
style="width: 180px"
|
||||||
readonly
|
@change="handleDiagnosisChange"
|
||||||
disabled
|
>
|
||||||
/>
|
<el-option
|
||||||
|
v-for="item in diagnosisList"
|
||||||
|
:key="item.definitionId"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.definitionId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
<span class="descriptions-item-label"> 费用性质: </span>
|
<span class="descriptions-item-label"> 费用性质: </span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="accountId"
|
v-model="accountId"
|
||||||
@@ -2430,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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user