Compare commits
5 Commits
zhugeliang
...
7deba511d4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7deba511d4 | ||
|
|
3fed829cc8 | ||
|
|
5cbaee98f7 | ||
|
|
d4da94c400 | ||
|
|
3103c619f2 |
@@ -81,14 +81,21 @@ public class RequestFormManageController {
|
|||||||
* 查询检查申请单
|
* 查询检查申请单
|
||||||
*
|
*
|
||||||
* @param encounterId 就诊id
|
* @param encounterId 就诊id
|
||||||
|
* @param startDate 开始日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param endDate 结束日期(可选,格式:yyyy-MM-dd)
|
||||||
|
* @param status 单据状态(可选)
|
||||||
* @return 检查申请单
|
* @return 检查申请单
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/get-check")
|
@GetMapping(value = "/get-check")
|
||||||
public R<?> getCheckRequestForm(@RequestParam(required = false) Long encounterId) {
|
public R<?> getCheckRequestForm(
|
||||||
|
@RequestParam(required = false) Long encounterId,
|
||||||
|
@RequestParam(required = false) String startDate,
|
||||||
|
@RequestParam(required = false) String endDate,
|
||||||
|
@RequestParam(required = false) String status) {
|
||||||
if (encounterId == null) {
|
if (encounterId == null) {
|
||||||
return R.fail("就诊ID不能为空");
|
return R.fail("就诊ID不能为空");
|
||||||
}
|
}
|
||||||
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.TEST.getCode()));
|
return R.ok(iRequestFormManageAppService.getRequestForm(encounterId, ActivityDefCategory.TEST.getCode(), startDate, endDate, status));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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('+')
|
||||||
|
|
||||||
|
const firstItem = newVal[0]
|
||||||
|
|
||||||
|
// Bug #466: 如果标本类型为空或仍为初始化默认值,根据第一个检验项目的 sampleType 自动设置默认标本类型
|
||||||
|
if ((!formData.specimenName || formData.specimenName === '血液') && firstItem.sampleType) {
|
||||||
|
formData.specimenName = firstItem.sampleType
|
||||||
|
}
|
||||||
|
|
||||||
// Bug #329: 如果执行科室为空,根据第一个检验项目的检验类型自动设置默认执行科室
|
// Bug #329: 如果执行科室为空,根据第一个检验项目的检验类型自动设置默认执行科室
|
||||||
if (!formData.executeDepartment) {
|
if (!formData.executeDepartment) {
|
||||||
const firstItem = newVal[0]
|
|
||||||
|
|
||||||
// 根据检验项目的 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 })
|
||||||
|
|
||||||
|
|||||||
@@ -176,6 +176,8 @@ const projectWithDepartment = (selectProjectIds, type) => {
|
|||||||
});
|
});
|
||||||
arr.push(searchData);
|
arr.push(searchData);
|
||||||
});
|
});
|
||||||
|
// 保存用户手动选择的发往科室(提交时需要保留)
|
||||||
|
const manualDept = type === 2 ? form.targetDepartment : '';
|
||||||
// 清空科室
|
// 清空科室
|
||||||
form.targetDepartment = '';
|
form.targetDepartment = '';
|
||||||
if (arr.length > 0) {
|
if (arr.length > 0) {
|
||||||
@@ -194,11 +196,17 @@ const projectWithDepartment = (selectProjectIds, type) => {
|
|||||||
// 选中项目中的执行科室id与全部科室数据做匹配
|
// 选中项目中的执行科室id与全部科室数据做匹配
|
||||||
const findItem = findTreeItem(orgOptions.value, obj.orgId);
|
const findItem = findTreeItem(orgOptions.value, obj.orgId);
|
||||||
if (!findItem) {
|
if (!findItem) {
|
||||||
isRelease = false;
|
// type=2(提交)时,若用户已手动选择发往科室,则允许提交
|
||||||
ElMessage({
|
if (type === 2 && manualDept) {
|
||||||
type: 'error',
|
form.targetDepartment = manualDept;
|
||||||
message: '未找到项目执行的科室',
|
isRelease = true;
|
||||||
});
|
} else {
|
||||||
|
isRelease = false;
|
||||||
|
ElMessage({
|
||||||
|
type: 'error',
|
||||||
|
message: '未找到项目执行的科室',
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
if (isRelease) {
|
if (isRelease) {
|
||||||
@@ -232,7 +240,7 @@ const submit = () => {
|
|||||||
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
unitCode: item.priceList[0].unitCode /** 请求单位编码 */,
|
||||||
unitPrice: item.priceList[0].price /** 单价 */,
|
unitPrice: item.priceList[0].price /** 单价 */,
|
||||||
totalPrice: item.priceList[0].price /** 总价 */,
|
totalPrice: item.priceList[0].price /** 总价 */,
|
||||||
positionId: item.positionId, //执行科室id
|
positionId: item.positionId || form.targetDepartment, //执行科室id,未配置时使用用户手动选择的科室
|
||||||
ybClassEnum: item.ybClassEnum, //类别医保编码
|
ybClassEnum: item.ybClassEnum, //类别医保编码
|
||||||
conditionId: item.conditionId, //诊断ID
|
conditionId: item.conditionId, //诊断ID
|
||||||
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
encounterDiagnosisId: item.encounterDiagnosisId, //就诊诊断id
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
@@ -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