|
@@ -0,0 +1,460 @@
|
|
1
|
+<template>
|
|
2
|
+ <div>
|
|
3
|
+ <div id='prescription-print' class="prescription-print">
|
|
4
|
+ <img style="width:100%;height:80px" src="../../../assets/img/bailinTop.jpg" alt="">
|
|
5
|
+ <div class="printTitle">检验申请单</div>
|
|
6
|
+
|
|
7
|
+ <div style="border:1px solid #000;">
|
|
8
|
+ <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;">
|
|
9
|
+ <div>是否急诊:否</div>
|
|
10
|
+ <div>结算方式:{{ faber && faber.transBody ? getName(faber.transBody.outputlist1) : '' }}</div>
|
|
11
|
+ <div>金额:{{ total }}</div>
|
|
12
|
+ </div>
|
|
13
|
+ <div style="display:flex;justify-content: space-between;border-bottom:1px solid #000;line-height:40px;">
|
|
14
|
+ <div>姓名:{{advicePrint[0].patient.name?advicePrint[0].patient.name:""}}</div>
|
|
15
|
+ <div>性别:
|
|
16
|
+ <span v-if="advicePrint[0].patient.gender == 1">男</span>
|
|
17
|
+ <span v-if="advicePrint[0].patient.gender == 2">女</span>
|
|
18
|
+ </div>
|
|
19
|
+ <div>年龄:{{advicePrint[0].patient.age?advicePrint[0].patient.age:""}}岁</div>
|
|
20
|
+ </div>
|
|
21
|
+ <div>病史摘要:{{history.history_of_present_illness?history.history_of_present_illness:''}}</div>
|
|
22
|
+ <div>体格检查:
|
|
23
|
+ <span>体温:{{ history.temperature ? history.temperature + '℃' : '/' }}</span>
|
|
24
|
+ <span>脉搏:{{ history.pulse ? history.pulse + '次/分' : '/' }}</span>
|
|
25
|
+ <span>呼吸:{{ history.breathing ? history.breathing + '次/分' : '/' }}</span>
|
|
26
|
+ <span>血压:{{ history.sbp }}/{{ history.dbp }}mmHg</span>
|
|
27
|
+ </div>
|
|
28
|
+ <div>临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}</div>
|
|
29
|
+ <div style="display:flex">
|
|
30
|
+ <div>检验项目:</div>
|
|
31
|
+ <div>
|
|
32
|
+ <div v-for="item in projectPrint">{{ item.project.project_name }}</div>
|
|
33
|
+ </div>
|
|
34
|
+ </div>
|
|
35
|
+ <div style="display:flex;justify-content: space-between;border-top:1px solid #000;line-height:40px;">
|
|
36
|
+ <div>开单医生:{{ doctor ? doctor : '' }}</div>
|
|
37
|
+ <div>开单日期:
|
|
38
|
+ {{getTime(pre_time) ? getTime(pre_time).split(' ')[0] : ''}}
|
|
39
|
+ </div>
|
|
40
|
+ <div>医生签字:{{ doctor ? doctor : '' }}</div>
|
|
41
|
+ </div>
|
|
42
|
+ </div>
|
|
43
|
+ <img style="width:100%;" src="../../../assets/img/bailinBottom.jpg" alt="">
|
|
44
|
+ </div>
|
|
45
|
+ </div>
|
|
46
|
+
|
|
47
|
+</template>
|
|
48
|
+<script>
|
|
49
|
+import { jsGetAge, uParseTime } from '@/utils/tools'
|
|
50
|
+import {getAllDoctorList,getPrescriptionPrint,getHisPatientDetail,getPatientCaseHistory} from "@/api/project/project"
|
|
51
|
+import {getInitData} from "@/api/his/his"
|
|
52
|
+export default {
|
|
53
|
+ props:{
|
|
54
|
+ patient_id:Number,
|
|
55
|
+ record_date:String,
|
|
56
|
+ prescription_id:Number,
|
|
57
|
+ ids:String
|
|
58
|
+ },
|
|
59
|
+ data(){
|
|
60
|
+ return {
|
|
61
|
+ doctorList:[],
|
|
62
|
+ advicePrint:{},
|
|
63
|
+ patient:{},
|
|
64
|
+ tableData:[],
|
|
65
|
+ prescriptionInfo:[],
|
|
66
|
+ hisPatient:{},
|
|
67
|
+ department:[],
|
|
68
|
+ prescriptions:[],
|
|
69
|
+ projectList:[],
|
|
70
|
+ orgname:"",
|
|
71
|
+ diagnoses:[],
|
|
72
|
+ pageArr:[],
|
|
73
|
+ faber:{},
|
|
74
|
+ total:0,
|
|
75
|
+ projectPrint:[],
|
|
76
|
+ time:'',
|
|
77
|
+ doctor:''
|
|
78
|
+ }
|
|
79
|
+ },
|
|
80
|
+ methods:{
|
|
81
|
+ getPatientCaseHistory(){
|
|
82
|
+ const params = {
|
|
83
|
+ patient_id:this.patient_id
|
|
84
|
+ }
|
|
85
|
+ getPatientCaseHistory(params).then(response=>{
|
|
86
|
+ if(response.data.state == 1){
|
|
87
|
+ var history = response.data.data.history
|
|
88
|
+ console.log("中国history222222",history)
|
|
89
|
+ this.history = history
|
|
90
|
+ }
|
|
91
|
+ })
|
|
92
|
+ },
|
|
93
|
+ getAllDoctorList(){
|
|
94
|
+ getAllDoctorList().then(response=>{
|
|
95
|
+ if(response.data.state == 1){
|
|
96
|
+ var doctor = response.data.data.doctor
|
|
97
|
+
|
|
98
|
+ this.doctorList = doctor
|
|
99
|
+ }
|
|
100
|
+ })
|
|
101
|
+ },
|
|
102
|
+
|
|
103
|
+ getDoctor(id){
|
|
104
|
+ var name = ""
|
|
105
|
+ for(let i=0;i<this.doctorList.length;i++){
|
|
106
|
+ if(id == this.doctorList[i].admin_user_id){
|
|
107
|
+ name = this.doctorList[i].user_name
|
|
108
|
+ }
|
|
109
|
+ }
|
|
110
|
+ return name
|
|
111
|
+ },
|
|
112
|
+ getTime(value, temp) {
|
|
113
|
+ if (value != undefined) {
|
|
114
|
+ return uParseTime(value, temp)
|
|
115
|
+ }
|
|
116
|
+ return ''
|
|
117
|
+ },
|
|
118
|
+ getPrescriptionPrint(){
|
|
119
|
+ var params = {
|
|
120
|
+ // patient_id:this.patient_id,
|
|
121
|
+ // record_date:this.record_date,
|
|
122
|
+ // prescription_id:this.prescription_id,
|
|
123
|
+ patient_id:this.patient_id,
|
|
124
|
+ record_date:this.record_date,
|
|
125
|
+ prescription_id:this.prescription_id,
|
|
126
|
+ ids:this.ids
|
|
127
|
+ }
|
|
128
|
+ console.log("params",params)
|
|
129
|
+ getPrescriptionPrint(params).then(response=>{
|
|
130
|
+ if(response.data.state == 1){
|
|
131
|
+ var advicePrint = response.data.data.advicePrint
|
|
132
|
+ console.log("adviceprint9999",advicePrint)
|
|
133
|
+ this.advicePrint = advicePrint
|
|
134
|
+ this.prescriptions = advicePrint
|
|
135
|
+ console.log("处方222222",this.prescriptions)
|
|
136
|
+ var hisPatient = response.data.data.hisPatient
|
|
137
|
+ console.log("hisPatient",hisPatient)
|
|
138
|
+ this.hisPatient = hisPatient
|
|
139
|
+ let projectPrint = []
|
|
140
|
+ let total = 0
|
|
141
|
+ this.advicePrint.map(item => {
|
|
142
|
+ if(item.project.length > 0){
|
|
143
|
+ item.project.map(it => {
|
|
144
|
+ if(it.type == 2){
|
|
145
|
+ if(it.project.cost_classify == 3){
|
|
146
|
+ projectPrint.push(it)
|
|
147
|
+ total += it.project.price
|
|
148
|
+ }
|
|
149
|
+ }
|
|
150
|
+ })
|
|
151
|
+
|
|
152
|
+ }
|
|
153
|
+ })
|
|
154
|
+ this.total = total
|
|
155
|
+ this.pre_time = this.advicePrint[0].pre_time
|
|
156
|
+ this.doctor = this.advicePrint[0].doctor
|
|
157
|
+ this.projectPrint = projectPrint
|
|
158
|
+ console.log('this.projectPrint',projectPrint)
|
|
159
|
+ var projectlist = response.data.data.projectlist
|
|
160
|
+
|
|
161
|
+ var projectlist = response.data.data.projectlist
|
|
162
|
+ console.log("所有项目列表",projectlist)
|
|
163
|
+ this.projectList = projectlist
|
|
164
|
+ this.getPage()
|
|
165
|
+ let outputlist1Name = response.data.data.his.patient_info ? JSON.parse(response.data.data.his.patient_info) : {};
|
|
166
|
+ this.faber = outputlist1Name
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+ }
|
|
170
|
+ })
|
|
171
|
+ },
|
|
172
|
+ getHisPatientDetail(){
|
|
173
|
+ const params = {
|
|
174
|
+ patient_id:this.patient_id
|
|
175
|
+ }
|
|
176
|
+ getHisPatientDetail(params).then(response=>{
|
|
177
|
+ if(response.data.state == 1){
|
|
178
|
+ var hisPatient = response.data.data.hisPatient
|
|
179
|
+ console.log("挂号病人",hisPatient)
|
|
180
|
+ this.hisPatient = hisPatient
|
|
181
|
+ }
|
|
182
|
+ })
|
|
183
|
+ },
|
|
184
|
+ getInitData(){
|
|
185
|
+ getInitData().then(response=>{
|
|
186
|
+ if(response.data.state == 1){
|
|
187
|
+ this.department = response.data.data.department
|
|
188
|
+ this.diagnoses = response.data.data.diagnose
|
|
189
|
+ console.log("争端",this.diagnoses)
|
|
190
|
+ }
|
|
191
|
+ })
|
|
192
|
+ },
|
|
193
|
+ getDepart(id){
|
|
194
|
+ var name = ""
|
|
195
|
+ for(let i=0;i<this.department.length;i++){
|
|
196
|
+ if(id == this.department[i].id){
|
|
197
|
+ name = this.department[i].name
|
|
198
|
+ }
|
|
199
|
+ }
|
|
200
|
+ return name
|
|
201
|
+ },
|
|
202
|
+ getTotalOne(id) {
|
|
203
|
+
|
|
204
|
+ var total = 0
|
|
205
|
+ var addtotal = 0
|
|
206
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
207
|
+ if(id == this.prescriptions[i].id){
|
|
208
|
+ if (this.prescriptions[i].project != null) {
|
|
209
|
+ for (let a = 0; a < this.prescriptions[i].project.length; a++) {
|
|
210
|
+ total = total + this.prescriptions[i].project[a].price * this.prescriptions[i].project[a].count
|
|
211
|
+ }
|
|
212
|
+ }
|
|
213
|
+
|
|
214
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
215
|
+ for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
|
|
216
|
+ addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
|
|
217
|
+ }
|
|
218
|
+ }
|
|
219
|
+ addtotal = Math.floor(addtotal * 100) / 100
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ }
|
|
223
|
+
|
|
224
|
+ for (let i = 0; i < this.prescriptions.length; i++) {
|
|
225
|
+ if(id == this.prescriptions[i].id){
|
|
226
|
+ if (this.prescriptions[i].advices != null) {
|
|
227
|
+ for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
|
|
228
|
+ total = total + this.prescriptions[i].advices[a].price * this.prescriptions[i].advices[a].prescribing_number
|
|
229
|
+ }
|
|
230
|
+ }
|
|
231
|
+
|
|
232
|
+ if (this.prescriptions[i].additionalcharge != null) {
|
|
233
|
+ for (let a = 0; a < this.prescriptions[i].additionalcharge.length; a++) {
|
|
234
|
+ addtotal = addtotal + this.prescriptions[i].additionalcharge[a].price * this.prescriptions[i].additionalcharge[a].count
|
|
235
|
+ }
|
|
236
|
+ }
|
|
237
|
+ addtotal = Math.floor(addtotal * 100) / 100
|
|
238
|
+ }
|
|
239
|
+ }
|
|
240
|
+
|
|
241
|
+ return total + addtotal
|
|
242
|
+ },
|
|
243
|
+
|
|
244
|
+ getProjectName(id){
|
|
245
|
+ var project_name = ""
|
|
246
|
+ for(let i=0;i<this.projectList.length;i++){
|
|
247
|
+ if(id == this.projectList[i].id){
|
|
248
|
+ project_name = this.projectList[i].project_name
|
|
249
|
+ }
|
|
250
|
+ }
|
|
251
|
+ return project_name
|
|
252
|
+ },
|
|
253
|
+
|
|
254
|
+ getDiagnosis(ids){
|
|
255
|
+ let id = ids.split(',')
|
|
256
|
+ var name = ""
|
|
257
|
+ for(let i=0;i<this.diagnoses.length;i++){
|
|
258
|
+ // if(id == this.diagnoses[i].id){
|
|
259
|
+ // name = this.diagnoses[i].class_name
|
|
260
|
+ // }
|
|
261
|
+ if(id.indexOf(this.diagnoses[i].id.toString()) > -1){
|
|
262
|
+ name += this.diagnoses[i].class_name + ' '
|
|
263
|
+ }
|
|
264
|
+ }
|
|
265
|
+ return name
|
|
266
|
+ },
|
|
267
|
+ getPage(){
|
|
268
|
+ this.page = 1
|
|
269
|
+ this.pageArr = []
|
|
270
|
+
|
|
271
|
+ this.advicePrint.map(item => {
|
|
272
|
+ let arr = []
|
|
273
|
+ item.pageArr = []
|
|
274
|
+ if(item.advices.length <= 5){
|
|
275
|
+ this.page = 1
|
|
276
|
+ arr.push(item.advices.length)
|
|
277
|
+ item.pageArr.push(arr)
|
|
278
|
+
|
|
279
|
+ }else if(item.advices.length > 5){
|
|
280
|
+ this.page = parseInt(item.advices.length / 5)
|
|
281
|
+ let num = item.advices.length % 5
|
|
282
|
+ for (var i=0;i<this.page;i++){
|
|
283
|
+ item.pageArr.push([5])
|
|
284
|
+ }
|
|
285
|
+ if(num != 0){
|
|
286
|
+ item.pageArr.push([num])
|
|
287
|
+ }
|
|
288
|
+ }
|
|
289
|
+ })
|
|
290
|
+ // console.log('this.pageArr',this.pageArr)
|
|
291
|
+ },
|
|
292
|
+ getName(list) {
|
|
293
|
+ console.log('list',list)
|
|
294
|
+ let new_list = []
|
|
295
|
+ for (let i = 0; i < list.length; i++) {
|
|
296
|
+ if (list[i].aac031 == '1') {
|
|
297
|
+ new_list.push(list[i])
|
|
298
|
+ }
|
|
299
|
+ }
|
|
300
|
+
|
|
301
|
+ switch (new_list[0].bcc334) {
|
|
302
|
+ case "A31001":
|
|
303
|
+ return "深圳医保1档"
|
|
304
|
+ break
|
|
305
|
+ case "A31002":
|
|
306
|
+ return "深圳医保2档"
|
|
307
|
+
|
|
308
|
+ break
|
|
309
|
+ case "A31003":
|
|
310
|
+ return "深圳医保3档"
|
|
311
|
+
|
|
312
|
+ break
|
|
313
|
+ case "A31004":
|
|
314
|
+ return "二档(少儿)"
|
|
315
|
+
|
|
316
|
+ break
|
|
317
|
+ case "A31005":
|
|
318
|
+ return "学生二档"
|
|
319
|
+
|
|
320
|
+ break
|
|
321
|
+ case "A31006":
|
|
322
|
+ return "大学生二档"
|
|
323
|
+
|
|
324
|
+ break
|
|
325
|
+ case "A32001":
|
|
326
|
+ return "在职公务员"
|
|
327
|
+ break
|
|
328
|
+ case "A32002":
|
|
329
|
+ return "在职驻深公务员"
|
|
330
|
+
|
|
331
|
+ break
|
|
332
|
+ case "A39301":
|
|
333
|
+ return "家属统筹医疗"
|
|
334
|
+
|
|
335
|
+ break
|
|
336
|
+ case "A41001":
|
|
337
|
+ return "工伤在职"
|
|
338
|
+
|
|
339
|
+ break
|
|
340
|
+ case "A51001":
|
|
341
|
+ return "生育在职"
|
|
342
|
+
|
|
343
|
+ break
|
|
344
|
+ case "A52001":
|
|
345
|
+ return "生育医疗一档"
|
|
346
|
+
|
|
347
|
+ break
|
|
348
|
+ case "A52002":
|
|
349
|
+ return "生育医疗一档"
|
|
350
|
+
|
|
351
|
+ break
|
|
352
|
+ case "C31001":
|
|
353
|
+ return "一档医疗退休"
|
|
354
|
+
|
|
355
|
+ break
|
|
356
|
+ case "C31002":
|
|
357
|
+ return "二档医疗退休"
|
|
358
|
+ break
|
|
359
|
+
|
|
360
|
+ }
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+ },
|
|
365
|
+
|
|
366
|
+ },
|
|
367
|
+ created(){
|
|
368
|
+ this.getAllDoctorList()
|
|
369
|
+ this.getInitData()
|
|
370
|
+ this.getPrescriptionPrint()
|
|
371
|
+ this.getHisPatientDetail()
|
|
372
|
+ this.getPatientCaseHistory()
|
|
373
|
+ var xtuser = this.$store.getters.xt_user;
|
|
374
|
+ this.orgname = xtuser.org.org_name;
|
|
375
|
+
|
|
376
|
+ },
|
|
377
|
+ watch:{
|
|
378
|
+ ids:function(val){
|
|
379
|
+ this.ids = val
|
|
380
|
+ this.getPrescriptionPrint()
|
|
381
|
+ }
|
|
382
|
+ }
|
|
383
|
+}
|
|
384
|
+</script>
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+<style lang="scss" scoped>
|
|
388
|
+.prescription-print{
|
|
389
|
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
390
|
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
391
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
392
|
+ margin-bottom: 20px;
|
|
393
|
+ padding:20px 10px;
|
|
394
|
+}
|
|
395
|
+.printTitle{
|
|
396
|
+ font-size: 22px;
|
|
397
|
+ text-align: center;
|
|
398
|
+ font-weight: bold;
|
|
399
|
+ margin-bottom: 10px;
|
|
400
|
+}
|
|
401
|
+.infoTitle{
|
|
402
|
+ display: flex;
|
|
403
|
+ margin-top:10px;
|
|
404
|
+ line-height: 24px;
|
|
405
|
+}
|
|
406
|
+.infoTitle div{
|
|
407
|
+ width: 200px;
|
|
408
|
+}
|
|
409
|
+.infoMain{
|
|
410
|
+ display: flex;
|
|
411
|
+ flex-wrap: wrap;
|
|
412
|
+ margin-top:10px;
|
|
413
|
+}
|
|
414
|
+.infoMain div{
|
|
415
|
+ width: 50%;
|
|
416
|
+ line-height: 24px;
|
|
417
|
+}
|
|
418
|
+.prescriptionBox{
|
|
419
|
+ padding:0 10px;
|
|
420
|
+ min-height:400px;
|
|
421
|
+}
|
|
422
|
+.Rp{
|
|
423
|
+ font-size: 22px;
|
|
424
|
+ font-weight: bold;
|
|
425
|
+}
|
|
426
|
+.drugsBox{
|
|
427
|
+ padding-left: 40px;
|
|
428
|
+ margin-bottom: 10px;
|
|
429
|
+}
|
|
430
|
+.drugsBox div{
|
|
431
|
+ line-height: 20px;
|
|
432
|
+}
|
|
433
|
+.drugsOne{
|
|
434
|
+ line-height: 24px;
|
|
435
|
+}
|
|
436
|
+.drugsOne span{
|
|
437
|
+ margin-right: 20px;
|
|
438
|
+}
|
|
439
|
+.doctorBox{
|
|
440
|
+ display: flex;
|
|
441
|
+ justify-content: space-between;
|
|
442
|
+ padding:0 10px;
|
|
443
|
+ line-height: 24px;
|
|
444
|
+ border-bottom: 2px solid #000;
|
|
445
|
+}
|
|
446
|
+.actionBar{
|
|
447
|
+ display: flex;
|
|
448
|
+ justify-content: space-between;
|
|
449
|
+ line-height: 24px;
|
|
450
|
+ padding:0 10px;
|
|
451
|
+}
|
|
452
|
+.actionBar p{
|
|
453
|
+ width:150px;
|
|
454
|
+}
|
|
455
|
+.under_line{
|
|
456
|
+ display: inline-block;
|
|
457
|
+ border-bottom: 1px solid #000;
|
|
458
|
+ flex: 1;
|
|
459
|
+}
|
|
460
|
+</style>
|