|
@@ -420,7 +420,7 @@
|
420
|
420
|
|
421
|
421
|
|
422
|
422
|
|
423
|
|
- this.$refs.prescriptions.setData(this.prescriptions,this.info,this.admin_info,this.doctors,this.department)
|
|
423
|
+ this.$refs.prescriptions.setData(this.prescriptions,this.info,this.admin_info,this.doctors,this.department,this.hisPatientInfo)
|
424
|
424
|
}
|
425
|
425
|
})
|
426
|
426
|
|
|
@@ -436,149 +436,302 @@
|
436
|
436
|
}
|
437
|
437
|
}
|
438
|
438
|
if(isShowDailog){
|
439
|
|
-
|
440
|
439
|
this.patientTableData.map((item,index) => {
|
441
|
440
|
if(item.patient_id == this.oldCurrentRow.patient_id){
|
442
|
441
|
this.$refs.tab.setCurrentRow(this.patientTableData[index])
|
|
442
|
+ return
|
443
|
443
|
}
|
444
|
444
|
})
|
445
|
|
- this.$message.error('需要保存当前处方才能切换')
|
446
|
|
- return
|
447
|
|
- }
|
448
|
|
-
|
449
|
|
-
|
450
|
|
- this.patientid = val.patients.id
|
451
|
|
- let params = {
|
452
|
|
- 'record_date': this.record_date,
|
453
|
|
- 'patient_id': val.patients.id
|
454
|
|
- }
|
455
|
|
- getPatientInfo(params).then(response => {
|
456
|
|
- if (response.data.state == 0) {
|
457
|
|
- this.$message.error(response.data.msg)
|
458
|
|
- return false
|
459
|
|
- } else {
|
460
|
|
- this.prescriptions = []
|
461
|
|
- this.patientInfo = response.data.data.xt_info
|
462
|
|
- this.hisPatientInfo = response.data.data.his_info
|
463
|
|
- this.case_history = response.data.data.case_history
|
464
|
|
- var case_history = response.data.data.case_history
|
465
|
|
- console.log("case_history22222222",case_history)
|
466
|
|
- if (case_history.breathing == 0) {
|
467
|
|
- case_history.breathing = ""
|
468
|
|
- }
|
469
|
|
- this.case_history = case_history
|
470
|
|
- this.info = response.data.data.info
|
471
|
|
- this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
472
|
|
- if (this.case_history.temperature <= 0) {
|
473
|
|
- this.case_history.temperature = ''
|
474
|
|
- }
|
475
|
|
- if (this.case_history.blood_sugar <= 0) {
|
476
|
|
- this.case_history.blood_sugar = ''
|
477
|
|
- }
|
478
|
|
- if (this.case_history.pulse <= 0) {
|
479
|
|
- this.case_history.pulse = ''
|
480
|
|
- }
|
481
|
|
- if (this.case_history.sbp <= 0) {
|
482
|
|
- this.case_history.sbp = ''
|
483
|
|
- }
|
484
|
|
- if (this.case_history.dbp <= 0) {
|
485
|
|
- this.case_history.dbp = ''
|
486
|
|
- }
|
487
|
|
- if (this.case_history.height <= 0) {
|
488
|
|
- this.case_history.height = ''
|
489
|
|
- }
|
490
|
|
- if (this.case_history.blood_fat <= 0) {
|
491
|
|
- this.case_history.blood_fat = ''
|
492
|
|
- }
|
493
|
|
- if (this.case_history.sick_type <= 0) {
|
494
|
|
- this.case_history.sick_type = ''
|
495
|
|
- }
|
496
|
|
- this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
497
|
|
- if (this.case_history.is_infect == 1) {
|
498
|
|
- this.case_history.is_infect = true
|
499
|
|
- } else {
|
500
|
|
- this.case_history.is_infect = false
|
|
445
|
+ this.$confirm('是否保存当前处方', '保存', {
|
|
446
|
+ confirmButtonText: '确 定',
|
|
447
|
+ cancelButtonText: '取 消',
|
|
448
|
+ type: 'warning'
|
|
449
|
+ }).then(() => {
|
|
450
|
+ this.open(1)
|
|
451
|
+ }).catch(() => {
|
|
452
|
+ this.patientTableData.map((item,index) => {
|
|
453
|
+ if(item.patient_id == val.patient_id){
|
|
454
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[index])
|
|
455
|
+ }
|
|
456
|
+ })
|
|
457
|
+ this.patientid = val.patients.id
|
|
458
|
+ let params = {
|
|
459
|
+ 'record_date': this.record_date,
|
|
460
|
+ 'patient_id': val.patients.id
|
501
|
461
|
}
|
502
|
|
- this.prescriptionList =response.data.data.prescription
|
503
|
|
- if (response.data.data.prescription.length > 0) {
|
504
|
|
- for (let i = 0; i < response.data.data.prescription.length; i++) {
|
505
|
|
- var prescription = response.data.data.prescription[i]
|
506
|
|
- let tempAdvice = []
|
507
|
|
- let tempProject = []
|
508
|
|
- let tempAddition = []
|
509
|
|
- for (let b = 0; b < prescription.advices.length; b++) {
|
510
|
|
- let obj = {
|
511
|
|
- advice_id: prescription.advices[b].id,
|
512
|
|
- drug_name: prescription.advices[b].advice_name,
|
513
|
|
- single_dose: prescription.advices[b].single_dose,
|
514
|
|
- delivery_way: prescription.advices[b].delivery_way,
|
515
|
|
- execution_frequency: prescription.advices[b].execution_frequency,
|
516
|
|
- retail_price: prescription.advices[b].price.toString(),
|
517
|
|
- remark: prescription.advices[b].remark,
|
518
|
|
- day:prescription.advices[b].day,
|
519
|
|
- prescribing_number:prescription.advices[b].prescribing_number.toString(),
|
520
|
|
- single_dose_unit:prescription.advices[b].single_dose_unit,
|
521
|
|
- prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
|
522
|
|
- medical_insurance_number:prescription.advices[b].med_list_codg,
|
523
|
|
- id:prescription.advices[b].drug_id
|
524
|
|
- }
|
525
|
|
- tempAdvice.push(obj)
|
|
462
|
+ getPatientInfo(params).then(response => {
|
|
463
|
+ if (response.data.state == 0) {
|
|
464
|
+ this.$message.error(response.data.msg)
|
|
465
|
+ return false
|
|
466
|
+ } else {
|
|
467
|
+ this.prescriptions = []
|
|
468
|
+ this.patientInfo = response.data.data.xt_info
|
|
469
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
470
|
+ this.case_history = response.data.data.case_history
|
|
471
|
+ var case_history = response.data.data.case_history
|
|
472
|
+ console.log("case_history22222222",case_history)
|
|
473
|
+ if (case_history.breathing == 0) {
|
|
474
|
+ case_history.breathing = ""
|
526
|
475
|
}
|
527
|
|
- for (let b = 0; b < prescription.project.length; b++) {
|
528
|
|
- console.log(prescription.project[b])
|
529
|
|
- console.log(prescription.project[b].project)
|
|
476
|
+ this.case_history = case_history
|
|
477
|
+ this.info = response.data.data.info
|
|
478
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
479
|
+ if (this.case_history.temperature <= 0) {
|
|
480
|
+ this.case_history.temperature = ''
|
|
481
|
+ }
|
|
482
|
+ if (this.case_history.blood_sugar <= 0) {
|
|
483
|
+ this.case_history.blood_sugar = ''
|
|
484
|
+ }
|
|
485
|
+ if (this.case_history.pulse <= 0) {
|
|
486
|
+ this.case_history.pulse = ''
|
|
487
|
+ }
|
|
488
|
+ if (this.case_history.sbp <= 0) {
|
|
489
|
+ this.case_history.sbp = ''
|
|
490
|
+ }
|
|
491
|
+ if (this.case_history.dbp <= 0) {
|
|
492
|
+ this.case_history.dbp = ''
|
|
493
|
+ }
|
|
494
|
+ if (this.case_history.height <= 0) {
|
|
495
|
+ this.case_history.height = ''
|
|
496
|
+ }
|
|
497
|
+ if (this.case_history.blood_fat <= 0) {
|
|
498
|
+ this.case_history.blood_fat = ''
|
|
499
|
+ }
|
|
500
|
+ if (this.case_history.sick_type <= 0) {
|
|
501
|
+ this.case_history.sick_type = ''
|
|
502
|
+ }
|
|
503
|
+ this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
|
504
|
+ if (this.case_history.is_infect == 1) {
|
|
505
|
+ this.case_history.is_infect = true
|
|
506
|
+ } else {
|
|
507
|
+ this.case_history.is_infect = false
|
|
508
|
+ }
|
|
509
|
+ this.prescriptionList =response.data.data.prescription
|
|
510
|
+ if (response.data.data.prescription.length > 0) {
|
|
511
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
512
|
+ var prescription = response.data.data.prescription[i]
|
|
513
|
+ let tempAdvice = []
|
|
514
|
+ let tempProject = []
|
|
515
|
+ let tempAddition = []
|
|
516
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
517
|
+ let obj = {
|
|
518
|
+ advice_id: prescription.advices[b].id,
|
|
519
|
+ drug_name: prescription.advices[b].advice_name,
|
|
520
|
+ single_dose: prescription.advices[b].single_dose,
|
|
521
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
522
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
523
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
524
|
+ remark: prescription.advices[b].remark,
|
|
525
|
+ day:prescription.advices[b].day,
|
|
526
|
+ prescribing_number:prescription.advices[b].prescribing_number.toString(),
|
|
527
|
+ single_dose_unit:prescription.advices[b].single_dose_unit,
|
|
528
|
+ prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
|
|
529
|
+ medical_insurance_number:prescription.advices[b].med_list_codg,
|
|
530
|
+ id:prescription.advices[b].drug_id
|
|
531
|
+ }
|
|
532
|
+ tempAdvice.push(obj)
|
|
533
|
+ }
|
|
534
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
535
|
+ console.log(prescription.project[b])
|
|
536
|
+ console.log(prescription.project[b].project)
|
|
537
|
+ let obj = {
|
|
538
|
+ id: prescription.project[b].id,
|
|
539
|
+ project_id: prescription.project[b].project_id,
|
|
540
|
+ project_name: prescription.project[b].project.project_name,
|
|
541
|
+ statistical_classification: prescription.project[b].project.statistical_classification,
|
|
542
|
+ single_dose: prescription.project[b].single_dose,
|
|
543
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
544
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
545
|
+ number_days: prescription.project[b].day,
|
|
546
|
+ total:prescription.project[b].count.toString(),
|
|
547
|
+ price:prescription.project[b].price,
|
|
548
|
+ remark:prescription.project[b].remark,
|
|
549
|
+ medical_code:prescription.project[b].project.medical_code,
|
|
550
|
+ unit:prescription.project[b].unit
|
|
551
|
+ }
|
|
552
|
+ tempProject.push(obj)
|
|
553
|
+ }
|
|
554
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
555
|
+ let obj = {
|
|
556
|
+ id: prescription.addition[b].id,
|
|
557
|
+ item_name: prescription.addition[b].item_name,
|
|
558
|
+ price: prescription.addition[b].price,
|
|
559
|
+ count: prescription.addition[b].count,
|
|
560
|
+ item_id: prescription.addition[b].item_id,
|
|
561
|
+ }
|
|
562
|
+ tempAddition.push(obj)
|
|
563
|
+ }
|
|
564
|
+ let index = i + 1
|
|
565
|
+ let obj = {
|
|
566
|
+ id: prescription.id,
|
|
567
|
+ name: '处方' + index,
|
|
568
|
+ advices: tempAdvice,
|
|
569
|
+ project: tempProject,
|
|
570
|
+ addition:tempAddition,
|
|
571
|
+ order_status:prescription.order_status
|
|
572
|
+ }
|
|
573
|
+ this.prescriptions.push(obj)
|
|
574
|
+ }
|
|
575
|
+ } else {
|
530
|
576
|
let obj = {
|
531
|
|
- id: prescription.project[b].id,
|
532
|
|
- project_id: prescription.project[b].project_id,
|
533
|
|
- project_name: prescription.project[b].project.project_name,
|
534
|
|
- statistical_classification: prescription.project[b].project.statistical_classification,
|
535
|
|
- single_dose: prescription.project[b].single_dose,
|
536
|
|
- delivery_way: prescription.project[b].delivery_way,
|
537
|
|
- execution_frequency: prescription.project[b].execution_frequency,
|
538
|
|
- number_days: prescription.project[b].day,
|
539
|
|
- total:prescription.project[b].count.toString(),
|
540
|
|
- price:prescription.project[b].price,
|
541
|
|
- remark:prescription.project[b].remark,
|
542
|
|
- medical_code:prescription.project[b].project.medical_code,
|
543
|
|
- unit:prescription.project[b].unit
|
|
577
|
+ id:0,
|
|
578
|
+ name: '处方' + 1,
|
|
579
|
+ advices: [],
|
|
580
|
+ project: [],
|
|
581
|
+ addition:[],
|
|
582
|
+ orderStatus:0,
|
544
|
583
|
}
|
545
|
|
- tempProject.push(obj)
|
|
584
|
+ this.prescriptions.push(obj)
|
546
|
585
|
}
|
547
|
|
- for (let b = 0; b < prescription.addition.length; b++) {
|
|
586
|
+ this.$refs.prescriptions.setData(this.prescriptions,this.info)
|
|
587
|
+ }
|
|
588
|
+ })
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+ })
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+ // this.$message.error('需要保存保存处方才能切换')
|
|
596
|
+ }else{
|
|
597
|
+ this.patientid = val.patients.id
|
|
598
|
+ let params = {
|
|
599
|
+ 'record_date': this.record_date,
|
|
600
|
+ 'patient_id': val.patients.id
|
|
601
|
+ }
|
|
602
|
+ getPatientInfo(params).then(response => {
|
|
603
|
+ if (response.data.state == 0) {
|
|
604
|
+ this.$message.error(response.data.msg)
|
|
605
|
+ return false
|
|
606
|
+ } else {
|
|
607
|
+ this.prescriptions = []
|
|
608
|
+ this.patientInfo = response.data.data.xt_info
|
|
609
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
610
|
+ this.case_history = response.data.data.case_history
|
|
611
|
+ var case_history = response.data.data.case_history
|
|
612
|
+ console.log("case_history22222222",case_history)
|
|
613
|
+ if (case_history.breathing == 0) {
|
|
614
|
+ case_history.breathing = ""
|
|
615
|
+ }
|
|
616
|
+ this.case_history = case_history
|
|
617
|
+ this.info = response.data.data.info
|
|
618
|
+ this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
|
619
|
+ if (this.case_history.temperature <= 0) {
|
|
620
|
+ this.case_history.temperature = ''
|
|
621
|
+ }
|
|
622
|
+ if (this.case_history.blood_sugar <= 0) {
|
|
623
|
+ this.case_history.blood_sugar = ''
|
|
624
|
+ }
|
|
625
|
+ if (this.case_history.pulse <= 0) {
|
|
626
|
+ this.case_history.pulse = ''
|
|
627
|
+ }
|
|
628
|
+ if (this.case_history.sbp <= 0) {
|
|
629
|
+ this.case_history.sbp = ''
|
|
630
|
+ }
|
|
631
|
+ if (this.case_history.dbp <= 0) {
|
|
632
|
+ this.case_history.dbp = ''
|
|
633
|
+ }
|
|
634
|
+ if (this.case_history.height <= 0) {
|
|
635
|
+ this.case_history.height = ''
|
|
636
|
+ }
|
|
637
|
+ if (this.case_history.blood_fat <= 0) {
|
|
638
|
+ this.case_history.blood_fat = ''
|
|
639
|
+ }
|
|
640
|
+ if (this.case_history.sick_type <= 0) {
|
|
641
|
+ this.case_history.sick_type = ''
|
|
642
|
+ }
|
|
643
|
+ this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
|
|
644
|
+ if (this.case_history.is_infect == 1) {
|
|
645
|
+ this.case_history.is_infect = true
|
|
646
|
+ } else {
|
|
647
|
+ this.case_history.is_infect = false
|
|
648
|
+ }
|
|
649
|
+ this.prescriptionList =response.data.data.prescription
|
|
650
|
+ if (response.data.data.prescription.length > 0) {
|
|
651
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
652
|
+ var prescription = response.data.data.prescription[i]
|
|
653
|
+ let tempAdvice = []
|
|
654
|
+ let tempProject = []
|
|
655
|
+ let tempAddition = []
|
|
656
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
657
|
+ let obj = {
|
|
658
|
+ advice_id: prescription.advices[b].id,
|
|
659
|
+ drug_name: prescription.advices[b].advice_name,
|
|
660
|
+ single_dose: prescription.advices[b].single_dose,
|
|
661
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
662
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
663
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
664
|
+ remark: prescription.advices[b].remark,
|
|
665
|
+ day:prescription.advices[b].day,
|
|
666
|
+ prescribing_number:prescription.advices[b].prescribing_number.toString(),
|
|
667
|
+ single_dose_unit:prescription.advices[b].single_dose_unit,
|
|
668
|
+ prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
|
|
669
|
+ medical_insurance_number:prescription.advices[b].med_list_codg,
|
|
670
|
+ id:prescription.advices[b].drug_id
|
|
671
|
+ }
|
|
672
|
+ tempAdvice.push(obj)
|
|
673
|
+ }
|
|
674
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
675
|
+ console.log(prescription.project[b])
|
|
676
|
+ console.log(prescription.project[b].project)
|
|
677
|
+ let obj = {
|
|
678
|
+ id: prescription.project[b].id,
|
|
679
|
+ project_id: prescription.project[b].project_id,
|
|
680
|
+ project_name: prescription.project[b].project.project_name,
|
|
681
|
+ statistical_classification: prescription.project[b].project.statistical_classification,
|
|
682
|
+ single_dose: prescription.project[b].single_dose,
|
|
683
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
684
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
685
|
+ number_days: prescription.project[b].day,
|
|
686
|
+ total:prescription.project[b].count.toString(),
|
|
687
|
+ price:prescription.project[b].price,
|
|
688
|
+ remark:prescription.project[b].remark,
|
|
689
|
+ medical_code:prescription.project[b].project.medical_code,
|
|
690
|
+ unit:prescription.project[b].unit
|
|
691
|
+ }
|
|
692
|
+ tempProject.push(obj)
|
|
693
|
+ }
|
|
694
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
695
|
+ let obj = {
|
|
696
|
+ id: prescription.addition[b].id,
|
|
697
|
+ item_name: prescription.addition[b].item_name,
|
|
698
|
+ price: prescription.addition[b].price,
|
|
699
|
+ count: prescription.addition[b].count,
|
|
700
|
+ item_id: prescription.addition[b].item_id,
|
|
701
|
+ }
|
|
702
|
+ tempAddition.push(obj)
|
|
703
|
+ }
|
|
704
|
+ let index = i + 1
|
548
|
705
|
let obj = {
|
549
|
|
- id: prescription.addition[b].id,
|
550
|
|
- item_name: prescription.addition[b].item_name,
|
551
|
|
- price: prescription.addition[b].price,
|
552
|
|
- count: prescription.addition[b].count,
|
553
|
|
- item_id: prescription.addition[b].item_id,
|
|
706
|
+ id: prescription.id,
|
|
707
|
+ name: '处方' + index,
|
|
708
|
+ advices: tempAdvice,
|
|
709
|
+ project: tempProject,
|
|
710
|
+ addition:tempAddition,
|
|
711
|
+ order_status:prescription.order_status
|
554
|
712
|
}
|
555
|
|
- tempAddition.push(obj)
|
|
713
|
+ this.prescriptions.push(obj)
|
556
|
714
|
}
|
557
|
|
- let index = i + 1
|
|
715
|
+ } else {
|
558
|
716
|
let obj = {
|
559
|
|
- id: prescription.id,
|
560
|
|
- name: '处方' + index,
|
561
|
|
- advices: tempAdvice,
|
562
|
|
- project: tempProject,
|
563
|
|
- addition:tempAddition,
|
564
|
|
- order_status:prescription.order_status
|
|
717
|
+ id:0,
|
|
718
|
+ name: '处方' + 1,
|
|
719
|
+ advices: [],
|
|
720
|
+ project: [],
|
|
721
|
+ addition:[],
|
|
722
|
+ orderStatus:0,
|
565
|
723
|
}
|
566
|
724
|
this.prescriptions.push(obj)
|
567
|
725
|
}
|
568
|
|
- } else {
|
569
|
|
- let obj = {
|
570
|
|
- id:0,
|
571
|
|
- name: '处方' + 1,
|
572
|
|
- advices: [],
|
573
|
|
- project: [],
|
574
|
|
- addition:[],
|
575
|
|
- orderStatus:0,
|
576
|
|
- }
|
577
|
|
- this.prescriptions.push(obj)
|
|
726
|
+ this.$refs.prescriptions.setData(this.prescriptions,this.info)
|
578
|
727
|
}
|
579
|
|
- this.$refs.prescriptions.setData(this.prescriptions,this.info)
|
580
|
|
- }
|
581
|
|
- })
|
|
728
|
+ })
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+ }
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
582
|
735
|
},
|
583
|
736
|
currentChange(currentRow, oldCurrentRow){
|
584
|
737
|
let isShowDailog = false
|