824 【住院医生工作站-住院病历】选择一名患者时,保存住院病历无法保存成功,点击保存按钮无响应
838 【住院医生工作站-诊断录入】引入/选择门诊入院诊断时,诊断类别列错误显示为字典代码“11”而非文本“门/急诊诊断” 840 【住院医生工作站-临床医嘱】医嘱新增/保存/签发后,医嘱类型列的内容显示为空白
This commit is contained in:
@@ -349,8 +349,9 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
}
|
||||
|
||||
} else if (ItemType.ACTIVITY.getValue().equals(adviceType)
|
||||
|| ItemType.TEXT.getValue().equals(adviceType)
|
||||
|| (adviceType != null && (adviceType == 26 || adviceType == 31))) {
|
||||
// 诊疗活动删除(包括护理type=26和未知类型type=31)
|
||||
// 诊疗活动删除(包括文字医嘱type=8、护理type=26和未知类型type=31)
|
||||
ServiceRequest serviceRequest = iServiceRequestService.getById(requestId);
|
||||
if (serviceRequest != null) {
|
||||
if (!RequestStatus.DRAFT.getValue().equals(serviceRequest.getStatusEnum())) {
|
||||
@@ -1087,6 +1088,7 @@ public class AdviceManageAppServiceImpl implements IAdviceManageAppService {
|
||||
List<AdviceBatchOpParam> activityList = paramList.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());
|
||||
List<Long> activityRequestIds
|
||||
|
||||
@@ -194,6 +194,13 @@
|
||||
placeholder=" "
|
||||
style="width: 150px"
|
||||
>
|
||||
<!-- Bug #838: 若当前值不在 inpatient_diag_category 中,从 med_type 注入选项确保 el-select 显示其 label -->
|
||||
<el-option
|
||||
v-if="getMedTypeOption(scope.row)"
|
||||
:key="'med-' + getMedTypeOption(scope.row).value"
|
||||
:label="getMedTypeOption(scope.row).label"
|
||||
:value="getMedTypeOption(scope.row).value"
|
||||
/>
|
||||
<el-option
|
||||
v-for="item in inpatient_diag_category"
|
||||
:key="item.value"
|
||||
@@ -439,8 +446,18 @@ const props = defineProps({
|
||||
const emits = defineEmits(['diagnosisSave']);
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
// 获取诊断类型字典(住院诊断类别)
|
||||
const { inpatient_diag_category } = proxy.useDict('inpatient_diag_category');
|
||||
// Bug #838: inpatient_diag_category 提供下拉选项,med_type 用于解析当前值的显示文本
|
||||
const { inpatient_diag_category, med_type } = proxy.useDict('inpatient_diag_category', 'med_type');
|
||||
|
||||
// Bug #838: 从 med_type 字典中查找当前值对应的选项,注入到 el-select 中确保标签正确显示
|
||||
function getMedTypeOption(row) {
|
||||
if (row.medTypeCode == null || row.medTypeCode === '') return null;
|
||||
const codeStr = String(row.medTypeCode);
|
||||
// 如果值已存在于 inpatient_diag_category 中,无需额外注入
|
||||
if (inpatient_diag_category.value.some(item => String(item.value) === codeStr)) return null;
|
||||
// 从 med_type 中查找对应标签
|
||||
return med_type.value.find(item => String(item.value) === codeStr) || null;
|
||||
}
|
||||
const rules = ref({
|
||||
name: [{ required: true, message: '请选择诊断', trigger: 'change' }],
|
||||
medTypeCode: [{ required: true, message: '请选择诊断类型', trigger: 'change' }],
|
||||
@@ -547,7 +564,8 @@ function getList() {
|
||||
syndromeGroupNo: '',
|
||||
showPopover: false,
|
||||
diagnosisTime: formatDisplayDate(item.diagnosisTime),
|
||||
syndromeOptions: []
|
||||
syndromeOptions: [],
|
||||
medTypeCode: item.medTypeCode != null ? String(item.medTypeCode) : '',
|
||||
};
|
||||
if (obj.diagSrtNo == null) {
|
||||
obj.diagSrtNo = 1;
|
||||
@@ -584,7 +602,7 @@ function getList() {
|
||||
syndromeDefinitionId: syndromeId,
|
||||
syndromeOptions: syndromeCode ? [{ value: syndromeCode, label: syndromeName, id: syndromeId }] : [],
|
||||
diagSrtNo: item.diagSrtNo,
|
||||
medTypeCode: item.medTypeCode,
|
||||
medTypeCode: item.medTypeCode != null ? String(item.medTypeCode) : '',
|
||||
maindiseFlag: item.maindiseFlag,
|
||||
verificationStatusEnum: item.verificationStatusEnum,
|
||||
diagnosisDesc: item.diagnosisDesc || '',
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="loading || isSaving"
|
||||
:loading="isSaving"
|
||||
:disabled="isSaveDisabled || loading || isSaving"
|
||||
@click="handleSave()"
|
||||
>
|
||||
@@ -401,7 +401,17 @@
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.adviceName }}</span>
|
||||
<span v-else>
|
||||
<el-tag
|
||||
v-if="getAdviceTypeLabel(scope.row)"
|
||||
size="small"
|
||||
type="info"
|
||||
style="margin-right: 4px"
|
||||
>
|
||||
{{ getAdviceTypeLabel(scope.row) }}
|
||||
</el-tag>
|
||||
{{ scope.row.adviceName }}
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
@@ -1085,9 +1095,13 @@ function getListInfo(addNewRow) {
|
||||
// 避免因树为空导致 orgId 无法匹配,从而显示数字 ID 而非中文名称
|
||||
const orgTreePromise = getOrgTree().then((res) => {
|
||||
organization.value = res?.data?.records ?? res?.data ?? [];
|
||||
}).catch(() => {
|
||||
// 科室树加载失败不应阻塞主数据渲染,静默降级
|
||||
organization.value = [];
|
||||
});
|
||||
getPrescriptionList(localPatient.value.encounterId).then((res) => {
|
||||
// 等待科室树加载完成后再处理处方数据,确保 resolveOrgId 能正确匹配
|
||||
// 使用 finally 确保无论科室树成功与否,loading 都能被重置
|
||||
orgTreePromise.then(() => {
|
||||
loading.value = false;
|
||||
prescriptionList.value = res.data
|
||||
@@ -1114,6 +1128,10 @@ function getListInfo(addNewRow) {
|
||||
unitCodeList: unitCodeListData,
|
||||
// 确保 therapyEnum 被正确设置,优先使用 contentJson 中的值
|
||||
therapyEnum: String(parsedContent?.therapyEnum ?? item.therapyEnum ?? '1'),
|
||||
// 🔧 Bug #840: 确保 adviceType 优先使用 contentJson 中的值
|
||||
// item.adviceType 来自 DB 可能为 null,会覆盖 parsedContent 中的正确值
|
||||
adviceType: parsedContent?.adviceType ?? item.adviceType,
|
||||
categoryCode: parsedContent?.categoryCode ?? item.categoryCode ?? '',
|
||||
// 🔧 修复:确保 orgId 为 String 类型,与 organization 树的 id 类型一致
|
||||
// 确保 skinTestFlag 是数字类型(1 或 0),从 contentJson 恢复
|
||||
skinTestFlag: parsedContent?.skinTestFlag !== undefined && parsedContent?.skinTestFlag !== null
|
||||
@@ -1280,6 +1298,17 @@ function getRowSelectValue(row) {
|
||||
return row.adviceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据行的 adviceType + categoryCode 获取中文类型标签
|
||||
* 供非编辑模式下显示医嘱类型(如"西药"、"中成药"、"文字"等)
|
||||
*/
|
||||
function getAdviceTypeLabel(row) {
|
||||
if (!row.adviceType) return '';
|
||||
const selectValue = getRowSelectValue(row);
|
||||
const item = adviceTypeList.value.find((opt) => opt.value === selectValue);
|
||||
return item ? item.label : '';
|
||||
}
|
||||
|
||||
// 新增医嘱
|
||||
function handleAddPrescription() {
|
||||
// 校验是否选中患者
|
||||
|
||||
@@ -626,9 +626,18 @@ const onNursingStatus = () => {
|
||||
openDrawer.value = true;
|
||||
};
|
||||
const save = async () => {
|
||||
// Bug #824: 校验动态组件和模板是否已正确加载,避免可选链静默吞掉 null 导致"无响应"
|
||||
if (!emrComponentRef.value) {
|
||||
ElMessage.warning(t('inpatientDoctor.emr.pleaseSelectEmrTemplate'));
|
||||
return;
|
||||
}
|
||||
if (!currentSelectTemplate.value?.id) {
|
||||
ElMessage.warning(t('inpatientDoctor.emr.pleaseSelectEmrTemplate'));
|
||||
return;
|
||||
}
|
||||
try {
|
||||
currentOperate.value = 'add';
|
||||
await emrComponentRef.value?.submit();
|
||||
await emrComponentRef.value.submit();
|
||||
} catch (error) {
|
||||
console.log('error=============>', error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user