see999 3 vuotta sitten
vanhempi
commit
3ff6c2d5dd

+ 1 - 1
src/xt_pages/dialysis/details/BasicInfor.vue Näytä tiedosto

@@ -138,7 +138,7 @@ export default {
138 138
     }
139 139
   },
140 140
   created() {
141
-    this.dialysis_time = parseTime(this.$route.query.date, '{y}-{m}-{d}')
141
+    this.dialysis_time = this.$route.query.date ? parseTime(this.$route.query.date, '{y}-{m}-{d}') : parseTime(new Date(), '{y}-{m}-{d}')
142 142
   }
143 143
 }
144 144
 </script>

+ 939 - 0
src/xt_pages/outpatientDoctorStation/components/dialysisIndex.vue Näytä tiedosto

@@ -0,0 +1,939 @@
1
+<template>
2
+  <div class="main-contain">
3
+
4
+    <div
5
+      class="loadingBox"
6
+      v-loading="loading"
7
+      element-loading-text="拼命加载中"
8
+      element-loading-spinner="el-icon-loading"
9
+      element-loading-background="rgba(0, 0, 0, 0.8)"
10
+    >
11
+    <div style="padding-top: 56px;width:100%;">
12
+
13
+      <nav-igation
14
+        ref="nav"
15
+        title="弹窗导航"
16
+        @advice="adviceFunc"
17
+        :patient="patient"
18
+        :schedual="schedual"
19
+        :prescription="prescription"
20
+        :solution="solution"
21
+        :receiver_treatment_access="receiver_treatment_access"
22
+        :predialysis_evaluation="predialysis_evaluation"
23
+        :doctor_advices="doctor_advices"
24
+        :double_check="double_check"
25
+        :assessment_after_dislysis="assessment_after_dislysis"
26
+        :treatment_summary="treatment_summary"
27
+        :monitor_records="monitor_records"
28
+        :dialysis_order="dialysis_order"
29
+        :admin_users="admin_users"
30
+        :devices="devices"
31
+        :device_numbers="device_numbers"
32
+        :admin_user_map="admin_user_map"
33
+        :device_map="device_map"
34
+        :device_number_map="device_number_map"
35
+        :niprocart_info="niprocart_info"
36
+        :jms_info="jms_info"
37
+        :fistula_needle_set_info="fistula_needle_set_info"
38
+        :fistula_needle_set_16_info="fistula_needle_set_16_info"
39
+        :hemoperfusion_info="hemoperfusion_info"
40
+        :dialyser_sterilised_info="dialyser_sterilised_info"
41
+        :filtryzer_info="filtryzer_info"
42
+        :dialyzers_info="dialyzers_info"
43
+        :injector_info="injector_info"
44
+        :bloodlines_info="bloodlines_info"
45
+        :tubingHemodialysis_info="tubingHemodialysis_info"
46
+        :safe_package_info="safe_package_info"
47
+        :aliquid_info="aliquid_info"
48
+        :config="config"
49
+        :longAdvices="longAdvices"
50
+        :waitUploadAdvices="waitUploadAdvices"
51
+        :is_open="is_open"
52
+        :last_predialysis_evaluation="lastPredialysisEvaluation"
53
+        :last_monitor_record="lastMonitorRecord"
54
+        :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
55
+        :last_dialysis_prescribe="lastDialysisPrescribe"
56
+        :last_dryWeight_dislysis="lastDryWeightDislysis"
57
+        :special_premission="headNurses"
58
+        @assessmentAfterDislysis="assessmentAfterDislysisFunc"
59
+        :system_prescribe="system_prescribe"
60
+        :his_is_open="his_is_open"
61
+        :lastAssessment="lastAssessment"
62
+        :stockType="stockType"
63
+      >
64
+      </nav-igation>
65
+
66
+
67
+
68
+      <basic-infor
69
+        :patient="patient"
70
+        :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
71
+        :steps="steps"
72
+        title="基本信息"
73
+      ></basic-infor>
74
+
75
+      <dialysis-prescription
76
+        :prescription="prescription"
77
+        :solution="solution"
78
+        :device_map="device_map"
79
+        :preparestock="preparestock"
80
+        title="透析处方"
81
+      ></dialysis-prescription>
82
+
83
+
84
+
85
+    <!-- <past-data class="往期数据"></past-data> -->
86
+      <div style="height: 20px;background-color: #f6f8f9"></div>
87
+      <accepts-assessment
88
+        :record="receiver_treatment_access"
89
+        title="接诊评估"
90
+      ></accepts-assessment>
91
+
92
+      <assessment-before
93
+        :record="predialysis_evaluation"
94
+        ref="assessment_before"
95
+        title="透前评估"
96
+      ></assessment-before>
97
+
98
+      <stat-order
99
+        ref="stat_order"
100
+        :advices="doctor_advices"
101
+        :doctor_map="admin_user_map"
102
+        title="临时医嘱"
103
+      ></stat-order>
104
+
105
+      <double-check
106
+        ref="double_check"
107
+        :record="double_check"
108
+        :admin_map="admin_user_map"
109
+        title="双人核对 "
110
+      ></double-check>
111
+
112
+      <dialysis-computer
113
+        ref="dialysis_computer"
114
+        :record="dialysis_order"
115
+        :admin_map="admin_user_map"
116
+        :device_number_map="device_number_map"
117
+        title="透析上机 "
118
+      ></dialysis-computer>
119
+
120
+      <dialysis-monitoring
121
+        ref="monitoring"
122
+        :monitores="monitor_records"
123
+        title="透析监测"
124
+      ></dialysis-monitoring>
125
+
126
+
127
+      <dialysis-off
128
+        ref="dialysis_off"
129
+        :record="dialysis_order"
130
+        :admin_map="admin_user_map"
131
+        title="透析下机 "
132
+      ></dialysis-off>
133
+
134
+      <assessment-after
135
+        ref="assessment_after"
136
+        :record="assessment_after_dislysis"
137
+        title="透后评估"
138
+      ></assessment-after>
139
+
140
+      <treatment-of
141
+        ref="treatment_of"
142
+        :record="treatment_summary"
143
+        title="治疗小结"
144
+      ></treatment-of>
145
+      </div>
146
+    </div>
147
+  </div>
148
+</template>
149
+
150
+<script>
151
+const moment = require('moment')
152
+import axios from 'axios'
153
+import NavIgation from '@/xt_pages/dialysis/details/NavIgation'
154
+import BasicInfor from '@/xt_pages/dialysis/details/BasicInfor'
155
+import DialysisPrescription from '@/xt_pages/dialysis/details/DialysisPrescription'
156
+import PastData from '@/xt_pages/dialysis/details/pastData'
157
+import AcceptsAssessment from '@/xt_pages/dialysis/details/acceptsAssessment'
158
+import AssessmentBefore from '@/xt_pages/dialysis/details/assessmentBefore'
159
+import StatOrder from '@/xt_pages/dialysis/details/statOrder'
160
+import DialysisComputer from '@/xt_pages/dialysis/details/dialysisComputer'
161
+import DoubleCheck from '@/xt_pages/dialysis/details/doubleCheck'
162
+import DialysisMonitoring from '@/xt_pages/dialysis/details/dialysisMonitoring'
163
+import DialysisOff from '@/xt_pages/dialysis/details/dialysisOff'
164
+import AssessmentAfter from '@/xt_pages/dialysis/details/assessmentAfter'
165
+import TreatmentOf from '@/xt_pages/dialysis/details/treatmentOf'
166
+import OperationStaff from '@/xt_pages/dialysis/details/operationStaff'
167
+import {
168
+  getDialysisScheduleDetail,
169
+  getLongAdvice,
170
+  getDialysisRecordInitData,
171
+  getDialysisSchedules
172
+} from '@/api/dialysis_record'
173
+import { parseTime } from '@/utils'
174
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
175
+
176
+export default {
177
+  name: 'index',
178
+  components: {
179
+    NavIgation,
180
+    BasicInfor,
181
+    DialysisPrescription,
182
+    PastData,
183
+    AcceptsAssessment,
184
+    AssessmentBefore,
185
+    StatOrder,
186
+    DialysisComputer,
187
+    DoubleCheck,
188
+    DialysisMonitoring,
189
+    DialysisOff,
190
+    AssessmentAfter,
191
+    TreatmentOf,
192
+    OperationStaff,
193
+    BreadCrumb
194
+  },
195
+  props:{
196
+    record_date:String,
197
+    patientid:String
198
+  },
199
+  data() {
200
+    return {
201
+      crumbs: [
202
+        { path: false, name: '透析管理' },
203
+        { path: false, name: '透析记录' },
204
+        { path: false, name: '透析单' }
205
+      ],
206
+      dialogFormVisible: false,
207
+      orders: false,
208
+      loading: false,
209
+      patient_id: 0,
210
+      date: 0,
211
+
212
+      longAdvices: [],
213
+      waitUploadAdvices: [],
214
+      is_open: 0,
215
+      targetAdvices: [],
216
+
217
+      patient: { id: 0 }, // 患者信息
218
+      schedual: { id: 0 }, // 患者排班信息
219
+      prescription: { id: 0 }, // 透析处方
220
+      solution: { id: 0 }, // 透析方案
221
+      system_prescribe: { id: 0 },
222
+      receiver_treatment_access: { id: 0 }, // 接诊评估
223
+      predialysis_evaluation: { id: 0 }, // 透前评估
224
+      doctor_advices: [], // 临时医嘱
225
+      double_check: { id: 0 }, // 双人核对
226
+      assessment_after_dislysis: { id: 0 }, // 透后评估
227
+      treatment_summary: { id: 0 }, // 治疗小结
228
+      monitor_records: [], // 透析监测
229
+      dialysis_order: { id: 0 }, // 透析记录
230
+      admin_users: [], // 系统用户列表
231
+      devices: [], // 设备
232
+      device_numbers: [], // 床位号
233
+
234
+      admin_user_map: {}, // {user_id: admin_user object}
235
+      device_map: {}, // {device_id: device}
236
+      device_number_map: {}, // {device_number_id: device_number}
237
+
238
+      niprocart_info: [],
239
+      jms_info: [],
240
+      fistula_needle_set_info: [],
241
+      fistula_needle_set_16_info: [],
242
+      hemoperfusion_info: [],
243
+      dialyser_sterilised_info: [],
244
+      filtryzer_info: [],
245
+      dialyzers_info: [],
246
+      injector_info: [],
247
+      bloodlines_info: [],
248
+      tubingHemodialysis_info: [],
249
+      safe_package_info: [],
250
+      aliquid_info: [],
251
+      config: {},
252
+
253
+      his_is_open:0,
254
+
255
+      lastPredialysisEvaluation: { id: 0 },
256
+      lastMonitorRecord: { id: 0 },
257
+      lastAssessmentAfterDislysis: { id: 0 },
258
+      lastDryWeightDislysis: { id: 0 },
259
+      lastAssessment:{id:0},
260
+      headNurses: [],
261
+      lastDialysisPrescribe: { id: 0 },
262
+      //
263
+      activeName: 'first',
264
+      selected_date: new Date(),
265
+      // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
266
+      search_keyword: '', // 确定用于搜索的关键字
267
+      search_input: '', // 输入中的关键字
268
+      patient_state: [
269
+        { value: 0, label: '全部患者' },
270
+        { value: 1, label: '已签到' },
271
+        { value: 2, label: '未签到' },
272
+        { value: 3, label: '已上机' },
273
+        { value: 4, label: '已下机' }
274
+      ],
275
+      patientStateVal: 0,
276
+      treat_state: [
277
+        { value: 0, label: '全部治疗' },
278
+        { value: 1, label: '待开处方' },
279
+        { value: 2, label: '待开小结' },
280
+        { value: 3, label: '待医嘱核对' },
281
+      ],
282
+      treatStateVal: 0,
283
+      schedule_options: [
284
+        { value: 0, label: '全部班' },
285
+        { value: 1, label: '上午' },
286
+        { value: 2, label: '下午' },
287
+        { value: 3, label: '晚上' }
288
+      ],
289
+      scheduleStateVal: 0,
290
+      zone_options: [
291
+        { id: 0, text: '全部分区' }
292
+      ],
293
+      zoneVal: 0,
294
+      tableData: [],
295
+      tableData1: [],
296
+      arr: [],
297
+      newName: '',
298
+      newTime: '',
299
+      scheudle_mode:"",
300
+
301
+
302
+      showView:false,
303
+      curPatient:{},
304
+
305
+      queueConfig:{},
306
+      stockType:[],
307
+      preparestock:[]
308
+    }
309
+  },
310
+  created() {
311
+    var patient_id = this.patientid
312
+    var date = this.record_date
313
+    this.patient_id = patient_id
314
+    this.date = date
315
+
316
+    
317
+
318
+  },
319
+  mounted() {
320
+    this.getScheduleDetail()
321
+    this.getLongAdvice()
322
+  },
323
+  watch:{
324
+        patientid:{
325
+            handler(newVal){
326
+                this.patient_id = newVal
327
+                this.getScheduleDetail()
328
+                this.getLongAdvice()
329
+            }
330
+        }
331
+  },
332
+  computed: {
333
+    websocket() {
334
+      return this.$store.state.user.websocket;
335
+    },
336
+    steps: function() {
337
+      var steps = [
338
+        { title: '透析处方', finish: false },
339
+        { title: '接诊评估', finish: false },
340
+        { title: '透前评估', finish: false },
341
+        { title: '临时医嘱', finish: false },
342
+        { title: '双人核对', finish: false },
343
+        { title: '透析上机', finish: false },
344
+        { title: '透析监测', finish: false },
345
+        { title: '透析下机', finish: false },
346
+        { title: '透后评估', finish: false },
347
+        { title: '治疗小结', finish: false }
348
+      ]
349
+
350
+      steps[0].finish = this.prescription.id && this.prescription.creater > 0
351
+      steps[1].finish = this.receiver_treatment_access.id > 0
352
+      steps[2].finish =
353
+        this.predialysis_evaluation.id > 0 &&
354
+        this.predialysis_evaluation.creater > 0
355
+      steps[3].finish = this.doctor_advices.length > 0
356
+      steps[5].finish = this.dialysis_order.id > 0
357
+      steps[7].finish =
358
+        this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
359
+
360
+      steps[4].finish =
361
+        this.double_check.id > 0 &&
362
+        this.double_check.creater > 0 &&
363
+        this.double_check.modifier > 0
364
+      steps[6].finish = this.monitor_records.length > 0
365
+      steps[8].finish =
366
+        this.assessment_after_dislysis.id > 0 &&
367
+        this.assessment_after_dislysis.creater > 0
368
+      steps[9].finish = this.treatment_summary.id > 0
369
+
370
+      return steps
371
+    },
372
+    filtedSchedules: function() {
373
+      var search_keyword = this.search_keyword
374
+      if (search_keyword.length > 0) {
375
+        var schedules = []
376
+        for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
377
+          const scheduleInfo = this.zone_schedules[o_i]
378
+          var originSchedules = scheduleInfo.schedules
379
+          if (originSchedules.length == 0) {
380
+            continue
381
+          }
382
+          var filtedSchedules = []
383
+          for (let s_i = 0; s_i < originSchedules.length; s_i++) {
384
+            const schedule = originSchedules[s_i]
385
+            if (schedule.patient.name.indexOf(search_keyword) != -1) {
386
+              filtedSchedules.push(schedule)
387
+              // break
388
+            }
389
+          }
390
+          if (filtedSchedules.length > 0) {
391
+            schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
392
+          }
393
+        }
394
+        return schedules
395
+      }
396
+
397
+      // var zone_selected = this.zoneVal
398
+      // var timetype_selected = this.scheduleStateVal
399
+      // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
400
+      //   var schedules = []
401
+      //   for (let index = 0; index < this.zone_schedules.length; index++) {
402
+      //     const scheduleInfo = this.zone_schedules[index]
403
+      //     if (scheduleInfo.schedules.length != 0) {
404
+      //       schedules.push(scheduleInfo)
405
+      //     }
406
+      //   }
407
+      //   return schedules
408
+      // }
409
+
410
+      // var schedules = []
411
+      // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
412
+      //   const scheduleInfo = this.zone_schedules[o_i]
413
+      //   if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
414
+      //     if (scheduleInfo.schedules.length == 0) {
415
+      //       return []
416
+      //     } else {
417
+      //       return [scheduleInfo]
418
+      //     }
419
+      //   }
420
+      //   var originSchedules = scheduleInfo.schedules
421
+      //   if (originSchedules.length == 0) {
422
+      //     continue
423
+      //   }
424
+      //   var filtedSchedules = []
425
+      //   for (let s_i = 0; s_i < originSchedules.length; s_i++) {
426
+      //     const schedule = originSchedules[s_i]
427
+      //     if (zone_selected != 0) {
428
+      //       if (zone_selected == schedule.device_number.zone.id) {
429
+      //         if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
430
+      //           filtedSchedules.push(schedule)
431
+      //         }
432
+      //       }
433
+      //     } else {
434
+      //       if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
435
+      //         filtedSchedules.push(schedule)
436
+      //       }
437
+      //     }
438
+      //   }
439
+      //   if (filtedSchedules.length > 0) {
440
+      //     schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
441
+      //   }
442
+      // }
443
+
444
+      // return schedules
445
+    }
446
+  },
447
+  beforeDestroy(){
448
+
449
+    let unObj = {
450
+      cmd: "queue/unjoin",
451
+      data: {type:3},
452
+    };
453
+    this.websocketSend(unObj)
454
+  },
455
+  methods: {
456
+    adviceFunc() {
457
+      this.getScheduleDetail()
458
+    },
459
+    getLongAdvice() {
460
+      const params = {
461
+        patient_id: this.patient_id
462
+      }
463
+      getLongAdvice(params).then(rs => {
464
+        var resp = rs.data
465
+        if (resp.state == 1) {
466
+          var status = parseInt(resp.data.status)
467
+
468
+          switch (status) {
469
+            case 2:
470
+              var totalAdvice = resp.data.advices
471
+              var longAdvicesTwo = resp.data.advices_two
472
+              var waitUploadAdvices = []
473
+              for (let i = 0; i < totalAdvice.length; i++) {
474
+                totalAdvice[i]['isCheck'] = 1
475
+              }
476
+
477
+              for (let i = 0; i < totalAdvice.length; i++) {
478
+                for (let a = 0; a < longAdvicesTwo.length; a++) {
479
+                  if (
480
+                    totalAdvice[i].template_id ==
481
+                      longAdvicesTwo[a].template_id &&
482
+                    totalAdvice[i].frequency_type ==
483
+                      longAdvicesTwo[a].frequency_type
484
+                  ) {
485
+                    totalAdvice[i]['isCheck'] = 0
486
+                  }
487
+                }
488
+              }
489
+
490
+              for (let i = 0; i < totalAdvice.length; i++) {
491
+                if (totalAdvice[i].isCheck == 1) {
492
+                  waitUploadAdvices.push(totalAdvice[i])
493
+                }
494
+              }
495
+
496
+              this.is_open = resp.data.is_open_remind
497
+              if(this.his_is_open == 1){
498
+                this.is_open = 0
499
+              }
500
+              this.longAdvices = totalAdvice
501
+              this.waitUploadAdvices = waitUploadAdvices
502
+              break
503
+          }
504
+        } else {
505
+          this.$message.error(resp.msg)
506
+        }
507
+      })
508
+    },
509
+    assessmentAfterDislysisFunc: function(val) {
510
+      for (var index in val) {
511
+        this.$set(this.assessment_after_dislysis, index, val[index])
512
+      }
513
+    },
514
+    didDelMonitor(record_id) {
515
+      var mrl = this.monitor_records.length
516
+      for (let index = 0; index < mrl; index++) {
517
+        if (this.monitor_records[index].id == record_id) {
518
+          this.monitor_records.splice(index, 1)
519
+          break
520
+        }
521
+      }
522
+    },
523
+    getScheduleDetail: function() {
524
+      this.loading = true
525
+    //   var dateStr = parseTime(this.date, '{y}-{m}-{d}')
526
+      if(this.$route.query.showView == true){
527
+        this.loading = false
528
+        return
529
+      }
530
+        console.log('this.patient_id',this.patient_id)
531
+        console.log('this.date',this.date)
532
+      this.doctor_advices = []
533
+      getDialysisScheduleDetail(this.patient_id, this.date).then(rs => {
534
+
535
+        var resp = rs.data
536
+        if (resp.state == 1) {
537
+          var patient = resp.data.patient // 患者信息
538
+          var schedual = resp.data.schedual // 患者排班信息
539
+          console.log("排班22222222222",schedual)
540
+          var prescription = resp.data.prescription // 透析处方
541
+          if (prescription != null) {
542
+            if (prescription.body_fluid == -2) {
543
+              prescription.body_fluid = 0
544
+            }
545
+          }
546
+
547
+          var solution = resp.data.solution // 透析方案
548
+          console.log("透析方案22223333333333",solution)
549
+          var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
550
+
551
+          var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
552
+           console.log("透器评估",predialysis_evaluation)
553
+          if (predialysis_evaluation != null) {
554
+            if (predialysis_evaluation.blood_access_part_id == -2) {
555
+              predialysis_evaluation.blood_access_part_id = 0
556
+            }
557
+          }
558
+          var doctor_advices = resp.data.doctor_advices // 临时医嘱
559
+
560
+          var double_check = resp.data.double_check // 双人核对
561
+          var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
562
+
563
+          var treatment_summary = resp.data.treatment_summary // 治疗小结
564
+          var monitor_records = resp.data.monitor_records // 透析监测
565
+          var dialysis_order = resp.data.dialysis_order // 透析记录
566
+
567
+          var niprocart_info = resp.data.niprocart_info
568
+          var jms_info = resp.data.jms_info
569
+          var fistula_needle_set_info = resp.data.fistula_needle_set_info
570
+          var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
571
+          var hemoperfusion_info = resp.data.hemoperfusion_info
572
+          var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
573
+          var filtryzer_info = resp.data.filtryzer_info
574
+          var dialyzers_info = resp.data.dialyzers_info
575
+          var injector_info = resp.data.injector_info
576
+          var bloodlines_info = resp.data.bloodlines_info
577
+          var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
578
+          var safe_package_info = resp.data.safe_package_info
579
+          var aliquid_info = resp.data.aliquid_info
580
+
581
+          var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
582
+
583
+          if (lastPredialysisEvaluation != null) {
584
+            if (lastPredialysisEvaluation.blood_access_part_id == -2) {
585
+              lastPredialysisEvaluation.blood_access_part_id = 0
586
+            }
587
+          }
588
+          var lastMonitorRecord = resp.data.lastMonitorRecord
589
+          var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
590
+          var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
591
+          var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
592
+
593
+          var system_prescribe = resp.data.system_prescribe
594
+
595
+          var lastAssessment =  resp.data.lastAssessment
596
+          console.log("最后一次血管通路",lastAssessment)
597
+          this.$refs.nav.setLastRecord(
598
+            lastPredialysisEvaluation,
599
+            lastMonitorRecord,
600
+            lastAssessmentAfterDislysis,
601
+            lastDialysisPrescribe,
602
+            lastDryWeightDislysis,
603
+            schedual,
604
+            system_prescribe,
605
+            lastAssessment,
606
+          )
607
+
608
+          var headNurses = resp.data.headNurse
609
+
610
+          var config = resp.data.config
611
+          this.lastPredialysisEvaluation = lastPredialysisEvaluation
612
+          this.lastMonitorRecord = lastMonitorRecord
613
+          this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
614
+          this.lastDialysisPrescribe = lastDialysisPrescribe
615
+          this.lastDryWeightDislysis = lastDryWeightDislysis
616
+          this.lastAssessment = lastAssessment
617
+          this.headNurses = headNurses
618
+          this.system_prescribe = system_prescribe
619
+
620
+
621
+
622
+          this.niprocart_info = []
623
+          this.jms_info = []
624
+          this.fistula_needle_set_info = []
625
+          this.fistula_needle_set_16_info = []
626
+          this.hemoperfusion_info = []
627
+          this.dialyser_sterilised_info = []
628
+
629
+          this.filtryzer_info = []
630
+          this.dialyzers_info = []
631
+          this.injector_info = []
632
+
633
+          this.bloodlines_info = []
634
+          this.tubingHemodialysis_info = []
635
+          this.safe_package_info = []
636
+          this.aliquid_info = []
637
+
638
+
639
+
640
+
641
+
642
+          this.niprocart_info = niprocart_info
643
+          this.jms_info = jms_info
644
+          this.fistula_needle_set_info = fistula_needle_set_info
645
+          this.fistula_needle_set_16_info = fistula_needle_set_16_info
646
+          this.hemoperfusion_info = hemoperfusion_info
647
+          this.dialyser_sterilised_info = dialyser_sterilised_info
648
+          this.filtryzer_info = filtryzer_info
649
+          this.dialyzers_info = dialyzers_info
650
+          this.injector_info = injector_info
651
+          this.bloodlines_info = bloodlines_info
652
+          this.tubingHemodialysis_info = tubingHemodialysis_info
653
+          this.safe_package_info = safe_package_info
654
+          this.aliquid_info = aliquid_info
655
+          this.config = config
656
+
657
+          this.patient = patient
658
+          this.schedual = schedual == null ? { id: 0 } : schedual
659
+          this.prescription = prescription == null ? { id: 0 } : prescription
660
+          this.solution = solution == null ? { id: 0 } : solution
661
+          this.receiver_treatment_access =
662
+            receiver_treatment_access == null
663
+              ? { id: 0 }
664
+              : receiver_treatment_access
665
+          this.predialysis_evaluation =
666
+            predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
667
+          this.doctor_advices = doctor_advices == null ? [] : doctor_advices
668
+          this.double_check = double_check == null ? { id: 0 } : double_check
669
+          this.assessment_after_dislysis =
670
+            assessment_after_dislysis == null
671
+              ? { id: 0 }
672
+              : assessment_after_dislysis
673
+          this.treatment_summary =
674
+            treatment_summary == null ? { id: 0 } : treatment_summary
675
+          this.monitor_records = monitor_records == null ? [] : monitor_records
676
+          this.dialysis_order =
677
+            dialysis_order == null ? { id: 0 } : dialysis_order
678
+
679
+
680
+
681
+          this.admin_users = resp.data.doctors
682
+          this.devices = resp.data.devices
683
+          this.device_numbers = resp.data.device_numbers
684
+
685
+          var his_doctor_advices = resp.data.his_advices
686
+
687
+          this.his_is_open = resp.data.is_open_config.is_open
688
+          console.log(this.his_is_open)
689
+
690
+
691
+
692
+          var stockType =  resp.data.stockType
693
+          this.stockType = stockType
694
+          console.log("stockTYPW",stockType)
695
+
696
+          var prepare = resp.data.prepare
697
+          this.preparestock = prepare
698
+          console.log("prepare222222",prepare)
699
+
700
+          for (let i = 0; i <  this.doctor_advices.length; i++){
701
+            this.doctor_advices[i]['origin'] = 1
702
+          }
703
+
704
+          if (his_doctor_advices != null) {
705
+            for (let i = 0; i < his_doctor_advices.length; i++) {
706
+              his_doctor_advices[i]['origin'] = 2
707
+              his_doctor_advices[i]['way'] = 1
708
+              this.doctor_advices.push(his_doctor_advices[i])
709
+            }
710
+          }
711
+
712
+          const obj = {}
713
+          this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
714
+            obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
715
+            return cur
716
+          }, []) // 设置cur默认类型为数组,并且初始值为空的数组
717
+
718
+          console.log(this.doctor_advices)
719
+
720
+
721
+          var device_map = {}
722
+          for (let index = 0; index < this.devices.length; index++) {
723
+            const device = this.devices[index]
724
+            device_map[device.id] = device
725
+          }
726
+          this.device_map = device_map
727
+
728
+          var admin_map = {}
729
+          for (let index = 0; index < this.admin_users.length; index++) {
730
+            const admin = this.admin_users[index]
731
+            admin_map[admin.id] = admin
732
+          }
733
+          this.admin_user_map = admin_map
734
+
735
+          var device_number_map = {}
736
+          for (let index = 0; index < this.device_numbers.length; index++) {
737
+            const device_number = this.device_numbers[index]
738
+            device_number_map[device_number.id] = device_number
739
+          }
740
+          this.device_number_map = device_number_map
741
+        } else {
742
+          this.$message.error(resp.msg)
743
+        }
744
+
745
+        if (this.lastDialysisPrescribe != null) {
746
+          delete this.lastDialysisPrescribe.target_ultrafiltration
747
+        }
748
+        if (this.solution != null) {
749
+          delete this.solution.target_ultrafiltration
750
+        }
751
+        if(this.predialysis_evaluation.id > 0){
752
+          this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
753
+        }
754
+
755
+        this.loading = false
756
+      })
757
+    },
758
+    printOrder() {
759
+      var xtdate = parseTime(this.date, '{y}-{m}-{d}')
760
+      this.$router.push(
761
+        '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
762
+      )
763
+    },
764
+    processedDialysisSchedules: function(schedules, zone_options) {
765
+      var zoneMap = {}
766
+      var scheduleMap = {}
767
+      for (let z_i = 0; z_i < zone_options.length; z_i++) {
768
+        const zone = zone_options[z_i]
769
+        if (zone.id == 0) {
770
+          continue
771
+        }
772
+        scheduleMap[zone.id] = []
773
+      }
774
+      for (let index = 0; index < schedules.length; index++) {
775
+        const schedule = schedules[index]
776
+        scheduleMap[schedule.device_number.zone.id].push(schedule)
777
+      }
778
+      var zone_schedules = []
779
+      for (let index = 0; index < zone_options.length; index++) {
780
+        const zone = zone_options[index]
781
+        if (zone.id == 0) {
782
+          continue
783
+        }
784
+        var schedules = scheduleMap[zone.id]
785
+        zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
786
+      }
787
+      return zone_schedules
788
+    },
789
+    getTime(date){
790
+      date = new Date(date * 1000)
791
+      var Y = date.getFullYear() + '-';
792
+      var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
793
+      var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
794
+      var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
795
+      var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
796
+      var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
797
+
798
+      let strDate = h  + ':' + m;
799
+      return strDate;
800
+    },
801
+    getDates(time){
802
+      return moment(time * 1000).format('HH:mm:ss')
803
+    }
804
+  }
805
+}
806
+</script>
807
+
808
+<style style="stylesheet/scss" lang="scss" scoped>
809
+.details-bg {
810
+  background: #fff;
811
+  margin: 0 15px;
812
+}
813
+.printForm {
814
+  .title {
815
+    font-size: 30px;
816
+    font-weight: 500;
817
+    text-align: center;
818
+    line-height: 60px;
819
+  }
820
+  .info {
821
+    ul {
822
+      display: -webkit-box;
823
+      display: -moz-box;
824
+      display: -ms-flexbox;
825
+      display: -webkit-flex;
826
+      display: flex;
827
+      align-items: center;
828
+      -moz-box-sizing: border-box;
829
+      -webkit-box-sizing: border-box;
830
+      -o-box-sizing: border-box;
831
+      -ms-box-sizing: border-box;
832
+      box-sizing: border-box;
833
+      -webkit-justify-content: space-around;
834
+      -moz-justify-content: space-around;
835
+      -ms-justify-content: space-around;
836
+      -o-justify-content: space-around;
837
+      justify-content: space-around;
838
+      li {
839
+        display: flex;
840
+        box-sizing: border-box;
841
+        justify-content: space-around;
842
+        .name {
843
+        }
844
+        .InputBox {
845
+          padding: 0;
846
+          border: none;
847
+          border-bottom: 1px #e5e5e5 solid;
848
+          width: 60px;
849
+          outline: none;
850
+        }
851
+      }
852
+    }
853
+  }
854
+  .printTable {
855
+    tr {
856
+      padding: 2px;
857
+      th {
858
+        padding: 6px 4px;
859
+      }
860
+      td {
861
+        padding: 6px 4px;
862
+      }
863
+    }
864
+  }
865
+}
866
+.loadingBox{
867
+  display: flex;
868
+  .patientBox{
869
+    background: #fff;
870
+  }
871
+  .tip1{
872
+    background: #4fc7cb;
873
+    border-radius: 5px;
874
+    text-align: center;
875
+    font-size: 12px;
876
+    display: inline-block;
877
+    width: 60px;
878
+    color: #fff;
879
+  }
880
+  .tip2{
881
+    background: #ee8556;
882
+    border-radius: 5px;
883
+    text-align: center;
884
+    font-size: 12px;
885
+    display: inline-block;
886
+    width: 60px;
887
+    color: #fff;
888
+  }
889
+  .tip3{
890
+    background: #409eff;
891
+    border-radius: 5px;
892
+    text-align: center;
893
+    font-size: 12px;
894
+    display: inline-block;
895
+    width: 60px;
896
+    color: #fff;
897
+  }
898
+  .tip4{
899
+    background: #a8b3ba;
900
+    border-radius: 5px;
901
+    text-align: center;
902
+    font-size: 12px;
903
+    display: inline-block;
904
+    width: 60px;
905
+    color: #fff;
906
+  }
907
+  .tip5{
908
+    background: #7bce91;
909
+    border-radius: 5px;
910
+    text-align: center;
911
+    font-size: 12px;
912
+    display: inline-block;
913
+    width: 60px;
914
+    color: #fff;
915
+  }
916
+}
917
+</style>
918
+
919
+<style lang="scss">
920
+.loadingBox{
921
+  .el-loading-spinner{
922
+    top:10%;
923
+  }
924
+  .el-button--small, .el-button--small.is-round{
925
+    padding:9px 10px;
926
+  }
927
+  .el-date-editor{
928
+    .el-input__inner{
929
+      padding-right:0px;
930
+    }
931
+  }
932
+  .el-table td, .el-table th{
933
+    text-align: center;
934
+  }
935
+  .el-table .cell{
936
+    padding: 0;
937
+  }
938
+}
939
+</style>

