|
@@ -36,16 +36,17 @@
|
36
|
36
|
value-format="yyyy-MM-dd"
|
37
|
37
|
></el-date-picker>
|
38
|
38
|
</div>
|
|
39
|
+
|
39
|
40
|
<div class="cell clearfix">
|
40
|
41
|
<label class="title">
|
41
|
|
- <span class="name">转归状态</span> :
|
|
42
|
+ <span class="name">透析阶段</span> :
|
42
|
43
|
</label>
|
43
|
44
|
<div class="time">
|
44
|
45
|
<ul class>
|
45
|
46
|
<li
|
46
|
|
- :class="item.lapseto==lapsetoType?'active':''"
|
47
|
|
- @click="selectLapseTo( item.lapseto)"
|
48
|
|
- v-for="item in lapsetoState"
|
|
47
|
+ :class="item.value==dialysisStageType?'active':''"
|
|
48
|
+ @click="selectDialysisStage( item.value)"
|
|
49
|
+ v-for="item in dialysisStage"
|
49
|
50
|
:key="item.value"
|
50
|
51
|
>{{item.label}}</li>
|
51
|
52
|
</ul>
|
|
@@ -53,14 +54,14 @@
|
53
|
54
|
</div>
|
54
|
55
|
<div class="cell clearfix">
|
55
|
56
|
<label class="title">
|
56
|
|
- <span class="name">年龄</span> :
|
|
57
|
+ <span class="name">转归状态</span> :
|
57
|
58
|
</label>
|
58
|
59
|
<div class="time">
|
59
|
60
|
<ul class>
|
60
|
61
|
<li
|
61
|
|
- :class="item.age==ageType?'active':''"
|
62
|
|
- @click="selectAge( item.age)"
|
63
|
|
- v-for="item in ageOptions"
|
|
62
|
+ :class="item.lapseto==lapsetoType?'active':''"
|
|
63
|
+ @click="selectLapseTo( item.lapseto)"
|
|
64
|
+ v-for="item in lapsetoState"
|
64
|
65
|
:key="item.value"
|
65
|
66
|
>{{item.label}}</li>
|
66
|
67
|
</ul>
|
|
@@ -73,7 +74,7 @@
|
73
|
74
|
<el-row :gutter="32">
|
74
|
75
|
<el-col :xs="24" :sm="24" :lg="24">
|
75
|
76
|
<div class="chart-wrapper">
|
76
|
|
- <pie-chart title="留治情况" :options="CompletionOptions"/>
|
|
77
|
+ <pie-chart title="血压(从次)" :options="CompletionOptions"/>
|
77
|
78
|
</div>
|
78
|
79
|
</el-col>
|
79
|
80
|
</el-row>
|
|
@@ -90,17 +91,37 @@
|
90
|
91
|
:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
|
91
|
92
|
>
|
92
|
93
|
|
93
|
|
- <el-table-column label="透析号" min-width="100" property="dialysis_no" align="center">
|
|
94
|
+
|
|
95
|
+ <el-table-column label="透析日期" min-width="80" property="schedule_date" align="center">
|
|
96
|
+ <template slot-scope="scope"><span>{{getTime(scope.row.schedule_date, '{y}{m}{d}')}}</span></template>
|
94
|
97
|
</el-table-column>
|
95
|
|
- <el-table-column label="患者姓名" min-width="100" property="name" align="center">
|
|
98
|
+ <el-table-column label="透析号" min-width="100" property="patient" align="center">
|
|
99
|
+ <template slot-scope="scope"><span>{{scope.row.patient.dialysis_no}}</span></template>
|
96
|
100
|
</el-table-column>
|
97
|
|
- <el-table-column label="性别" min-width="80" property="gender" align="center">
|
98
|
|
- <template slot-scope="scope"><span>{{getPatientGender(scope.row.gender)}}</span></template>
|
|
101
|
+ <el-table-column label="患者姓名" min-width="100" property="patient" align="center">
|
|
102
|
+ <template slot-scope="scope"><span>{{scope.row.patient.name}}</span></template>
|
99
|
103
|
</el-table-column>
|
100
|
|
- <el-table-column label="年龄" min-width="80" property="birthday" align="center">
|
101
|
|
- <template slot-scope="scope"><span>{{tranAge(scope.row.birthday)}}</span></template>
|
|
104
|
+ <el-table-column label="性别" min-width="80" property="patient" align="center">
|
|
105
|
+ <template slot-scope="scope"><span>{{getPatientGender(scope.row.patient.gender)}}</span></template>
|
|
106
|
+ </el-table-column>
|
|
107
|
+ <el-table-column label="年龄" min-width="80" property="patient" align="center">
|
|
108
|
+ <template slot-scope="scope"><span>{{tranAge(scope.row.patient.birthday)}}</span></template>
|
|
109
|
+ </el-table-column>
|
|
110
|
+ <el-table-column label="转归状态" min-width="80" property="patient" align="center">
|
|
111
|
+ <template slot-scope="scope"><span>{{tranLapseto(scope.row.patient.lapseto)}}</span></template>
|
|
112
|
+ </el-table-column>
|
|
113
|
+ <el-table-column label="透前血压//mmHg" min-width="80" property="assessment_before_dislysis" align="center" :render-header="renderheader">
|
|
114
|
+ <template slot-scope="scope"><span>{{scope.row.assessment_before_dislysis&&scope.row.assessment_before_dislysis.systolic_blood_pressure&&scope.row.assessment_before_dislysis.diastolic_blood_pressure? scope.row.assessment_before_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_before_dislysis.diastolic_blood_pressure:'--'}}</span></template>
|
|
115
|
+ </el-table-column>
|
|
116
|
+ <el-table-column label="透析中最低血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
|
|
117
|
+ <template slot-scope="scope"><span>{{minBloodPressure(scope.row.monitor_records)}}</span></template>
|
|
118
|
+ </el-table-column>
|
|
119
|
+ <el-table-column label="透析中最高血压//mmHg" min-width="80" property="monitor_records" align="center" :render-header="renderheader">
|
|
120
|
+ <template slot-scope="scope"><span>{{maxBloodPressure(scope.row.monitor_records)}}</span></template>
|
|
121
|
+ </el-table-column>
|
|
122
|
+ <el-table-column label="透后血压//mmHg" min-width="80" property="assessment_after_dislysis" align="center" :render-header="renderheader">
|
|
123
|
+ <template slot-scope="scope"><span>{{scope.row.assessment_after_dislysis&&scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure? scope.row.assessment_after_dislysis.systolic_blood_pressure +'/'+scope.row.assessment_after_dislysis.diastolic_blood_pressure:'--'}}</span></template>
|
102
|
124
|
</el-table-column>
|
103
|
|
-
|
104
|
125
|
</el-table>
|
105
|
126
|
|
106
|
127
|
<!-- <pagi-nation title="分页"></pagi-nation> -->
|
|
@@ -123,7 +144,7 @@
|
123
|
144
|
|
124
|
145
|
|
125
|
146
|
<script>
|
126
|
|
-import { GetPATotalData } from "@/api/qcd";
|
|
147
|
+import { GetPABloodPressureData } from "@/api/qcd";
|
127
|
148
|
import PieChart from '../components/PieChart'
|
128
|
149
|
import {jsGetAge, uParseTime} from "@/utils/tools";
|
129
|
150
|
import analysisNav from './components/analysisNav'
|
|
@@ -156,13 +177,11 @@ export default {
|
156
|
177
|
{ value: 1, label: "转出", source: 0, lapseto: 2 },
|
157
|
178
|
{ value: 2, label: "留治", source: 0, lapseto: 1 }
|
158
|
179
|
],
|
159
|
|
- ageType: 0,
|
160
|
|
- ageOptions: [
|
161
|
|
- { value: 0, label: "全部", age: 0 },
|
162
|
|
- { value: 1, label: "20~30", age: 1 },
|
163
|
|
- { value: 2, label: "30~40", age: 2 },
|
164
|
|
- { value: 3, label: "40~50", age: 3 },
|
165
|
|
- { value: 4, label: "其他", age: 4 },
|
|
180
|
+ dialysisStageType:0,
|
|
181
|
+ dialysisStage: [
|
|
182
|
+ { value: 0, label: "全部", },
|
|
183
|
+ { value: 1, label: "透前", },
|
|
184
|
+ { value: 2, label: "透后", }
|
166
|
185
|
],
|
167
|
186
|
};
|
168
|
187
|
},
|
|
@@ -192,31 +211,52 @@ export default {
|
192
|
211
|
},
|
193
|
212
|
methods: {
|
194
|
213
|
getList() {
|
195
|
|
- GetPATotalData(this.listQuery).then(response => {
|
|
214
|
+ GetPABloodPressureData(this.listQuery).then(response => {
|
196
|
215
|
if (response.data.state == 0) {
|
197
|
216
|
this.$message.error(response.data.msg);
|
198
|
217
|
return false;
|
199
|
218
|
} else {
|
200
|
219
|
this.tableData = [];
|
201
|
220
|
this.total = response.data.data.total;
|
202
|
|
- var patients = response.data.data.patients;
|
203
|
|
- for (const index in patients) {
|
204
|
|
- this.tableData.push(patients[index]);
|
|
221
|
+ var blood_pressures = response.data.data.blood_pressures;
|
|
222
|
+ for (const index in blood_pressures) {
|
|
223
|
+ this.tableData.push(blood_pressures[index]);
|
205
|
224
|
}
|
206
|
|
- var lapsetoIn = response.data.data.lapsetoIn;
|
207
|
|
- var lapsetoOut = response.data.data.lapsetoOut;
|
208
|
225
|
this.CompletionOptions = {
|
209
|
226
|
legend:[],
|
210
|
227
|
series:[],
|
211
|
228
|
};
|
212
|
|
- this.CompletionOptions.legend.push('留治病人');
|
213
|
|
- this.CompletionOptions.series.push({
|
214
|
|
- value:lapsetoIn,name:'留治病人'
|
215
|
|
- });
|
216
|
|
- this.CompletionOptions.legend.push('转出病人');
|
217
|
|
- this.CompletionOptions.series.push({
|
218
|
|
- value:lapsetoOut,name:'转出病人'
|
219
|
|
- });
|
|
229
|
+
|
|
230
|
+ var bpOptions = [
|
|
231
|
+ { blood:1, name:'< 140 /90mmHg' },
|
|
232
|
+ { blood:2, name:'>160 /100mmHg' },
|
|
233
|
+ { blood:3, name:'140~160mmHg/90~100mmHg' },
|
|
234
|
+ ];
|
|
235
|
+ var other = response.data.data.total;
|
|
236
|
+ var bps = response.data.data.bps;
|
|
237
|
+ var bpsMap = {};
|
|
238
|
+ for (const index in bps) {
|
|
239
|
+ bpsMap[bps[index].blood] = bps[index].count;
|
|
240
|
+ other -= bps[index].count;
|
|
241
|
+ }
|
|
242
|
+ for (const index in bpOptions) {
|
|
243
|
+ this.CompletionOptions.legend.push(bpOptions[index].name);
|
|
244
|
+ if(bpOptions[index].blood in bpsMap) {
|
|
245
|
+ this.CompletionOptions.series.push({
|
|
246
|
+ value:bpsMap[bpOptions[index].blood],name:bpOptions[index].name
|
|
247
|
+ });
|
|
248
|
+ }else {
|
|
249
|
+ this.CompletionOptions.series.push({
|
|
250
|
+ value:0,name:bpOptions[index].name
|
|
251
|
+ });
|
|
252
|
+ }
|
|
253
|
+ }
|
|
254
|
+ if (other > 0) {
|
|
255
|
+ this.CompletionOptions.legend.push('其他');
|
|
256
|
+ this.CompletionOptions.series.push({
|
|
257
|
+ value:other,name:'其他'
|
|
258
|
+ });
|
|
259
|
+ }
|
220
|
260
|
}
|
221
|
261
|
});
|
222
|
262
|
},
|
|
@@ -239,12 +279,11 @@ export default {
|
239
|
279
|
this.listQuery.lapseto = lapseto;
|
240
|
280
|
this.getList();
|
241
|
281
|
},
|
242
|
|
- selectAge(age) {
|
243
|
|
- this.ageType = age;
|
244
|
|
- this.listQuery.age = age;
|
|
282
|
+ selectDialysisStage(dialysis_stage) {
|
|
283
|
+ this.dialysisStageType = dialysis_stage;
|
|
284
|
+ this.listQuery.dialysis_stage = dialysis_stage;
|
245
|
285
|
this.getList();
|
246
|
286
|
},
|
247
|
|
-
|
248
|
287
|
getTime(value, temp) {
|
249
|
288
|
if (value != undefined) {
|
250
|
289
|
return uParseTime(value, temp)
|
|
@@ -257,6 +296,14 @@ export default {
|
257
|
296
|
getPatientName(id) {
|
258
|
297
|
return (id in this.patientMap) ? this.patientMap[id].name:'';
|
259
|
298
|
},
|
|
299
|
+ tranLapseto(lapseto) {
|
|
300
|
+ if (lapseto == 1) {
|
|
301
|
+ return '留治';
|
|
302
|
+ } else if(lapseto == 2) {
|
|
303
|
+ return '转出';
|
|
304
|
+ }
|
|
305
|
+ return '';
|
|
306
|
+ },
|
260
|
307
|
getPatientGender(gender) {
|
261
|
308
|
if (gender == 1) {
|
262
|
309
|
return '男';
|
|
@@ -283,6 +330,63 @@ export default {
|
283
|
330
|
h('span', {}, column.label.split('//')[1])
|
284
|
331
|
])
|
285
|
332
|
},
|
|
333
|
+ maxBloodPressure(records){
|
|
334
|
+ if (typeof(records) == "undefined" || !records || records.length == 0) {
|
|
335
|
+ return '--';
|
|
336
|
+ }
|
|
337
|
+ var arr = [];
|
|
338
|
+ for (const key in records) {
|
|
339
|
+ arr.push(records[key]);
|
|
340
|
+ }
|
|
341
|
+ if(arr.length == 0) {
|
|
342
|
+ return '--';
|
|
343
|
+ }
|
|
344
|
+
|
|
345
|
+ var sortData = this.selectionSort(arr);
|
|
346
|
+ arr = [];
|
|
347
|
+ for (const key in sortData) {
|
|
348
|
+ arr.push(sortData[key]);
|
|
349
|
+ }
|
|
350
|
+ var index = arr.length - 1;
|
|
351
|
+ return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
|
|
352
|
+ },
|
|
353
|
+ minBloodPressure(records){
|
|
354
|
+
|
|
355
|
+ if (typeof(records) == "undefined" || !records || records.length == 0) {
|
|
356
|
+ return '--';
|
|
357
|
+ }
|
|
358
|
+ var arr = [];
|
|
359
|
+ for (const key in records) {
|
|
360
|
+ arr.push(records[key]);
|
|
361
|
+ }
|
|
362
|
+ if(arr.length == 0) {
|
|
363
|
+ return '--';
|
|
364
|
+ }
|
|
365
|
+
|
|
366
|
+ var sortData = this.selectionSort(arr);
|
|
367
|
+ arr = [];
|
|
368
|
+ for (const key in sortData) {
|
|
369
|
+ arr.push(sortData[key]);
|
|
370
|
+ }
|
|
371
|
+ var index = 0;
|
|
372
|
+ return arr[index].systolic_blood_pressure + '/' + arr[index].diastolic_blood_pressure
|
|
373
|
+ },
|
|
374
|
+ selectionSort(arr) {
|
|
375
|
+ var len = arr.length;
|
|
376
|
+ var minIndex, temp;
|
|
377
|
+ for (var i = 0; i < len - 1; i++) {
|
|
378
|
+ minIndex = i;
|
|
379
|
+ for (var j = i + 1; j < len; j++) {
|
|
380
|
+ if (arr[j].systolic_blood_pressure < arr[minIndex].systolic_blood_pressure || (arr[j].systolic_blood_pressure == arr[minIndex].systolic_blood_pressure && arr[j].diastolic_blood_pressure < arr[minIndex].diastolic_blood_pressure)) { //寻找最小的数
|
|
381
|
+ minIndex = j; //将最小数的索引保存
|
|
382
|
+ }
|
|
383
|
+ }
|
|
384
|
+ temp = arr[i];
|
|
385
|
+ arr[i] = arr[minIndex];
|
|
386
|
+ arr[minIndex] = temp;
|
|
387
|
+ }
|
|
388
|
+ return arr;
|
|
389
|
+ },
|
286
|
390
|
},
|
287
|
391
|
components: {
|
288
|
392
|
analysisNav,
|