Browse Source

20250311

master
nicky 4 months ago
parent
commit
ac69ee0138
  1. 56
      src/config/code.js
  2. 97
      src/views/thrombolysis/components/throm-before1.vue
  3. 250
      src/views/thrombolysis/components/throm-result-baseInfo.vue
  4. 205
      src/views/thrombolysis/components/throm-result-sop.vue
  5. 21
      src/views/thrombolysis/components/throm-result.vue

56
src/config/code.js

@ -477,34 +477,7 @@ export const NIHSS_LIST = [{
text: '严重的偏侧忽视或一种以上的偏侧忽视;不认识自己的手;只能对一侧空间定位 ',
},
],
},
{
text: '12.心率',
description: '',
value: null,
visible: false,
hidePopover: true,
key: '12-score',
range: [0, 200],
},
{
text: '13.血氧饱和度',
description: '',
value: null,
visible: false,
hidePopover: true,
key: '13-score',
range: [0, 100],
},
{
text: '14.格拉斯评分',
description: '',
value: null,
visible: false,
hidePopover: true,
key: '14-score',
range: [0, 15],
},
}
];
//急诊病情评估
@ -542,6 +515,33 @@ export const EMERGENCY_CODE = {
default: 0,
range: NIHSS_LIST,
},
'BQPG-XL': {
text: '心率',
description: '',
type: 'pageNumer',
inputType: 'number',
rightArrow: true,
default: undefined,
range: [0, 200],
},
'BQPG-SAO2': {
text: '血氧饱和度',
description: '',
type: 'pageNumer',
inputType: 'number',
rightArrow: true,
default: undefined,
range: [0, 100],
},
'BQPG-GCS': {
text: '格拉斯评分',
description: '',
type: 'pageNumer',
inputType: 'number',
rightArrow: true,
default: undefined,
range: [0, 15],
},
};
//0min
export const EMERGENCY_Q_CODE = {

97
src/views/thrombolysis/components/throm-before1.vue

@ -69,11 +69,11 @@
<a-icon v-if="item.description" class="item-icon" type="question-circle" />
</a-tooltip>
</div>
<a-input-number :disabled="writeAble" ref="inputNumber" class="noControls"
<!-- <a-input-number :disabled="writeAble" ref="inputNumber" class="noControls"
@change="handleInputChange($event, item, v)" v-if="item.hidePopover"
style="width: 20%; margin-left: 20px" v-model="item.value" :min="item.range[0]"
:max="item.range[1]" />
<a-popover v-model="item.visible" placement="bottom" v-else>
:max="item.range[1]" /> -->
<a-popover v-model="item.visible" placement="bottom">
<template slot="content" v-if="item.range">
<a-radio-group :disabled="writeAble" v-model="nissValue" button-style="solid"
@change="changeRangeRadio(item, v)">
@ -90,6 +90,15 @@
</a-popover>
</div>
</div>
<div class="mrsitem" v-if="k.type === 'pageNumer'">
<div class="niss-list-item" :key="k.text">
<!--@change="handleInputChange($event, item, v)" style="width: 100%; margin-left: 20px"-->
<a-input-number :disabled="writeAble" ref="inputNumber" class="noControls" style="width: 100%;"
v-decorator="[v, { initialValue: k.default }]" :min="k.range[0]" :max="k.range[1]" />
</div>
</div>
</div>
</div>
</a-form-item>
@ -128,6 +137,9 @@
'RYPG-DIASTOLIC-PRESSURE': '',
'RYPG-MRS': '',
'RYPG-NIHSS': '',
'BQPG-XL': '',
'BQPG-SAO2': '',
'BQPG-GCS': '',
},
codeFormData: {
'JMRS-Q-NIHSS': {
@ -175,11 +187,12 @@
const {
code
} = this.timerData;
if (code) {
this.recordDict = this.dataForm[`${code}`];
} else {
this.recordDict = EMERGENCY_CODE;
}
this.recordDict = EMERGENCY_CODE;
// if (code) {
// this.recordDict = this.dataForm[`${code}`];
// } else {
// this.recordDict = EMERGENCY_CODE;
// }
const {
recordValDict
@ -198,9 +211,8 @@
code
} = this.timerData;
// console.log('code', code)
const wangbadan = code ?
this.codeFormData[`${code}`] :
this.codeForm;
// const wangbadan = code ? this.codeFormData[`${code}`] : this.codeForm;
const wangbadan = this.codeForm;
for (let k in wangbadan) {
if (data[k]) {
const {
@ -228,6 +240,17 @@
this.NIHSS_LIST[k].value = Number(data['RYPG-NIHSS' + this.NIHSS_LIST[k].key][0]?.answer[0])
}
}
// const {
// recordDict
// } = this;
// if (recordDict['RYPG-MRS2']) {
// for (let k in recordDict['RYPG-MRS2']['range']) {
// const mrsdata = recordDict['RYPG-MRS2']['range'][k]
// if (data[mrsdata.key]) {
// mrsdata.value = Number(data[mrsdata.key][0]?.answer[0])
// }
// }
// }
},
focusInput(index) {
this.$refs.inputNumber[index].readOnly = true;
@ -259,24 +282,24 @@
row.visible = false;
},
handleInputChange(val, row, code) {
const text = row.text;
let score = 0;
let NIHSS_LIST = [].concat(this.NIHSS_LIST);
NIHSS_LIST.forEach((item, index) => {
console.log(typeof val)
if (item.text === text) {
item.value = val;
}
if (item.value) {
score += item.value;
}
});
this.form.getFieldDecorator([`${code}`], {
preserve: true, //便使
});
this.form.setFieldsValue({
[`${code}`]: score
});
// const text = row.text;
// let score = 0;
// let NIHSS_LIST = [].concat(this.NIHSS_LIST);
// NIHSS_LIST.forEach((item, index) => {
// console.log(typeof val)
// if (item.text === text) {
// item.value = val;
// }
// if (item.value) {
// score += item.value;
// }
// });
// this.form.getFieldDecorator([`${code}`], {
// preserve: true, //便使
// });
// this.form.setFieldsValue({
// [`${code}`]: score
// });
},
changeRadio(e, v) {
this.codeForm[v] = e.target.value;
@ -304,7 +327,7 @@
'JMRS-45-NIHSS',
'JMRS-60-NIHSS',
];
const codesEm = ['RYPG-MRS', 'RYPG-NIHSS'];
const codesEm = ['RYPG-MRS', 'RYPG-NIHSS','BQPG-XL', 'BQPG-SAO2', 'BQPG-GCS'];
const codesQ = [
'JMRS-Q-NIHSS',
'JMRS-15-NIHSS',
@ -366,6 +389,20 @@
}
// if (recordDict['RYPG-MRS2']) {
// for (let k in recordDict['RYPG-MRS2']['range']) {
// const mrsdata = recordDict['RYPG-MRS2']['range'][k]
// if (mrsdata.value) {
// codeAndAnswerList.push({
// questionCode: mrsdata.key,
// answer: [mrsdata.value || 0],
// time: '',
// });
// }
// }
// }
console.log('codeAndAnswerList', codeAndAnswerList)
this.home.updateAidCode({

250
src/views/thrombolysis/components/throm-result-baseInfo.vue

@ -4,104 +4,103 @@
<!-- 患者基本信息 -->
<div class='basicr-back'>
<a-form class="detail-form" :form="baseForm">
<a-row>
<a-col :span="16">
<div class="idCardItem">
<a-upload :disabled="writeAble || !editAuth" class="idcard-upload" accept=".img,.png,.jpg"
:before-upload="handleBeforeUpload" :showUploadList="false" name="file"
:multiple="false" :customRequest="handleUploadAdd">
<a-icon type="scan" class="scanicon" /><span>扫描身份证</span>
</a-upload>
</div>
</a-col>
<a-col :span="8">
<div style="text-align: right;" v-if="!writeAble">
<a-button type="primary" @click="handleEdit">{{editAuth ? '保存' : '编辑'}}</a-button>
</div>
</a-col>
</a-row>
<a-form-item label="姓名">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['patientName']"
@blur="onBaseChange($event.target.value, 'patientName')" placeholder='请输入' />
</div>
</a-form-item>
<a-form-item label="性别">
<div class="detail-form-control">
<a-radio-group :disabled="writeAble || !editAuth" v-decorator="['patientGender']"
@change="onBaseChange($event.target.value, 'patientGender')">
<a-radio :value='0'> </a-radio>
<a-radio :value='1'> </a-radio>
</a-radio-group>
</div>
</a-form-item>
<a-form-item label="民族">
<div class="detail-form-control">
<a-select :disabled="writeAble || !editAuth" ref="select" v-decorator="['patientNation']"
@change="handleChange($event, 'patientNation', 'default')" placeholder='请选择'>
<a-select-option v-for="item in nationList" :key="item" :value="item">
{{item}}
</a-select-option>
</a-select>
</div>
</a-form-item>
<a-form-item label="联系方式">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['phone']"
@blur="onBaseChange($event.target.value, 'phone')" placeholder='请输入' />
</div>
</a-form-item>
<a-form-item label="身份证号">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['patientIdCardNo']" placeholder='请输入'
@blur="onBaseChange($event.target.value, 'patientIdCardNo')" />
</div>
</a-form-item>
<a-form-item v-for="(k,v) in BASE_CODE" :key="v" :label="k.text" v-if="computeShow(v, codeForm)">
<div class="detail-form-control">
<!-- radio -->
<a-radio-group :disabled="writeAble || !editAuth" v-if="k.type==='radio'"
v-decorator="[
<a-row>
<a-col :span="16">
<div class="idCardItem">
<a-upload :disabled="writeAble || !editAuth" class="idcard-upload"
accept=".img,.png,.jpg" :before-upload="handleBeforeUpload" :showUploadList="false"
name="file" :multiple="false" :customRequest="handleUploadAdd">
<a-icon type="scan" class="scanicon" /><span>扫描身份证</span>
</a-upload>
</div>
</a-col>
<a-col :span="8">
<div style="text-align: right;" v-if="!writeAble">
<a-button type="primary" @click="handleEdit">{{editAuth ? '保存' : '编辑'}}</a-button>
</div>
</a-col>
</a-row>
<a-form-item label="姓名">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['patientName']"
@blur="onBaseChange($event.target.value, 'patientName')" placeholder='请输入' />
</div>
</a-form-item>
<a-form-item label="性别">
<div class="detail-form-control">
<a-radio-group :disabled="writeAble || !editAuth" v-decorator="['patientGender']"
@change="onBaseChange($event.target.value, 'patientGender')">
<a-radio :value='0'> </a-radio>
<a-radio :value='1'> </a-radio>
</a-radio-group>
</div>
</a-form-item>
<a-form-item label="民族">
<div class="detail-form-control">
<a-select :disabled="writeAble || !editAuth" ref="select" v-decorator="['patientNation']"
@change="handleChange($event, 'patientNation', 'default')" placeholder='请选择'>
<a-select-option v-for="item in nationList" :key="item" :value="item">
{{item}}
</a-select-option>
</a-select>
</div>
</a-form-item>
<a-form-item label="联系方式">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['phone']"
@blur="onBaseChange($event.target.value, 'phone')" placeholder='请输入' />
</div>
</a-form-item>
<a-form-item label="身份证号">
<div class="detail-form-control">
<a-input :disabled="writeAble || !editAuth" v-decorator="['patientIdCardNo']"
placeholder='请输入' @blur="onBaseChange($event.target.value, 'patientIdCardNo')" />
</div>
</a-form-item>
<a-form-item v-for="(k,v) in BASE_CODE" :key="v" :label="k.text" v-if="computeShow(v, codeForm)">
<div class="detail-form-control">
<!-- radio -->
<a-radio-group :disabled="writeAble || !editAuth" v-if="k.type==='radio'" v-decorator="[
v,
{initialValue: codeForm[k] },
]" @change="handleChange($event.target.value, v)">
<a-radio v-for="(item,index) in k.range" :key="item" :value="item">
{{item}}
</a-radio>
</a-radio-group>
<!-- input -->
<a-input :disabled="writeAble || !editAuth" v-if="k.type==='input'" :type="k.inputType" v-decorator="[
<a-radio v-for="(item,index) in k.range" :key="item" :value="item">
{{item}}
</a-radio>
</a-radio-group>
<!-- input -->
<a-input :disabled="writeAble || !editAuth" v-if="k.type==='input'" :type="k.inputType"
v-decorator="[
v]" @blur="handleChange($event.target.value, v)" placeholder='请输入'>
</a-input>
<!-- datetime -->
<a-input :disabled="writeAble || !editAuth" v-if="k.type==='datetime'" readOnly @click="selectOption(v)"
v-decorator="[
</a-input>
<!-- datetime -->
<a-input :disabled="writeAble || !editAuth" v-if="k.type==='datetime'" readOnly
@click="selectOption(v)" v-decorator="[
v,
]" placeholder='请选择'>
</a-input>
<a-select :disabled="writeAble || !editAuth" v-if="k.type==='select'" v-decorator="[
</a-input>
<a-select :disabled="writeAble || !editAuth" v-if="k.type==='select'" v-decorator="[
v]" @change="handleChange($event, v)" placeholder='请选择' style="display: block;">
<a-select-option v-for="item in k.range" :key="item" :value="item">
{{item}}
</a-select-option>
</a-select>
</div>
</a-form-item>
<a-select-option v-for="item in k.range" :key="item" :value="item">
{{item}}
</a-select-option>
</a-select>
</div>
</a-form-item>
</a-form>
</div>
<!-- 疑似诊断 -->
<div class='diagnosis'>
<v-head text='疑似诊断'></v-head>
<div class='back-ff'>
<a-radio-group :disabled="writeAble || !editAuth" v-model:value="firstAidZlType"
<a-radio-group :disabled="writeAble || !editAuth" v-model:value="firstAidZlType"
@change="onBaseChange($event.target.value, 'firstAidZlType')">
<a-radio :style="radioStyle" v-for="(k,v) in FIRSTAIDZLTYPE_DICT" :key="v"
:value="v">{{k}}</a-radio>
@ -171,7 +170,7 @@
'JBXX-LYFS': '',
},
firstAidZlType: 0, //
selectCode: '' ,// code,
selectCode: '', // code,
form: {},
editAuth: false
}
@ -335,10 +334,10 @@
}
return isLt10M;
},
async handleEdit(e){
if(!this.editAuth){
async handleEdit(e) {
if (!this.editAuth) {
this.editAuth = true
}else{
} else {
this.onSubmit(e, true)
}
},
@ -349,7 +348,7 @@
params = {
firstAidId
}
const codes = ['patientGender', 'patientIdCardNo', 'patientName', 'patientNation']
const codes = ['patientGender', 'patientIdCardNo', 'patientName', 'patientNation', 'phone']
this.$nextTick(async () => {
this.baseForm.validateFields(async (err, values) => {
for (var k in values) {
@ -369,11 +368,11 @@
params[`${k}`] = values[k]
}
}
if(!this.patientId) {
if (!this.patientId) {
await updateFirstAid({
...values,
firstAidZlType: this.firstAidZlType,
firstAidId:this.form.firstAidId
firstAidId: this.form.firstAidId
})
await this.home.updateAidCode({
...values,
@ -381,19 +380,19 @@
codeAndAnswerList
}, false)
this.editAuth = false
if(!s) this.$emit('next')
}else{
if (!s) this.$emit('next')
} else {
await updateFirstAid(params)
const res = await saveAidRecord({
firstAidId:this.form.firstAidId,
firstAidId: this.form.firstAidId,
codeAndAnswerList,
...params
});
this.$message.success(res.msg)
this.$emit('ok')
}
})
})
},
@ -454,29 +453,33 @@
margin-top: 20px;
padding: 0 10%;
}
.basicr-back,.diagnosis{
width:100%;
float:left;
.basicr-back,
.diagnosis {
width: 100%;
float: left;
}
.basicr-back .ant-form-item:nth-child(odd){
width:48%;
float:left;
.basicr-back .ant-form-item:nth-child(odd) {
width: 48%;
float: left;
}
.basicr-back .ant-form-item:nth-child(even){
width:49%;
float:left;
.basicr-back .ant-form-item:nth-child(even) {
width: 49%;
float: left;
}
.basicr-back .ant-form-item:nth-child(even) {
border-right: 1px solid #ddd;
border-radius: 0;
padding-right:2% !important;
margin-right:2% !important;
border-radius: 0;
padding-right: 2% !important;
margin-right: 2% !important;
}
.detail-form .ant-form-item .ant-form-item-label{
.detail-form .ant-form-item .ant-form-item-label {
width: 170px;
}
</style>
<style scoped>
>>>.ant-btn-link {
@ -523,11 +526,13 @@
padding: 10px 20px;
border-radius: 12px;
}
.diagnosis .ant-radio-wrapper{
float:left;
font-size:18px;
.diagnosis .ant-radio-wrapper {
float: left;
font-size: 18px;
}
.idCardItem{
.idCardItem {
width: 29.45vw;
height: 4.09vw;
background: rgba(101, 154, 255, 0.11);
@ -535,13 +540,15 @@
border: 1px solid #007AFF;
text-align: center;
line-height: 4.09vw;
span{
span {
font-size: 20px;
color: #3D3D3D;
}
}
.scanicon{
font-size:18px;
.scanicon {
font-size: 18px;
display: inline-block;
position: relative;
top: 1px;
@ -552,10 +559,11 @@
<style lang="less">
.throm-basic-info {
.detail-form .ant-form-item .ant-form-item-label{
.detail-form .ant-form-item .ant-form-item-label {
width: 150px !important;
}
.detail-form .ant-form-item .ant-form-item-label > label::after{
.detail-form .ant-form-item .ant-form-item-label>label::after {
content: ':';
}
}

205
src/views/thrombolysis/components/throm-result-sop.vue

@ -0,0 +1,205 @@
<template>
<div class="throm-result-sop">
<!-- <a-card class="report-card" title="溶栓状态"> -->
<div class="report-timeline">
<!-- <a-steps progress-dot :current="currentIndex" direction="vertical">
<template v-for="(item, index) in getNodeList">
<a-step v-if="item.nodeType === 0"
:status="processNodeIndex == index ? 'process' : processNodeIndex > index && item.record ? 'finish' : 'wait' ">
<div slot="title" style="display: flex;justify-content: space-between;width: 100%">
<div>{{item.nodeName}}</div>
<div>
{{processNodeIndex == index ? '进行中' : processNodeIndex > index && item.record ? '已完成' : ''}}
</div>
</div>
<div slot="description">{{item.record ? item.record.answer[0] : ''}}</div>
</a-step>
</template>
</a-steps> -->
<a-timeline>
<a-timeline-item node-top="4" v-for="(item, index) in getNodeList" :key="item.nodeName"
:color="item.record ? '#00c767' : '#ff4a44'" v-if="item.nodeType === 0">
<div class="flex justify-between" :class="
item.record ? 'cor-green' : 'cor-red'
">
<div class="fz24 font-bold">
{{ item.nodeName }}
</div>
<div class="fz24 font-bold">
{{ item.record ? '已完成' : '' }}
</div>
</div>
<div class="fz20 text-left" :class="
item.record ? 'cor-green' : 'cor-red'
">
{{
item.record ? item.record.answer[0] : ''
}}
</div>
</a-timeline-item>
</a-timeline>
</div>
<!-- </a-card> -->
<div class="throm-common-button">
<a-button class="" block type="primary" size="large" @click="onSubmit">下一步</a-button>
</div>
</div>
</template>
<script>
import {
mapMutations,
mapState
} from 'vuex';
import {
getNextNode
} from 'api';
export default {
name: '',
data() {
return {
currentIndex: 0,
processNodeIndex: 0,
nodeInfo: {
fbsj: '',
jfbSeconds: '',
dntSeconds: '',
ctSeconds: '',
nextStepName: '',
countDownInSeconds: '',
nodeList: [],
},
}
},
props: {
reportType: {
type: String,
default: "",
},
dataSource: {
type: Object,
default: () => ({})
},
firstAidId: {
type: String,
default: "",
}
},
async mounted() {
console.log(this.reportType, this.firstAidId)
if (this.reportType == 'modal') {
this.init(this.dataSource.firstAidId);
} else if (this.firstAidId) {
this.init(this.firstAidId);
}
},
computed: {
getNodeList() {
const {
sop
} = this.nodeInfo;
if (!sop) return [];
const lastFinishIndex = sop.nodeList.findIndex(a => !!a.record) || 0
this.processNodeIndex = lastFinishIndex + 1
return sop.nodeList;
},
},
methods: {
...mapMutations('patient', ['setNextNodeData']),
//
async init(firstAidId) {
this.getNextNode(firstAidId);
},
async getNextNode(firstAidId) {
let res = await getNextNode({
firstAidId,
});
const {
data,
code,
msg
} = res;
if (code === 200) {
console.log('this.nodeInfo', data)
this.nodeInfo = data;
this.setNextNodeData(data);
} else {
this.$message.error('缺少急救id信息');
}
},
onSubmit() {
this.$emit('next')
}
}
}
</script>
<style lang="less">
.throm-result-sop {
.report-timeline {
overflow-y: auto;
padding: 12px;
min-height: 300px;
.flex {
display: flex;
justify-content: space-between;
}
.cor-green {
color: #00c767;
}
.cor-red {
color: #ff4a44;
}
.font-xl {
font-size: 22px;
font-weight: bold;
}
.ant-steps {
height: 100%;
padding-bottom: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
.ant-steps-item .ant-steps-item-container {
display: flex;
.ant-steps-item-content {
flex: 1;
text-align: right;
}
}
}
.ant-steps-item-title {
padding: 0;
width: 100%;
}
.ant-steps-item-finish {
.ant-steps-item-title {
color: #000000;
}
}
.ant-steps-item-process {
.ant-steps-item-title {
color: #007AFF;
// // border-bottom: 1px solid #007AFF;
// border-bottom: 3px solid transparent;
// /* */
// border-image: linear-gradient(to right, #fff, #007AFF) 1;
// /* 使 */
// border-radius: 10px;
// /* */
}
}
}
}
</style>

21
src/views/thrombolysis/components/throm-result.vue

@ -2,15 +2,20 @@
<div class="throm-result">
<div class="throm-step">
<a-steps progress-dot :current="currentIndex" direction="vertical" @change="handleClickStep">
<a-step :status="currentIndex == 0 ? 'process' : currentIndex > 0 ? 'finish' : 'wait'" title="患者基本信息" />
<a-step :status="currentIndex == 1 ? 'process' : currentIndex > 1 ? 'finish' : 'wait'" title="急救信息记录" />
<a-step :status="currentIndex == 0 ? 'process' : currentIndex > 0 ? 'finish' : 'wait'" title="SOP流程" />
<a-step :status="currentIndex == 1 ? 'process' : currentIndex > 1 ? 'finish' : 'wait'" title="患者基本信息" />
<a-step :status="currentIndex == 2 ? 'process' : currentIndex > 2 ? 'finish' : 'wait'" title="急救信息记录" />
</a-steps>
</div>
<div class="throm-content">
<div v-if="currentIndex == 0">
<throm-result-baseInfo @next="handleNext"></throm-result-baseInfo>
<throm-result-sop @next="handleNext" :firstAidId="patientData.firstAidId"></throm-result-sop>
</div>
<div v-else-if="currentIndex == 1">
<throm-result-baseInfo @next="handleNext"></throm-result-baseInfo>
</div>
<div v-else-if="currentIndex == 2">
<throm-result-firstInfo @next="handleNextStep"></throm-result-firstInfo>
</div>
</div>
@ -18,13 +23,21 @@
</template>
<script>
import {
mapState
} from 'vuex'
import ThromResultBaseInfo from './throm-result-baseInfo.vue';
import ThromResultFirstInfo from './throm-result-firstInfo.vue';
import ThromResultSop from './throm-result-sop.vue';
export default {
name: "ThromResult",
components: {
ThromResultBaseInfo,
ThromResultFirstInfo
ThromResultFirstInfo,
ThromResultSop
},
computed: {
...mapState('patient', ['patientData']),
},
data() {
return {

Loading…
Cancel
Save