huangyw 2 years ago
parent
commit
caa6a2eb7a
1 changed files with 654 additions and 0 deletions
  1. 654 0
      src/xt_pages/outpatientDoctorStation/recordTemplate/printThree.vue

+ 654 - 0
src/xt_pages/outpatientDoctorStation/recordTemplate/printThree.vue View File

@@ -0,0 +1,654 @@
1
+<template>
2
+  <div id="prescription-print">
3
+    <div class="prescription-print">
4
+      <div class="printTitle">{{ orgname }}门诊血液净化治疗病历首页</div>
5
+      <!-- <div class="record_Title">
6
+            <div>年龄:{{patient.age?patient.age:''}}岁</div>
7
+            <div>透析病历号:{{patient.id?patient.id:''}}</div>
8
+        </div> -->
9
+      <div class="infoTitle" style="margin-top: 20px">
10
+        <div class="name_slot">
11
+          首次治疗日期:<span>{{ getTime(patient.first_dialysis_date) }}</span>
12
+        </div>
13
+        <div class="name_slot">医保卡号:<span></span></div>
14
+        <div class="name_slot">
15
+          ID号:<span class="name_slot_1" style="min-width: 100px"></span>
16
+        </div>
17
+      </div>
18
+      <div
19
+        class="infoTitle"
20
+        style="margin-top: 20px; padding-bottom: 20px; border-bottom: 1px solid"
21
+      >
22
+        <div class="name_slot_2" style="width: 273px">
23
+          诊断:<span class="name_slot_1" style="min-width: 100px"></span>
24
+        </div>
25
+        <div class="name_slot" style="width: 640px">
26
+          合并症或并发症:<span style="width: 220px"></span>
27
+        </div>
28
+      </div>
29
+
30
+      <div class="infoTitle" style="margin-top: 15px">
31
+        <div class="name_slot">
32
+          姓名:<span style="min-width: 180px">{{
33
+            patient.name ? patient.name : ""
34
+          }}</span>
35
+        </div>
36
+        <div>
37
+          性别:
38
+          <label-box
39
+            :isChecked="patient.gender == 1 ? true : false"
40
+            showValue="男"
41
+          ></label-box>
42
+          <label-box
43
+            :isChecked="patient.gender == 2 ? true : false"
44
+            showValue="女"
45
+          ></label-box>
46
+        </div>
47
+        <!-- <div class="address_slot">
48
+          家庭住址:<span>{{ patient.home_address ? patient.home_address : "" }}</span>
49
+        </div> -->
50
+      </div>
51
+
52
+      <div class="infoTitle">
53
+        <div class="full_slot">
54
+          身份证号:
55
+          <span class="id_card" v-for="i in patient.id_card_no" :key="i">{{
56
+            i
57
+          }}</span>
58
+        </div>
59
+      </div>
60
+
61
+      <div class="infoTitle">
62
+        <div class="address_slot_1" style="width: 100%">
63
+          现住址(详填)<span></span>省<span></span>市<span></span>区<span
64
+            style="min-width: 190px"
65
+          ></span>
66
+        </div>
67
+      </div>
68
+      <div class="infoTitle">
69
+        <div class="address_slot_1" style="width: 100%">
70
+          户口住址(详填)<span></span>省<span></span>市<span
71
+          ></span>县(区)<span style="min-width: 135px"></span>
72
+        </div>
73
+      </div>
74
+      <div class="infoTitle">
75
+        <div class="address_slot_1" style="width: 100%">
76
+          工作单位:<span>{{ patient.work_unit }}</span
77
+          >地址:<span></span>省<span></span>市/县<span
78
+            style="min-width: 174px"
79
+          ></span>
80
+        </div>
81
+      </div>
82
+      <div class="infoTitle">
83
+        <div class="name_slot">
84
+          电话:<span>{{ patient.phone ? patient.phone : "" }}</span>
85
+        </div>
86
+        <div class="name_slot">手机:<span></span></div>
87
+        <div class="name_slot">
88
+          联系人:<span>{{ patient.contact_name }}</span>
89
+        </div>
90
+        <div class="name_slot">关系:<span></span></div>
91
+      </div>
92
+
93
+      <table class="print-table" border="1" style="margin-top: 20px">
94
+        <thead>
95
+          <tr>
96
+            <td colspan="2">干体重</td>
97
+            <td colspan="2">血管通路</td>
98
+            <td colspan="2">抗凝剂</td>
99
+          </tr>
100
+          <tr>
101
+            <td>日期</td>
102
+            <td>体重(kg)</td>
103
+            <td>日期</td>
104
+            <td>名称</td>
105
+            <td>日期</td>
106
+            <td>种类</td>
107
+          </tr>
108
+        </thead>
109
+        <tbody class="print-table-body">
110
+          <tr v-for="(index, el) in table_list" :key="index">
111
+            <td></td>
112
+            <td></td>
113
+            <td></td>
114
+            <td></td>
115
+            <td></td>
116
+            <td></td>
117
+          </tr>
118
+          <tr>
119
+            <td>
120
+              <table class="print-table-no" border="1">
121
+                <tr>
122
+                  <td rowspan="6">传 <br />染<br />病<br />等<br />级</td>
123
+                  <td>日期</td>
124
+                </tr>
125
+                <tr v-for="(index, list) in table_list_child" :key="index">
126
+                  <td></td>
127
+                </tr>
128
+                <tr></tr>
129
+              </table>
130
+            </td>
131
+            <td>
132
+              <table class="print-table-no-1" border="1">
133
+                <tr class="no-1-tr">
134
+                  <td>名称</td>
135
+                </tr>
136
+                <tr v-for="(index, list) in table_list_child" :key="index">
137
+                  <td></td>
138
+                </tr>
139
+                <tr></tr>
140
+              </table>
141
+            </td>
142
+
143
+            <td>
144
+              <table class="print-table-no" border="1">
145
+                <tr>
146
+                  <td rowspan="6" style="line-height: 50px">
147
+                    肿<br />瘤<br />登<br />记<br />
148
+                  </td>
149
+                  <td>日期</td>
150
+                </tr>
151
+                <tr v-for="(index, list) in table_list_child" :key="index">
152
+                  <td></td>
153
+                </tr>
154
+                <tr></tr>
155
+              </table>
156
+            </td>
157
+            <td>
158
+              <table class="print-table-no-1" border="1">
159
+                <tr class="no-1-tr">
160
+                  <td>名称</td>
161
+                </tr>
162
+                <tr v-for="(index, list) in table_list_child" :key="index">
163
+                  <td></td>
164
+                </tr>
165
+                <tr></tr>
166
+              </table>
167
+            </td>
168
+
169
+            <td>
170
+              <table class="print-table-no" border="1">
171
+                <tr>
172
+                  <td rowspan="6" style="line-height: 50px">
173
+                    过<br />敏<br />反<br />应<br />
174
+                  </td>
175
+                  <td>日期</td>
176
+                </tr>
177
+                <tr v-for="(index, list) in table_list_child" :key="index">
178
+                  <td></td>
179
+                </tr>
180
+                <tr></tr>
181
+              </table>
182
+            </td>
183
+            <td>
184
+              <table class="print-table-no-1" border="1">
185
+                <tr class="no-1-tr">
186
+                  <td>药物反应</td>
187
+                </tr>
188
+                <tr v-for="(index, list) in table_list_child" :key="index">
189
+                  <td></td>
190
+                </tr>
191
+                <tr></tr>
192
+              </table>
193
+            </td>
194
+          </tr>
195
+        </tbody>
196
+      </table>
197
+    </div>
198
+    <div class="printTitle" style="border-bottom: none">
199
+      {{ orgname }}血液透析治疗方案调整
200
+    </div>
201
+    <table class="print-table-end" border="1" style="margin-top: 20px">
202
+      <thead>
203
+        <tr>
204
+          <td width="12.5%">治疗频率</td>
205
+          <td width="12.5%">调整日期</td>
206
+          <td>治疗方式</td>
207
+          <td>调整日期</td>
208
+          <td>钙浓度</td>
209
+          <td>调整日期</td>
210
+          <td>钾浓度</td>
211
+          <td width="12.5%">调整日期</td>
212
+        </tr>
213
+      </thead>
214
+
215
+      <tbody>
216
+        <tr v-for="(index, item) in tablelist_2" :key="index">
217
+          <td></td>
218
+          <td></td>
219
+          <td></td>
220
+          <td></td>
221
+          <td></td>
222
+          <td></td>
223
+          <td></td>
224
+          <td></td>
225
+        </tr>
226
+      </tbody>
227
+    </table>
228
+    <!-- <div class="prescription-print">
229
+      <div class="recordTitle">
230
+        <div>体格检查</div>
231
+        <div
232
+          class="recordContent"
233
+          style="height: fit-content; min-height: 250px"
234
+        >
235
+          <div>
236
+            <span
237
+              >体温:{{
238
+                history.temperature ? history.temperature + "℃" : "/"
239
+              }}</span
240
+            >
241
+            <span
242
+              >脉搏:{{ history.pulse ? history.pulse + "次/分" : "/" }}</span
243
+            >
244
+            <span
245
+              >呼吸:{{
246
+                history.breathing ? history.breathing + "次/分" : "/"
247
+              }}</span
248
+            >
249
+            <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
250
+          </div>
251
+          <div style="text-align: left">
252
+            {{ history.physical_examination }}
253
+          </div>
254
+        </div>
255
+      </div>
256
+      <div class="recordTitle">
257
+        <div>专科检查</div>
258
+        <div class="recordContent">{{ history.special_inspection }}</div>
259
+      </div>
260
+      <div class="recordTitle" style="border-bottom: 1px solid">
261
+        <div>实验室及器械检查</div>
262
+        <div
263
+          class="recordContent"
264
+          style="height: fit-content; min-height: 250px"
265
+        >
266
+          {{ history.lab_apparatus }}
267
+        </div>
268
+      </div>
269
+      <div style="display: flex; justify-content: flex-end">
270
+        <div class="endInfo">
271
+          <div style="height: 100px">
272
+            诊断:{{ history.diagnostic ? history.diagnostic : "" }}
273
+          </div>
274
+          <div style="display: flex">
275
+            <div>
276
+              医师:{{
277
+                getDoctor(history.doctor) ? getDoctor(history.doctor) : ""
278
+              }}
279
+            </div>
280
+            <div>手签:</div>
281
+          </div>
282
+          <div
283
+            style="text-align: center; letter-spacing: 3px; padding-top: 20px"
284
+          >
285
+            {{ getTime(history.record_date) }}
286
+          </div>
287
+        </div>
288
+      </div>
289
+    </div> -->
290
+  </div>
291
+</template>
292
+<script>
293
+import { jsGetAge, uParseTime } from "@/utils/tools";
294
+
295
+import { getDataConfig } from "@/utils/data";
296
+import { getAllDoctorList, getPatientCaseHistory } from "@/api/project/project";
297
+import { getAccessList } from "@/api/patient";
298
+import LabelBox from "../zujian/labelbox.vue";
299
+import CheckBox from "../zujian/checkbox.vue";
300
+export default {
301
+  props: {
302
+    patient: Object,
303
+    hispatient: Object,
304
+    patientid: Number,
305
+    //   history:Object,
306
+  },
307
+  components: {
308
+    LabelBox,
309
+    CheckBox,
310
+  },
311
+  data() {
312
+    return {
313
+      educationOptions: [],
314
+      departmentList: [],
315
+      orgname: "",
316
+      history: {},
317
+      printDate: "",
318
+      accessList: {},
319
+      blood_access_part_opera: [],
320
+      table_list: [],
321
+      table_list_child: [],
322
+      tablelist_2: [],
323
+    };
324
+  },
325
+
326
+  methods: {
327
+    // 默认表格行数
328
+    gettable() {
329
+      let obj = {
330
+        date1: "2020-06-28",
331
+        weight: "00",
332
+        date2: "2020-06-28",
333
+        name: "hh",
334
+        date3: "2020-06-28",
335
+        type: "ss",
336
+      };
337
+      if (this.table_list.length < 12) {
338
+        var nl = 12 - this.table_list.length;
339
+        for (let index = 0; index < nl; index++) {
340
+          this.table_list.push([]);
341
+        }
342
+      }
343
+      if (this.table_list_child.length < 5) {
344
+        var nl = 5 - this.table_list_child.length;
345
+        for (let index = 0; index < nl; index++) {
346
+          this.table_list_child.push([]);
347
+        }
348
+      }
349
+
350
+      if (this.tablelist_2.length < 5) {
351
+        var nl = 5 - this.tablelist_2.length;
352
+        for (let index = 0; index < nl; index++) {
353
+          this.tablelist_2.push([]);
354
+        }
355
+      }
356
+      console.log(this.table_list, "this.table_list");
357
+    },
358
+
359
+    getAge(patient) {
360
+      var thisLen = patient.id_card_no.length;
361
+      var birth = "";
362
+      if (thisLen == 15) {
363
+        birth = "19" + patient.id_card_no.substr(6, 6);
364
+      } else {
365
+        birth = patient.id_card_no.substr(6, 8);
366
+      }
367
+      var births =
368
+        birth.substr(0, 4) +
369
+        "-" +
370
+        birth.substr(4, 2) +
371
+        "-" +
372
+        birth.substr(6, 2);
373
+      return jsGetAge(births, "-");
374
+    },
375
+    show(val) {
376
+      this.patientid = val;
377
+      this.getAllDoctorList();
378
+      this.getPatientCaseHistory();
379
+    },
380
+    getProfession(id) {
381
+      var name = "";
382
+      for (let i = 0; i < this.educationOptions.length; i++) {
383
+        if (id == this.educationOptions[i].id) {
384
+          name = this.educationOptions[i].name;
385
+        }
386
+      }
387
+      return name;
388
+    },
389
+    getAllDoctorList() {
390
+      getAllDoctorList().then((response) => {
391
+        if (response.data.state == 1) {
392
+          var doctor = response.data.data.doctor;
393
+
394
+          this.doctorList = doctor;
395
+          var department = response.data.data.department;
396
+          this.departmentList = department;
397
+        }
398
+      });
399
+    },
400
+    getDoctor(id) {
401
+      var name = "";
402
+      for (let i = 0; i < this.doctorList.length; i++) {
403
+        if (id == this.doctorList[i].admin_user_id) {
404
+          name = this.doctorList[i].user_name;
405
+        }
406
+      }
407
+      return name;
408
+    },
409
+    getPatientCaseHistory() {
410
+      const params = {
411
+        patient_id: this.patientid,
412
+      };
413
+      getPatientCaseHistory(params).then((response) => {
414
+        if (response.data.state == 1) {
415
+          var patient = response.data.data.patient;
416
+          this.patient = patient;
417
+          var history = response.data.data.history;
418
+          this.history = history;
419
+          var hispatient = response.data.data.hispatient;
420
+          this.hispatient = hispatient;
421
+          var accessList = response.data.data.accessList;
422
+          this.accessList = accessList;
423
+        }
424
+      });
425
+    },
426
+    getDeparment(id) {
427
+      var name = "";
428
+      for (let i = 0; i < this.departmentList.length; i++) {
429
+        if (id == this.departmentList[i].id) {
430
+          name = this.departmentList[i].name;
431
+        }
432
+      }
433
+      return name;
434
+    },
435
+    getTime(val) {
436
+      if (val < 0) {
437
+        return "";
438
+      }
439
+      if (val == "") {
440
+        return "";
441
+      } else {
442
+        return uParseTime(val, "{y}-{m}-{d}");
443
+      }
444
+    },
445
+    getAccessList() {
446
+      getAccessList().then((response) => {
447
+        if (response.data.state == 1) {
448
+          var blood_access_part_opera =
449
+            response.data.data.blood_access_part_opera;
450
+          this.blood_access_part_opera = blood_access_part_opera;
451
+        }
452
+      });
453
+    },
454
+    getAccess(id) {
455
+      var name = "";
456
+      for (let i = 0; i < this.blood_access_part_opera.length; i++) {
457
+        if (id == this.blood_access_part_opera[i].value) {
458
+          name = this.blood_access_part_opera[i].name;
459
+        }
460
+      }
461
+      return name;
462
+    },
463
+  },
464
+  created() {
465
+    this.gettable();
466
+    this.educationOptions = getDataConfig("patient", "education_types");
467
+    // this.getAllDoctorList();
468
+    // this.getPatientCaseHistory();
469
+    // this.getAccessList();
470
+    var xtuser = this.$store.getters.xt_user;
471
+    this.orgname = xtuser.org.org_name;
472
+    var data = new Date();
473
+    var month =
474
+      data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
475
+    var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
476
+    this.printDate = data.getFullYear() + "-" + month + "-" + date;
477
+  },
478
+};
479
+</script>
480
+
481
+
482
+<style lang="scss" scoped>
483
+.prescription-print {
484
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
485
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
486
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
487
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
488
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
489
+  margin-bottom: 20px;
490
+  padding: 20px 10px;
491
+}
492
+.printTitle {
493
+  font-size: 22px;
494
+  text-align: center;
495
+  font-weight: bold;
496
+  padding-bottom: 10px;
497
+  border-bottom: 1px solid;
498
+}
499
+.infoTitle {
500
+  display: flex;
501
+  margin-top: 10px;
502
+  line-height: 24px;
503
+  padding: 0 10px;
504
+}
505
+.infoTitle div {
506
+  width: 200px;
507
+}
508
+
509
+.infoTitle .address_slot {
510
+  width: 400px;
511
+}
512
+.infoTitle .full_slot {
513
+  width: 100%;
514
+}
515
+
516
+.infoTitle .full_slot .id_card {
517
+  border: 1px solid;
518
+  display: inline-block;
519
+  width: 18px;
520
+  height: 18px;
521
+  text-align: center;
522
+  margin-right: 6px;
523
+}
524
+
525
+.infoTitle .name_slot {
526
+  width: 250px;
527
+  display: flex;
528
+}
529
+
530
+// .name_slot_2{
531
+//     min-width: 100px;
532
+//     display: inline-block;
533
+//     border-bottom: 1px solid;
534
+// }
535
+.name_slot_1 {
536
+  display: inline-block;
537
+  min-width: 70px;
538
+  border-bottom: 1px solid;
539
+}
540
+
541
+.name_slot span {
542
+  display: inline-block;
543
+  min-width: 70px;
544
+  border-bottom: 1px solid;
545
+}
546
+
547
+.address_slot_1 span {
548
+  display: inline-block;
549
+  min-width: 60px;
550
+  border-bottom: 1px solid;
551
+}
552
+
553
+.otherInfo {
554
+  display: flex;
555
+  margin-top: 10px;
556
+  line-height: 24px;
557
+  padding: 0 10px;
558
+}
559
+.endInfo {
560
+  display: flex;
561
+  flex-direction: column;
562
+  justify-content: end;
563
+  margin-top: 10px;
564
+  line-height: 24px;
565
+}
566
+.endInfo div {
567
+  width: 300px;
568
+}
569
+.recordTitle {
570
+  display: flex;
571
+  justify-content: center;
572
+  flex-direction: column;
573
+  margin-top: 10px;
574
+  line-height: 24px;
575
+  padding: 0 10px;
576
+  border-top: 1px solid;
577
+}
578
+.recordTitle div {
579
+  width: 100%;
580
+  text-align: center;
581
+}
582
+.recordTitle .recordContent {
583
+  width: 100%;
584
+  height: fit-content;
585
+  min-height: 150px;
586
+  text-align: left;
587
+}
588
+
589
+.record_Title {
590
+  display: flex;
591
+  margin-top: 10px;
592
+  line-height: 24px;
593
+  padding: 0 10px;
594
+  border-bottom: 2px solid #000;
595
+}
596
+
597
+.record_Title div {
598
+  width: 200px;
599
+}
600
+
601
+.print-table {
602
+  width: 100%;
603
+  text-align: center;
604
+  border-collapse: collapse;
605
+  line-height: 40px;
606
+  font-size: 14px;
607
+}
608
+
609
+.print-table thead tr td {
610
+  width: 16%;
611
+}
612
+
613
+.print-table-body tr td {
614
+  height: 25px;
615
+}
616
+
617
+.print-table-no {
618
+  width: 100%;
619
+  text-align: center;
620
+  border-collapse: collapse;
621
+  line-height: 40px;
622
+  font-size: 14px;
623
+}
624
+.print-table-no-1 {
625
+  height: 100%;
626
+  width: 100%;
627
+  text-align: center;
628
+  border-collapse: collapse;
629
+  line-height: 40px;
630
+  font-size: 14px;
631
+}
632
+
633
+.print-table-no-1 tr {
634
+  height: 1px;
635
+}
636
+
637
+.print-table-no-1 .no-1-tr {
638
+  height: 41px;
639
+}
640
+
641
+.print-table-end {
642
+  width: 100%;
643
+  text-align: center;
644
+  border-collapse: collapse;
645
+  line-height: 40px;
646
+  font-size: 14px;
647
+}
648
+
649
+.print-table-end tbody tr td {
650
+  height: 25px;
651
+}
652
+
653
+
654
+</style>