diff --git a/subPackages/sub_workbench/prescription_v2/components/MedicalRecordPanel.vue b/subPackages/sub_workbench/prescription_v2/components/MedicalRecordPanel.vue index 3fbc8dc..d41d2f2 100644 --- a/subPackages/sub_workbench/prescription_v2/components/MedicalRecordPanel.vue +++ b/subPackages/sub_workbench/prescription_v2/components/MedicalRecordPanel.vue @@ -355,6 +355,9 @@ function emptyForm() { family_history: '', epidemic_history: '', past_history: '', + menstrual_history: '', + marital_history: '', + personal_history: '', allergy_history: '', physical_exam: '', auxiliary_exam: '', @@ -368,6 +371,21 @@ function emptyForm() { } } +/** + * 月经史仅女;婚育史男>22或女>20;个人史始终 + */ +function isHistoryFieldVisible(fieldCode, sex, age) { + if (fieldCode === 'menstrual_history') { + return Number(sex) === 2 + } + if (fieldCode === 'marital_history') { + const s = Number(sex) + const a = Number(age) || 0 + return (s === 1 && a > 22) || (s === 2 && a > 20) + } + return true +} + /** * 拼出 首拼(全拼) 展示(与 PC 病历气泡一致) */ @@ -397,6 +415,10 @@ export default { diagnosisReadonly: { type: Boolean, default: false }, /** 是否处于病历 Tab(控制底部栏;probe 时必须为 false,否则 fixed 会穿透到处方) */ active: { type: Boolean, default: false }, + /** 就诊人性别 1男2女 */ + patientSex: { type: [Number, String], default: 0 }, + /** 就诊人年龄 */ + patientAge: { type: [Number, String], default: 0 }, }, data() { const tcmCaseSubFields = [ @@ -455,10 +477,13 @@ export default { ], /** 中医三典当前抽屉类型 diseases|syndrome|method,空=病历词条 */ entryTcmType: '', - rightFields: [ + allRightFields: [ { code: 'family_history', label: '家族史' }, { code: 'epidemic_history', label: '流行病学史' }, { code: 'past_history', label: '既往史' }, + { code: 'menstrual_history', label: '月经史' }, + { code: 'marital_history', label: '婚育史' }, + { code: 'personal_history', label: '个人史' }, { code: 'allergy_history', label: '过敏史' }, { code: 'physical_exam', label: '体征检查' }, { code: 'auxiliary_exam', label: '辅助检查' }, @@ -466,6 +491,14 @@ export default { } }, computed: { + /** 右栏按性别年龄过滤月经史/婚育史 */ + rightFields() { + const sex = Number(this.patientSex || 0) + const age = Number(this.patientAge || 0) + return (this.allRightFields || []).filter((f) => + isHistoryFieldVisible(f.code, sex, age), + ) + }, /** props 优先,其次病历回填 */ effectivePatientId() { return Number(this.userPatientId || this.form.user_patient_id || 0) diff --git a/subPackages/sub_workbench/prescription_v2/index.vue b/subPackages/sub_workbench/prescription_v2/index.vue index dc8669a..f75d005 100644 --- a/subPackages/sub_workbench/prescription_v2/index.vue +++ b/subPackages/sub_workbench/prescription_v2/index.vue @@ -584,6 +584,8 @@ :medical-advice="medicalAdvice" :diagnosis-readonly="isOnlineRevisit" :active="isMrMainVisible" + :patient-sex="(patientInfo && patientInfo.sex) || 0" + :patient-age="(patientInfo && patientInfo.age) || 0" @update:diagnosis="onMrDiagnosisUpdate" @update:medicalAdvice="onMrAdviceUpdate" @open-diagnosis="handleOpenDiagnosisModal"