Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c687167044 | |||
|
|
7aa93c34a5 | ||
|
|
a844920e3f | ||
|
|
b02c6f6456 | ||
|
|
9e2d683e19 | ||
|
|
51f4b84842 | ||
|
|
c0ea55a74d | ||
|
|
7990247a97 | ||
|
|
94a6f9553c | ||
|
|
bef429df0c | ||
|
|
aaaf548003 | ||
|
|
d61373593e | ||
|
|
d2699f5cdd | ||
|
|
7deba511d4 | ||
|
|
3fed829cc8 | ||
|
|
5cbaee98f7 | ||
|
|
d4da94c400 | ||
|
|
3103c619f2 |
@@ -2063,15 +2063,20 @@ watch(() => props.patientInfo, async (newVal) => {
|
|||||||
}
|
}
|
||||||
}, { deep: true, immediate: true })
|
}, { deep: true, immediate: true })
|
||||||
|
|
||||||
// Bug #329: 监听已选择的检验项目,自动更新检验项目文本并设置默认执行科室
|
// Bug #329/#466: 监听已选择的检验项目,自动更新检验项目文本并设置默认执行科室、标本类型
|
||||||
watch(() => selectedInspectionItems.value, async (newVal) => {
|
watch(() => selectedInspectionItems.value, async (newVal) => {
|
||||||
if (newVal && newVal.length > 0) {
|
if (newVal && newVal.length > 0) {
|
||||||
formData.inspectionItemsText = newVal.map(item => item.itemName).join('+')
|
formData.inspectionItemsText = newVal.map(item => item.itemName).join('+')
|
||||||
|
|
||||||
// Bug #329: 如果执行科室为空,根据第一个检验项目的检验类型自动设置默认执行科室
|
|
||||||
if (!formData.executeDepartment) {
|
|
||||||
const firstItem = newVal[0]
|
const firstItem = newVal[0]
|
||||||
|
|
||||||
|
// Bug #466: 如果标本类型为空或仍为初始化默认值,根据第一个检验项目的 sampleType 自动设置默认标本类型
|
||||||
|
if ((!formData.specimenName || formData.specimenName === '血液') && firstItem.sampleType) {
|
||||||
|
formData.specimenName = firstItem.sampleType
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bug #329: 如果执行科室为空,根据第一个检验项目的检验类型自动设置默认执行科室
|
||||||
|
if (!formData.executeDepartment) {
|
||||||
// 根据检验项目的 inspectionTypeId 获取默认执行科室
|
// 根据检验项目的 inspectionTypeId 获取默认执行科室
|
||||||
if (firstItem.inspectionTypeId) {
|
if (firstItem.inspectionTypeId) {
|
||||||
const defaultDeptCode = await getDefaultPerformDeptCode(firstItem.inspectionTypeId)
|
const defaultDeptCode = await getDefaultPerformDeptCode(firstItem.inspectionTypeId)
|
||||||
@@ -2081,9 +2086,10 @@ watch(() => selectedInspectionItems.value, async (newVal) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Bug #329: 当项目被清空时,同时清空执行科室(下次选择项目时会重新自动设置)
|
// Bug #329: 当项目被清空时,同时清空执行科室和标本类型(下次选择项目时会重新自动设置)
|
||||||
formData.inspectionItemsText = ''
|
formData.inspectionItemsText = ''
|
||||||
formData.executeDepartment = ''
|
formData.executeDepartment = ''
|
||||||
|
formData.specimenName = ''
|
||||||
}
|
}
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
|
|||||||
@@ -86,14 +86,14 @@ const tableColumns = computed<TableColumn[]>(() => [
|
|||||||
* @param searchKey 搜索关键词
|
* @param searchKey 搜索关键词
|
||||||
*/
|
*/
|
||||||
function refresh(adviceType: any, categoryCode: string, searchKey: string) {
|
function refresh(adviceType: any, categoryCode: string, searchKey: string) {
|
||||||
// 有搜索词时跨类型搜索,避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目
|
// 有搜索词时跨类型搜索,或adviceType为空时也跨类型搜索(新行未选类型时默认搜全部),避免用户输入"级护理"但因当前adviceType为药品而搜不到诊疗类护理项目
|
||||||
if (searchKey) {
|
if (searchKey || adviceType === undefined || adviceType === '') {
|
||||||
queryParams.value.adviceTypes = '1,2,3,6';
|
queryParams.value.adviceTypes = '1,2,3,6';
|
||||||
|
queryParams.value.categoryCode = '';
|
||||||
} else {
|
} else {
|
||||||
queryParams.value.adviceTypes =
|
queryParams.value.adviceTypes = String(adviceType);
|
||||||
adviceType !== undefined && adviceType !== '' ? String(adviceType) : '1,2,3,6';
|
|
||||||
}
|
|
||||||
queryParams.value.categoryCode = categoryCode || '';
|
queryParams.value.categoryCode = categoryCode || '';
|
||||||
|
}
|
||||||
queryParams.value.searchKey = searchKey || '';
|
queryParams.value.searchKey = searchKey || '';
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,13 +281,14 @@ const submit = () => {
|
|||||||
accountId: patientInfo.value.accountId, // // 账户id
|
accountId: patientInfo.value.accountId, // // 账户id
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
const itemNames = applicationListAllFilter.map(item => item.adviceName).filter(Boolean).join('、');
|
||||||
saveCheckd({
|
saveCheckd({
|
||||||
activityList: applicationListAllFilter,
|
activityList: applicationListAllFilter,
|
||||||
patientId: patientInfo.value.patientId, //患者ID
|
patientId: patientInfo.value.patientId, //患者ID
|
||||||
encounterId: patientInfo.value.encounterId, // 就诊ID
|
encounterId: patientInfo.value.encounterId, // 就诊ID
|
||||||
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
organizationId: patientInfo.value.inHospitalOrgId, // 医疗机构ID
|
||||||
requestFormId: '', // 申请单ID
|
requestFormId: '', // 申请单ID
|
||||||
name: '检查申请单',
|
name: itemNames || '检查申请单',
|
||||||
descJson: JSON.stringify(form),
|
descJson: JSON.stringify(form),
|
||||||
categoryEnum: '2', // 1 检验 2 检查 3 输血 4 手术
|
categoryEnum: '2', // 1 检验 2 检查 3 输血 4 手术
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|||||||
@@ -197,7 +197,6 @@
|
|||||||
style="width: 62%"
|
style="width: 62%"
|
||||||
v-model="scope.row.adviceName"
|
v-model="scope.row.adviceName"
|
||||||
placeholder="请选择项目"
|
placeholder="请选择项目"
|
||||||
@input="handleChange"
|
|
||||||
@click="handleFocus(scope.row, scope.$index)"
|
@click="handleFocus(scope.row, scope.$index)"
|
||||||
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
|
||||||
@keydown="
|
@keydown="
|
||||||
@@ -380,7 +379,7 @@ const form = ref({
|
|||||||
prescriptionList: prescriptionList.value,
|
prescriptionList: prescriptionList.value,
|
||||||
});
|
});
|
||||||
const adviceQueryParams = ref({
|
const adviceQueryParams = ref({
|
||||||
adviceType: 1,
|
adviceType: '',
|
||||||
categoryCode: '', // 初始为空,等待加载配置后动态设置
|
categoryCode: '', // 初始为空,等待加载配置后动态设置
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
});
|
});
|
||||||
@@ -686,7 +685,7 @@ function loadConfiguredCategories() {
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 创建新对象触发响应式更新
|
// 创建新对象触发响应式更新
|
||||||
adviceQueryParams.value = {
|
adviceQueryParams.value = {
|
||||||
adviceType: 1,
|
adviceType: '',
|
||||||
categoryCode: defaultCategoryCode,
|
categoryCode: defaultCategoryCode,
|
||||||
searchKey: '',
|
searchKey: '',
|
||||||
};
|
};
|
||||||
@@ -802,10 +801,8 @@ function clickRowDb(row, column, event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
row.showPopover = false;
|
row.showPopover = false;
|
||||||
// 允许所有 statusEnum==1 的医嘱进入编辑:
|
// “待签发(已保存 requestId存在)”不允许再编辑;仅“待保存(无requestId)”允许编辑
|
||||||
// 1. 新医嘱(无 requestId):待保存
|
if (row.statusEnum == 1 && !row.requestId) {
|
||||||
// 2. 护士退回医嘱(有 requestId):退回后状态重置为 DRAFT(1),需允许医生编辑修改后重新签发
|
|
||||||
if (row.statusEnum == 1) {
|
|
||||||
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
// 确保治疗类型为字符串,方便与单选框 label 对齐,默认为长期医嘱('1')
|
||||||
row.therapyEnum = String(row.therapyEnum ?? '1');
|
row.therapyEnum = String(row.therapyEnum ?? '1');
|
||||||
row.isEdit = true;
|
row.isEdit = true;
|
||||||
|
|||||||
@@ -1481,6 +1481,8 @@ function handleMedicalAdvice(row) {
|
|||||||
const filteredItems = res.data.filter(item => {
|
const filteredItems = res.data.filter(item => {
|
||||||
// 匹配 encounterId
|
// 匹配 encounterId
|
||||||
if (item.encounterId !== row.visitId) return false;
|
if (item.encounterId !== row.visitId) return false;
|
||||||
|
// 仅保留药品(adviceType=1),过滤耗材(2)和项目(3)
|
||||||
|
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
|
||||||
// 过滤掉名称为空的项目
|
// 过滤掉名称为空的项目
|
||||||
const medicineName = item.adviceName || item.advice_name;
|
const medicineName = item.adviceName || item.advice_name;
|
||||||
if (!medicineName || medicineName.trim() === '') return false;
|
if (!medicineName || medicineName.trim() === '') return false;
|
||||||
@@ -1743,6 +1745,8 @@ function handleQuoteBilling() {
|
|||||||
const filteredItems = res.data.filter(item => {
|
const filteredItems = res.data.filter(item => {
|
||||||
// 匹配 encounterId
|
// 匹配 encounterId
|
||||||
if (item.encounterId !== temporaryPatientInfo.value.visitId) return false;
|
if (item.encounterId !== temporaryPatientInfo.value.visitId) return false;
|
||||||
|
// 仅保留药品(adviceType=1),过滤耗材(2)和项目(3)
|
||||||
|
if (item.adviceType !== 1 && item.advice_type !== 1) return false;
|
||||||
// 过滤掉名称为空的项目
|
// 过滤掉名称为空的项目
|
||||||
const medicineName = item.adviceName || item.advice_name;
|
const medicineName = item.adviceName || item.advice_name;
|
||||||
return medicineName && medicineName.trim() !== '';
|
return medicineName && medicineName.trim() !== '';
|
||||||
|
|||||||
Reference in New Issue
Block a user