|
|
@@ -14,15 +14,9 @@
|
|
|
<td>A.1.2 评估基准日期</td>
|
|
|
<td>{{ formatDate(dataForm.evaluatorDate, 'YYYY-MM-DD') }}</td>
|
|
|
</tr>
|
|
|
- <tr v-if="templateType == 0 || templateType == 1">
|
|
|
- <td>A.1.3 评估性质</td>
|
|
|
- <td>
|
|
|
- {{ getDictLabel(DICT_TYPE.EVALUATION_ARR, dataForm.questionnaireType) }}
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr v-if="templateType == 0 || templateType == 1">
|
|
|
+ <tr v-if="dataForm.evaluationAgency == '1' && (templateType == 0 || templateType == 1)">
|
|
|
<td>A.1.4 评估原因</td>
|
|
|
- <td>{{ dataForm.evaluateReasons }}</td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.EVALUATION_REASON, dataForm.evaluateReasons) }}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
@@ -59,35 +53,19 @@
|
|
|
>
|
|
|
<tr>
|
|
|
<td colspan="2">A.2.4 身高</td>
|
|
|
- <td>______{{ dataForm.height }}_______cm</td>
|
|
|
+ <td>{{ dataForm.elderHeight ? dataForm.elderHeight + ' cm' : '______cm' }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">A.2.5 体重</td>
|
|
|
- <td>______{{ dataForm.weight }}_______kg</td>
|
|
|
+ <td>{{ dataForm.elderWeight ? dataForm.elderWeight + ' kg' : '______kg' }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">A.2.6 民族</td>
|
|
|
- <td>
|
|
|
- <div class="flex">
|
|
|
- <div class="left">
|
|
|
- <span class="item-info">1 汉族</span>
|
|
|
- <span class="item-info">2 少数民族_____________</span>
|
|
|
- </div>
|
|
|
- <div class="right"></div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.NATION_ARR, dataForm.nationId) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">A.2.7 宗教信仰</td>
|
|
|
- <td>
|
|
|
- <div class="flex">
|
|
|
- <div class="left">
|
|
|
- <span class="item-info">1 无</span>
|
|
|
- <span class="item-info">2 有_____________</span>
|
|
|
- </div>
|
|
|
- <div class="right"></div>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.RELIGIOUS_BELIEF_ARR, dataForm.religiousBelief) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td colspan="2">A.2.8 公民身份号码</td>
|
|
|
@@ -107,10 +85,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="right">{{
|
|
|
- findValueIndex(
|
|
|
- DICT_TYPE.DEGREE_EDUCATION_ARR,
|
|
|
- dataForm.elder ? dataForm.elder.degreeEducation : ''
|
|
|
- )
|
|
|
+ findValueIndex(DICT_TYPE.DEGREE_EDUCATION_ARR, dataForm.degreeEducation)
|
|
|
}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -129,10 +104,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="right">{{
|
|
|
- findValueIndex(
|
|
|
- DICT_TYPE.LIVE_ARR,
|
|
|
- dataForm.elder ? dataForm.elder.liveSituation : ''
|
|
|
- )
|
|
|
+ findValueIndex(DICT_TYPE.LIVE_ARR, dataForm.liveSituation)
|
|
|
}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -151,10 +123,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="right">{{
|
|
|
- findValueIndex(
|
|
|
- DICT_TYPE.MARITAL_STATUS_ARR,
|
|
|
- dataForm.elder ? dataForm.elder.maritalStatus : ''
|
|
|
- )
|
|
|
+ findValueIndex(DICT_TYPE.MARITAL_STATUS_ARR, dataForm.maritalStatus)
|
|
|
}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -173,10 +142,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="right">{{
|
|
|
- findValueIndex(
|
|
|
- DICT_TYPE.MEDICAL_INSURANCE_ARR,
|
|
|
- dataForm.elder ? dataForm.elder.medicalInsurance : ''
|
|
|
- )
|
|
|
+ findValueIndex(DICT_TYPE.MEDICAL_INSURANCE_ARR, dataForm.medicalInsurance)
|
|
|
}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -195,10 +161,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="right">{{
|
|
|
- findValueIndex(
|
|
|
- DICT_TYPE.ECONOMY_SOURCE_ARR,
|
|
|
- dataForm.elder ? dataForm.elder.economySource : ''
|
|
|
- )
|
|
|
+ findValueIndex(DICT_TYPE.ECONOMY_SOURCE_ARR, dataForm.economySource)
|
|
|
}}</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
@@ -223,11 +186,80 @@
|
|
|
</tr>
|
|
|
<tr v-if="templateType != 8">
|
|
|
<td>A3.14.5 其他</td>
|
|
|
- <td>{{ dataForm.economySource }}</td>
|
|
|
+ <td>{{ dataForm.accidentalOther }}</td>
|
|
|
</tr>
|
|
|
</template>
|
|
|
</table>
|
|
|
</div>
|
|
|
+ <!-- 补充信息表:信息提供者、疾病诊断、长期服药、健康相关问题(仅能力评估大表填写这些字段) -->
|
|
|
+ <div
|
|
|
+ class="page"
|
|
|
+ v-if="dataForm.evaluationAgency == '1' && (templateType == 0 || templateType == 1)"
|
|
|
+ >
|
|
|
+ <h4>A.3 补充信息表</h4>
|
|
|
+ <table style="width: 100%" border="2">
|
|
|
+ <tr>
|
|
|
+ <td style="width: 180px">信息提供者姓名</td>
|
|
|
+ <td>{{ dataForm.informationProviderName }}</td>
|
|
|
+ <td style="width: 140px">与老年人关系</td>
|
|
|
+ <td>{{ dataForm.relation }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>联系人姓名</td>
|
|
|
+ <td>{{ dataForm.contactName }}</td>
|
|
|
+ <td>联系人电话</td>
|
|
|
+ <td>{{ dataForm.contactPhone }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>疾病诊断(可多选)</td>
|
|
|
+ <td colspan="3">{{
|
|
|
+ dictLabels(DICT_TYPE.DISEASE_DIAGNOSIS, dataForm.diseaseDiagnosis)
|
|
|
+ }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>长期服药情况</td>
|
|
|
+ <td colspan="3">{{ medicationText(dataForm.medicationSituation) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>压力性损伤</td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.PRESSURE_INJURY, dataForm.pressureInjury) }}</td>
|
|
|
+ <td>关节活动度</td>
|
|
|
+ <td>{{ motionOfJointText(dataForm.motionOfJoint) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>伤口情况(可多选)</td>
|
|
|
+ <td>{{ dictLabels(DICT_TYPE.WOUND_SITUATION, dataForm.woundCondition) }}</td>
|
|
|
+ <td>特殊护理情况(可多选)</td>
|
|
|
+ <td>{{ dictLabels(DICT_TYPE.SPECIAL_CARE, dataForm.specialCareSituation) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>疼痛感</td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.PAIN, dataForm.pain) }}</td>
|
|
|
+ <td>牙齿缺失情况(可多选)</td>
|
|
|
+ <td>{{ absenceOfTeethText(dataForm.absenceOfTeeth) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>义齿佩戴情况(可多选)</td>
|
|
|
+ <td>{{ dictLabels(DICT_TYPE.DENTISTRY_WEAR, dataForm.dentureWearingCondition) }}</td>
|
|
|
+ <td>吞咽困难的情形和症状(可多选)</td>
|
|
|
+ <td>{{ dictLabels(DICT_TYPE.SYMPTOMS_DYSPHAGIA, dataForm.dysphagia) }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>营养不良(BMI低于正常值)</td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.COMMON_STATUS4, dataForm.malnutrition) }}</td>
|
|
|
+ <td>清理呼吸道无效</td>
|
|
|
+ <td>{{
|
|
|
+ getDictLabel(DICT_TYPE.COMMON_STATUS4, dataForm.ineffectiveAirwayClearance)
|
|
|
+ }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>昏迷</td>
|
|
|
+ <td>{{ getDictLabel(DICT_TYPE.COMMON_STATUS4, dataForm.coma) }}</td>
|
|
|
+ <td>其他(请补充)</td>
|
|
|
+ <td>{{ dataForm.otherSupplements }}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
<template v-if="dataForm.evaluationAgency == '1'">
|
|
|
<div class="page" v-for="(item, index) in temArr" :key="item.id + index">
|
|
|
<h4>{{ item.name }}</h4>
|
|
|
@@ -735,23 +767,32 @@ const open = async (id) => {
|
|
|
try {
|
|
|
loading.value = true
|
|
|
const res = await getSyntheticAbilityInfoById(id)
|
|
|
+ // 基础信息字段优先取评估记录顶层,长者档案兜底
|
|
|
+ const resElder = res.elder || {}
|
|
|
+ const pick = (key: string) => {
|
|
|
+ for (const v of [res[key], resElder[key]]) {
|
|
|
+ if (v !== undefined && v !== null && v !== '') return v
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ }
|
|
|
dataForm.value = {
|
|
|
+ ...resElder,
|
|
|
...res,
|
|
|
- elderSex: res.elder.elderSex,
|
|
|
- papersType: res.elder.papersType,
|
|
|
- idCard: res.elder.idCard,
|
|
|
- birthday: res.elder.birthday,
|
|
|
- elderAge: res.elder.elderAge,
|
|
|
- nationId: res.elder.nationId,
|
|
|
- elderHeight: res.elder.elderHeight,
|
|
|
- elderWeight: res.elder.elderWeight,
|
|
|
- religiousBelief: res.elder.religiousBelief,
|
|
|
- degreeEducation: res.elder.degreeEducation,
|
|
|
- maritalStatus: res.elder.maritalStatus,
|
|
|
- liveSituation: res.elder.liveSituation,
|
|
|
- economySource: res.elder.economySource,
|
|
|
- medicalInsurance: res.elder.medicalInsurance,
|
|
|
- elderName: res.elder.elderName
|
|
|
+ elderSex: pick('elderSex'),
|
|
|
+ papersType: pick('papersType'),
|
|
|
+ idCard: pick('idCard'),
|
|
|
+ birthday: pick('birthday'),
|
|
|
+ elderAge: pick('elderAge'),
|
|
|
+ nationId: pick('nationId'),
|
|
|
+ elderHeight: pick('elderHeight'),
|
|
|
+ elderWeight: pick('elderWeight'),
|
|
|
+ religiousBelief: pick('religiousBelief'),
|
|
|
+ degreeEducation: pick('degreeEducation'),
|
|
|
+ maritalStatus: pick('maritalStatus'),
|
|
|
+ liveSituation: pick('liveSituation'),
|
|
|
+ economySource: pick('economySource'),
|
|
|
+ medicalInsurance: pick('medicalInsurance'),
|
|
|
+ elderName: pick('elderName')
|
|
|
}
|
|
|
syntheticAbilityInfoListTemp = res.syntheticAbilityInfoList
|
|
|
// 打印的标题
|
|
|
@@ -847,10 +888,90 @@ const findValue = (arr, value, key = 'id', name = 'label') => {
|
|
|
return ''
|
|
|
}
|
|
|
|
|
|
-// 找到对应值的index
|
|
|
+// 解析 JSON 字符串数组(兼容已是数组或逗号分隔字符串的情况)
|
|
|
+const parseArr = (val: any): any[] => {
|
|
|
+ if (!val) return []
|
|
|
+ if (Array.isArray(val)) return val
|
|
|
+ try {
|
|
|
+ const arr = JSON.parse(val)
|
|
|
+ return Array.isArray(arr) ? arr : []
|
|
|
+ } catch (e) {
|
|
|
+ return String(val)
|
|
|
+ .split(',')
|
|
|
+ .filter((v) => v !== '')
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 字典值数组转标签文本,支持 '99-自定义内容' 形式
|
|
|
+const dictLabels = (dictType: string, val: any): string => {
|
|
|
+ return parseArr(val)
|
|
|
+ .map((v: any) => {
|
|
|
+ const idx = String(v).indexOf('-')
|
|
|
+ if (idx > -1) {
|
|
|
+ const code = String(v).slice(0, idx)
|
|
|
+ const extra = String(v).slice(idx + 1)
|
|
|
+ return (getDictLabel(dictType, code) || code) + ':' + extra
|
|
|
+ }
|
|
|
+ return getDictLabel(dictType, v) || v
|
|
|
+ })
|
|
|
+ .join('、')
|
|
|
+}
|
|
|
+
|
|
|
+// 牙齿缺失情况(0-3 为表单固定值,2-x/3-x 为字典值)
|
|
|
+const absenceOfTeethText = (val: any): string => {
|
|
|
+ const map = { 0: '无缺损', 1: '牙体缺损(如龋齿、楔状缺损)', 2: '牙列缺损', 3: '牙列缺失' }
|
|
|
+ return parseArr(val)
|
|
|
+ .map((v: any) => {
|
|
|
+ const idx = String(v).indexOf('-')
|
|
|
+ if (idx > -1) {
|
|
|
+ const code = String(v).slice(0, idx)
|
|
|
+ const extra = String(v).slice(idx + 1)
|
|
|
+ const label = map[code] || code
|
|
|
+ if (code === '2')
|
|
|
+ return label + ':' + (getDictLabel(DICT_TYPE.DEFECT_OF_DENTITION, extra) || extra)
|
|
|
+ if (code === '3')
|
|
|
+ return label + ':' + (getDictLabel(DICT_TYPE.DENTISTRY_MISSING, extra) || extra)
|
|
|
+ return label + ':' + extra
|
|
|
+ }
|
|
|
+ return map[v] || v
|
|
|
+ })
|
|
|
+ .join('、')
|
|
|
+}
|
|
|
+
|
|
|
+// 关节活动度(1-部位 形式)
|
|
|
+const motionOfJointText = (val: any): string => {
|
|
|
+ if (!val) return ''
|
|
|
+ const idx = String(val).indexOf('-')
|
|
|
+ const code = idx > -1 ? String(val).slice(0, idx) : String(val)
|
|
|
+ const extra = idx > -1 ? String(val).slice(idx + 1) : ''
|
|
|
+ if (code === '0') return '无,没有影响日常生活功能'
|
|
|
+ if (code === '1') return '是,影响日常生活功能' + (extra ? ',部位:' + extra : '')
|
|
|
+ if (code === '2') return '无法判断'
|
|
|
+ return String(val)
|
|
|
+}
|
|
|
+
|
|
|
+// 长期服药情况(对象数组:药品名称/服药方法/用药剂量/用药频次)
|
|
|
+const medicationText = (val: any): string => {
|
|
|
+ return parseArr(val)
|
|
|
+ .map((item: any) =>
|
|
|
+ typeof item === 'object'
|
|
|
+ ? [item.drugName, item.takeMedicine, item.dosage, item.frequency]
|
|
|
+ .filter(Boolean)
|
|
|
+ .join(' / ')
|
|
|
+ : String(item)
|
|
|
+ )
|
|
|
+ .filter(Boolean)
|
|
|
+ .join(';')
|
|
|
+}
|
|
|
+
|
|
|
+// 找到对应值的序号(按字典 value 匹配,兼容按 label 匹配)
|
|
|
const findValueIndex = (arr, value) => {
|
|
|
if (value) {
|
|
|
- let index = getDictOptions(arr).findIndex((item) => item.label == value)
|
|
|
+ const options = getDictOptions(arr)
|
|
|
+ let index = options.findIndex((item) => item.value == value)
|
|
|
+ if (index == -1) {
|
|
|
+ index = options.findIndex((item) => item.label == value)
|
|
|
+ }
|
|
|
if (index > -1) {
|
|
|
return index + 1
|
|
|
}
|