|
|
@ -2,7 +2,7 @@ |
|
|
|
<view class=""> |
|
|
|
<uni-section type="line" title="患者急救记录" titleFontSize="16px"> </uni-section> |
|
|
|
<uni-forms :modelValue="codeAidForm" :label-width="160" class="white uni-radius-lg uni-pa-10"> |
|
|
|
<uni-forms-item :name="key" v-for="(item, key) in codeAidForm" :key="key"> |
|
|
|
<uni-forms-item :name="key" v-for="key in part1" :key="key"> |
|
|
|
<template v-slot:label> |
|
|
|
<view class="full-height flex" style="width: 135px"> |
|
|
|
<!-- @ts-ignore --> |
|
|
@ -11,27 +11,55 @@ |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<!-- {{ key }} --> |
|
|
|
<CodeFormItem :code="key" :value="item" @on-change="onChange(key, $event)" /> |
|
|
|
<CodeFormItem :code="key" :value="codeAidForm[key]" @on-change="onChange(key, $event)" /> |
|
|
|
</uni-forms-item> |
|
|
|
</uni-forms> |
|
|
|
|
|
|
|
<uni-section type="line" title="疑似诊断" titleFontSize="16px"> </uni-section> |
|
|
|
<!-- <uni-data-checkbox mode="list" v-model="baseInfo.firstAidZlType" :localdata="FIRST_AID_ZL_TYPE" class="white uni-radius-lg uni-pa-6" |
|
|
|
@change="onBaseChange('firstAidZlType', $event.detail.value)"> |
|
|
|
</uni-data-checkbox> --> |
|
|
|
<uni-section type="line" title="初步判断" titleFontSize="16px"> </uni-section> |
|
|
|
<view class="white"> |
|
|
|
<uni-data-checkbox mode="list" v-model="codeAidForm['RYPG-ZDJG']" :localdata="CHU_BU_PAN_DUAN" class="white uni-radius-lg uni-pa-6" |
|
|
|
@change="onChange('RYPG-ZDJG', $event.detail.value)"> |
|
|
|
</uni-data-checkbox> |
|
|
|
<view class="u-p-b-20 u-p-l-30 u-p-r-30" v-if="codeAidForm['RYPG-ZDJG'] === '其他'"> |
|
|
|
<uni-easyinput v-model="codeAidForm['RYPG-ZDJG-ELSE']" type="text" placeholder="请输入其他" @change="onChange('RYPG-ZDJG-ELSE', $event)" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uni-section type="line" title="主要治疗操作" titleFontSize="16px"> </uni-section> |
|
|
|
<uni-forms :modelValue="codeAidForm" :label-width="160" class="white uni-radius-lg uni-pa-10"> |
|
|
|
<uni-forms-item label="是否进行静脉溶栓" name="JMRS-Y"> |
|
|
|
<uni-data-checkbox v-model="codeAidForm['JMRS-Y']" :localdata="CODE_DICT['JMRS-Y'].range" |
|
|
|
@change="onChange('JMRS-Y', $event.detail.value)"> |
|
|
|
</uni-data-checkbox> |
|
|
|
</uni-forms-item> |
|
|
|
<view class="white"> |
|
|
|
<view>未溶栓原因</view> |
|
|
|
<uni-data-checkbox mode="list" :multiple="true" v-model="codeAidForm['JMRS-WRSYY']" :localdata="CODE_DICT['JMRS-WRSYY'].range" |
|
|
|
class="white uni-radius-lg uni-pa-6" @change="onChange('JMRS-WRSYY', $event.detail.value)"> |
|
|
|
</uni-data-checkbox> |
|
|
|
<view class="u-p-b-20 u-p-l-30 u-p-r-30" v-if="codeAidForm['JMRS-WRSYY'].includes('其他')"> |
|
|
|
<uni-easyinput v-model="codeAidForm['JMRS-WRSYY-ELSE']" type="text" placeholder="请输入其他" |
|
|
|
@change="onChange('JMRS-WRSYY-ELSE', $event)" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-forms> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script lang="ts" setup> |
|
|
|
import { reactive, computed, inject } from 'vue'; |
|
|
|
import { reactive, computed, inject, ref } from 'vue'; |
|
|
|
import type { Ref } from 'vue' |
|
|
|
import { GET_GENDER_TEXT_BY_CODE } from '@/config/service' |
|
|
|
import { GET_GENDER_TEXT_BY_CODE, CHU_BU_PAN_DUAN } from '@/config/service' |
|
|
|
import { useServiceStore } from '@/store/modules/service'; |
|
|
|
import { CODE_DICT } from '@/config/code'; |
|
|
|
import { computeBMI } from '@/utils/common' |
|
|
|
|
|
|
|
|
|
|
|
const firstAidId = inject<Ref<string>>('firstAidId') |
|
|
|
const serviceStore = useServiceStore() |
|
|
|
|
|
|
|
const part1 = ['RYPG-HEIGHT', 'RYPG-WEIGHT', 'RYPG-GENDER', 'RYPG-BMI', 'RYPG-SYSTOLIC-PRESSURE', 'RYPG-DIASTOLIC-PRESSURE', 'RYPG-PULSE', 'RYPG-MRS', 'RYPG-NIHSS', 'RYPG-BLOOD-REPORT-TIME', 'RYPG-BLOOD-SUGAR', 'RYPG-CT-LK-TIME'] |
|
|
|
|
|
|
|
const codeAidForm = reactive({ |
|
|
|
'RYPG-HEIGHT': '', |
|
|
|
'RYPG-WEIGHT': '', |
|
|
@ -44,10 +72,18 @@ const codeAidForm = reactive({ |
|
|
|
'RYPG-NIHSS': '', |
|
|
|
'RYPG-BLOOD-REPORT-TIME': '', |
|
|
|
'RYPG-BLOOD-SUGAR': '', |
|
|
|
'RYPG-CT-LK-TIME': '' |
|
|
|
'RYPG-CT-LK-TIME': '', |
|
|
|
|
|
|
|
'RYPG-ZDJG': '', // 初步判断 |
|
|
|
'RYPG-ZDJG-ELSE': '', // 初步判断 - 其他 |
|
|
|
|
|
|
|
'JMRS-Y': '', |
|
|
|
'JMRS-WRSYY': [''], |
|
|
|
'JMRS-WRSYY-ELSE': '' |
|
|
|
}) |
|
|
|
|
|
|
|
const currentPatient = computed(() => serviceStore.currentPatient) |
|
|
|
const currentCar = computed(() => serviceStore.currentCar) |
|
|
|
|
|
|
|
// code form item change |
|
|
|
async function onChange(code: string, value: string) { |
|
|
@ -57,7 +93,11 @@ async function onChange(code: string, value: string) { |
|
|
|
uni.$u.alertError('缺少急救id参数') |
|
|
|
return |
|
|
|
} |
|
|
|
const param = { codeAndAnswerList: [{ questionCode: code, answer: [value], time: '' }], firstAidId: firstAidId?.value, sourceId: '', sourceType: '' } |
|
|
|
if (code === 'RYPG-HEIGHT') { |
|
|
|
codeAidForm['RYPG-BMI'] = computeBMI(value, codeAidForm['RYPG-WEIGHT']) |
|
|
|
} |
|
|
|
const answer = typeof value === 'string' ? [value] : value |
|
|
|
const param = { codeAndAnswerList: [{ questionCode: code, answer, time: '' }], firstAidId: firstAidId?.value, sourceId: '', sourceType: '' } |
|
|
|
await uni.$u.api.updateAidCode(param) |
|
|
|
uni.$u.toast('更新成功') |
|
|
|
} catch (error) { |
|
|
@ -79,7 +119,9 @@ function init() { |
|
|
|
codeAidForm[key] = recordValDict[key][0]?.answer[0] || '' |
|
|
|
} |
|
|
|
|
|
|
|
codeAidForm['RYPG-GENDER'] = GET_GENDER_TEXT_BY_CODE[patientGender] |
|
|
|
codeAidForm['RYPG-GENDER'] = GET_GENDER_TEXT_BY_CODE(patientGender) || '' |
|
|
|
codeAidForm['RYPG-WEIGHT'] = currentCar.value?.sensorWeight?.toString() || '' |
|
|
|
codeAidForm['RYPG-BMI'] = computeBMI(codeAidForm['RYPG-HEIGHT'], codeAidForm['RYPG-WEIGHT']) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|