feat: 修复部分功能(健康信息、VIP、医生端健康信息导入)

This commit is contained in:
李琦
2026-08-08 11:24:46 +08:00
parent 396a6e5b8b
commit 7697af2619

View File

@@ -160,23 +160,23 @@ const canUseAiMedicalRecord = computed(() =>
const commonChipsTick = ref(0);
/**
* 病历模块焦点顺序:双列从左到右、从上到下填满;中医病案整块在最底部
* 「中医病案」内:舌象→脉象→辨证/病案→证候→疾病→治法
* 病历模块焦点顺序:常规区 → 健康信息整块 → 中医病案整块
* 「健康信息」内:现病史与各类史;「中医病案」内:舌象→脉象→辨证→证候→疾病→治法
*/
const MODULE_ORDER = [
'chief_complaint',
'family_history',
'present_illness',
'epidemic_history',
'past_history',
'menstrual_history',
'marital_history',
'personal_history',
'allergy_history',
'treatment_advice',
'doctor_order',
'physical_exam',
'auxiliary_exam',
'present_illness',
'past_history',
'allergy_history',
'family_history',
'epidemic_history',
'personal_history',
'menstrual_history',
'marital_history',
'tongue',
'pulse',
'tcm_case',
@@ -931,30 +931,36 @@ const tcmCaseSubRows = [
] as const;
/**
* 常规字段统一按阅读顺序排列CSS 双列自动从左到右填满
* (中医病案单独置底全宽,不放进网格
* 常规字段(不含健康史):双列自动填满
* 健康信息 / 中医病案各自成组,不混进本网格
*/
const allNormalFields = [
fieldBlock('chief_complaint', '主诉', undefined, undefined, true),
fieldBlock('family_history', '家族史'),
fieldBlock('present_illness', '现病史'),
fieldBlock('epidemic_history', '流行病学史'),
fieldBlock('past_history', '既往史'),
fieldBlock('menstrual_history', '月经史'),
fieldBlock('marital_history', '婚育史'),
fieldBlock('personal_history', '个人史'),
fieldBlock('allergy_history', '过敏史'),
fieldBlock('treatment_advice', '治疗意见'),
// 诊断/医嘱与处方 Tab 同源双向同步(此前网格漏渲染导致病历侧「诊断」消失)
// 诊断/医嘱与处方 Tab 同源双向同步
fieldBlock('diagnosis', '临床诊断'),
fieldBlock('doctor_order', '医嘱'),
fieldBlock('physical_exam', '体征检查'),
fieldBlock('auxiliary_exam', '辅助检查'),
];
/** 月经史/婚育史按性别年龄过滤后的可见字段 */
const visibleNormalFields = computed(() =>
allNormalFields.filter((f) =>
/** 健康信息分组:与就诊人健康问诊对齐(现病史 + 各类史) */
const allHealthFields = [
fieldBlock('present_illness', '现病史'),
fieldBlock('past_history', '既往史'),
fieldBlock('allergy_history', '过敏史'),
fieldBlock('family_history', '家族史'),
fieldBlock('epidemic_history', '流行病学史'),
fieldBlock('personal_history', '个人史'),
fieldBlock('menstrual_history', '月经史'),
fieldBlock('marital_history', '婚育史'),
];
const visibleNormalFields = computed(() => allNormalFields);
/** 月经史/婚育史按性别年龄过滤 */
const visibleHealthFields = computed(() =>
allHealthFields.filter((f) =>
isHistoryFieldVisible(f.fieldCode, props.patientSex, props.patientAge),
),
);
@@ -1216,6 +1222,64 @@ const visibleNormalFields = computed(() =>
</div>
</div>
<!-- 健康信息与中医病案同级分组现病史 + 各类史 -->
<div class="mr-health-block mb-4">
<div class="mr-field-head mb-2">
<span class="mr-field-label mr-field-label--section">健康信息</span>
</div>
<div class="mr-fields-grid">
<div
v-for="f in visibleHealthFields"
:key="`health_${f.fieldCode}`"
class="mr-field-block"
>
<div class="mr-field-head mb-1">
<span class="mr-field-label mr-field-label--sub">{{ f.label }}</span>
<div
class="mr-field-search"
:data-mr-module="f.fieldCode"
data-mr-role="search"
>
<EntryKeywordBubble
:ref="(el) => setSearchRef(f.fieldCode, el)"
:field-code="f.fieldCode"
:store-id="storeId"
compact
:show-common-in-bubble="showCommonInBubble"
@select="(item) => onEntryPick(f.fieldCode, item)"
@common-changed="commonChipsTick += 1"
/>
</div>
</div>
<div :data-mr-module="f.fieldCode" data-mr-role="textarea">
<Textarea
:ref="(el) => setTextareaRef(f.fieldCode, el)"
v-model:value="(form as any)[f.textKey]"
:rows="2"
:placeholder="`[选择] ${f.label}(双击放大)`"
@dblclick="openFieldExpand(f.textKey, f.label)"
/>
</div>
<CommonDxOrderChips
v-if="showCommonTags"
:key="`entry_chips_${f.fieldCode}_${commonChipsTick}`"
source="entry"
:field-code="f.fieldCode"
:field-value="String((form as any)[f.textKey] || '')"
@select="
(text) =>
onEntryPick(f.fieldCode, {
id: text,
title: text,
content: text,
remark: '',
})
"
/>
</div>
</div>
</div>
<!-- 中医病案置底全宽 -->
<div class="mr-tcm-block mb-4">
<div class="mr-field-head mb-2">
@@ -1476,6 +1540,7 @@ const visibleNormalFields = computed(() =>
min-width: 0;
flex: 1 1 auto;
}
.mr-health-block,
.mr-tcm-block {
margin-top: 8px;
padding-top: 8px;