+ 5 - 2
src/xt_pages/outpatientDoctorStation/doctorDesk.vue Näytä tiedosto

@@ -54,6 +54,7 @@
54 54
                    style="position: fixed;width: calc(100% - 490px);background:#fff;">
55 55
             <el-tab-pane label="电子处方" name="电子处方"></el-tab-pane>
56 56
             <el-tab-pane label="电子病历" name="电子病历"></el-tab-pane>
57
+            <el-tab-pane label="透析记录" name="透析记录"></el-tab-pane>
57 58
           </el-tabs>
58 59
           <div class="mainCell fixedCell" style="float:right" v-if="titleType == '电子处方'">
59 60
             <el-button size="small" ref="button_one" @click="open(1)" type="primary" v-loading="saveLoading">保存
@@ -91,7 +92,7 @@
91 92
         <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
92 93
                      :hisPatientInfo="hisPatientInfo" v-if="titleType == '电子病历'" :detalid="detalid"
93 94
                      ref="child"></desk-record>
94
-
95
+        <dialysis-index v-if="titleType == '透析记录'" :record_date="record_date" :patientid='patientid'></dialysis-index>
95 96
         <medicalRecord ref='medicalRecord' @func="getMsgFormSon"></medicalRecord>
96 97
         <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
97 98
       </div>
@@ -161,6 +162,7 @@
161 162
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
162 163
   import deskPrescription from './components/deskPrescription'
163 164
   import deskRecord from './components/deskRecord'
165
+  import dialysisIndex from './components/dialysisIndex'
164 166
   import {createCaseHistory, getPatientInfo, getSchedulePatientList} from '@/api/his/his'
165 167
   import {getDictionaryDataConfig} from '@/utils/data'
166 168
   import medicalRecord from './components/medicalRecord'
@@ -182,7 +184,8 @@
182 184
       saveRecordTemplate,
183 185
       print,
184 186
       treatPrint,
185
-      recordPrint
187
+      recordPrint,
188
+      dialysisIndex
186 189
     },
187 190
     data() {
188 191
       return {