|
@@ -510,7 +510,8 @@
|
510
|
510
|
refunddetail,
|
511
|
511
|
refundNumber,
|
512
|
512
|
register,
|
513
|
|
- upload
|
|
513
|
+ upload,
|
|
514
|
+ getMonthCharge
|
514
|
515
|
} from '@/api/his/his'
|
515
|
516
|
import RegisterDialog from './components/registerDialog'
|
516
|
517
|
import treatPrint from './treatPrint'
|
|
@@ -537,7 +538,7 @@
|
537
|
538
|
prescriptionTable,
|
538
|
539
|
additionalCharges,
|
539
|
540
|
treatPrint,
|
540
|
|
- statementPrint
|
|
541
|
+ statementPrint,
|
541
|
542
|
|
542
|
543
|
},
|
543
|
544
|
data() {
|
|
@@ -1637,7 +1638,79 @@
|
1637
|
1638
|
if (this.activeName == 'first') {
|
1638
|
1639
|
this.getPatientList()
|
1639
|
1640
|
} else if (this.activeName == 'second') {
|
1640
|
|
- this.getMonthPatientList()
|
|
1641
|
+ // this.getMonthPatientList()
|
|
1642
|
+ const params = {
|
|
1643
|
+ 'record_date': this.record_date,
|
|
1644
|
+ 'patient_id': this.patientInfo.id,
|
|
1645
|
+ 'his_patient_id': this.hisPatientInfo.id,
|
|
1646
|
+ 'start_time': this.other_start_time,
|
|
1647
|
+ 'end_time': this.other_end_time,
|
|
1648
|
+ 'type': this.radio,
|
|
1649
|
+ 'p_type': 2,
|
|
1650
|
+ 'order_id': this.order.id
|
|
1651
|
+ }
|
|
1652
|
+
|
|
1653
|
+ getMonthCharge(params).then(response => {
|
|
1654
|
+ if (response.data.state == 0) {
|
|
1655
|
+ this.loading = false
|
|
1656
|
+
|
|
1657
|
+ this.$message.error(response.data.msg)
|
|
1658
|
+ return false
|
|
1659
|
+ } else {
|
|
1660
|
+ this.prescriptions = []
|
|
1661
|
+ this.month_prescriptions = []
|
|
1662
|
+ this.big_month_prescriptions = []
|
|
1663
|
+ this.big_prescriptions = []
|
|
1664
|
+ this.curPrescriptions = {}
|
|
1665
|
+ this.curMonthPrescriptions = {}
|
|
1666
|
+ this.loading = false
|
|
1667
|
+ this.patientInfo = response.data.data.xt_info
|
|
1668
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
1669
|
+ this.info = response.data.data.info
|
|
1670
|
+ this.order = response.data.data.order
|
|
1671
|
+ this.p_type = ''
|
|
1672
|
+ this.sick_type = ''
|
|
1673
|
+ this.diagnosis = []
|
|
1674
|
+ this.sick_history = ''
|
|
1675
|
+ this.form.diagnosis = []
|
|
1676
|
+ if (this.info.id > 0) {
|
|
1677
|
+ this.form.p_type = response.data.data.info.register_type
|
|
1678
|
+ this.form.sick_type = response.data.data.info.sick_type
|
|
1679
|
+ if (response.data.data.info.diagnosis.length == 0) {
|
|
1680
|
+ this.form.diagnosis = []
|
|
1681
|
+ } else {
|
|
1682
|
+ for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
|
|
1683
|
+ this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
|
|
1684
|
+ }
|
|
1685
|
+ }
|
|
1686
|
+ this.sick_history = this.info.sick_history
|
|
1687
|
+ if (this.info.register_type == 0) {
|
|
1688
|
+ this.form.p_type = ''
|
|
1689
|
+ }
|
|
1690
|
+
|
|
1691
|
+ if (this.info.sick_type == 0) {
|
|
1692
|
+ this.form.sick_type = ''
|
|
1693
|
+ }
|
|
1694
|
+ } else {
|
|
1695
|
+ this.form.p_type = 14
|
|
1696
|
+ this.form.sick_type = this.sick[0].id
|
|
1697
|
+ if (response.data.data.last_info.diagnoses.length == 0) {
|
|
1698
|
+ this.form.diagnosis = []
|
|
1699
|
+ } else {
|
|
1700
|
+ for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
|
|
1701
|
+ this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
|
|
1702
|
+ }
|
|
1703
|
+ }
|
|
1704
|
+
|
|
1705
|
+ this.sick_history = ''
|
|
1706
|
+ }
|
|
1707
|
+ this.addtions_charge = response.data.data.addtions_charge
|
|
1708
|
+ this.setMonthPrescription(response.data.data.month_prescriptions)
|
|
1709
|
+
|
|
1710
|
+ }
|
|
1711
|
+ })
|
|
1712
|
+
|
|
1713
|
+
|
1641
|
1714
|
}
|
1642
|
1715
|
},
|
1643
|
1716
|
searchAction() {
|
|
@@ -3258,237 +3331,290 @@
|
3258
|
3331
|
|
3259
|
3332
|
}
|
3260
|
3333
|
this.loading = true
|
3261
|
|
- getChargeHisPatientInfo(params).then(response => {
|
3262
|
|
- if (response.data.state == 0) {
|
3263
|
|
- this.loading = false
|
|
3334
|
+ if(this.activeName == 'first'){
|
3264
|
3335
|
|
3265
|
|
- this.$message.error(response.data.msg)
|
3266
|
|
- return false
|
3267
|
|
- } else {
|
3268
|
|
- this.prescriptions = []
|
3269
|
|
- this.month_prescriptions = []
|
3270
|
|
- this.big_month_prescriptions = []
|
3271
|
|
- this.big_prescriptions = []
|
3272
|
|
- this.curPrescriptions = {}
|
3273
|
|
- this.curMonthPrescriptions = {}
|
3274
|
|
- this.loading = false
|
3275
|
|
- this.patientInfo = response.data.data.xt_info
|
3276
|
|
- this.hisPatientInfo = response.data.data.his_info
|
3277
|
|
- this.info = response.data.data.info
|
3278
|
|
- this.order = response.data.data.order
|
3279
|
|
- this.p_type = ''
|
3280
|
|
- this.sick_type = ''
|
3281
|
|
- this.diagnosis = []
|
3282
|
|
- this.sick_history = ''
|
3283
|
|
- this.form.diagnosis = []
|
3284
|
|
- if (this.info.id > 0) {
|
3285
|
|
- this.form.p_type = response.data.data.info.register_type
|
3286
|
|
- this.form.sick_type = response.data.data.info.sick_type
|
3287
|
|
- if (response.data.data.info.diagnosis.length == 0) {
|
3288
|
|
- this.form.diagnosis = []
|
|
3336
|
+ getChargeHisPatientInfo(params).then(response => {
|
|
3337
|
+ if (response.data.state == 0) {
|
|
3338
|
+ this.loading = false
|
|
3339
|
+
|
|
3340
|
+ this.$message.error(response.data.msg)
|
|
3341
|
+ return false
|
|
3342
|
+ } else {
|
|
3343
|
+ this.prescriptions = []
|
|
3344
|
+ this.month_prescriptions = []
|
|
3345
|
+ this.big_month_prescriptions = []
|
|
3346
|
+ this.big_prescriptions = []
|
|
3347
|
+ this.curPrescriptions = {}
|
|
3348
|
+ this.curMonthPrescriptions = {}
|
|
3349
|
+ this.loading = false
|
|
3350
|
+ this.patientInfo = response.data.data.xt_info
|
|
3351
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
3352
|
+ this.info = response.data.data.info
|
|
3353
|
+ this.order = response.data.data.order
|
|
3354
|
+ this.p_type = ''
|
|
3355
|
+ this.sick_type = ''
|
|
3356
|
+ this.diagnosis = []
|
|
3357
|
+ this.sick_history = ''
|
|
3358
|
+ this.form.diagnosis = []
|
|
3359
|
+ if (this.info.id > 0) {
|
|
3360
|
+ this.form.p_type = response.data.data.info.register_type
|
|
3361
|
+ this.form.sick_type = response.data.data.info.sick_type
|
|
3362
|
+ if (response.data.data.info.diagnosis.length == 0) {
|
|
3363
|
+ this.form.diagnosis = []
|
|
3364
|
+ } else {
|
|
3365
|
+ for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
|
|
3366
|
+ this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
|
|
3367
|
+ }
|
|
3368
|
+ }
|
|
3369
|
+ this.sick_history = this.info.sick_history
|
|
3370
|
+ if (this.info.register_type == 0) {
|
|
3371
|
+ this.form.p_type = ''
|
|
3372
|
+ }
|
|
3373
|
+
|
|
3374
|
+ if (this.info.sick_type == 0) {
|
|
3375
|
+ this.form.sick_type = ''
|
|
3376
|
+ }
|
3289
|
3377
|
} else {
|
3290
|
|
- for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
|
3291
|
|
- this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
|
|
3378
|
+ this.form.p_type = 14
|
|
3379
|
+ this.form.sick_type = this.sick[0].id
|
|
3380
|
+ if (response.data.data.last_info.diagnoses.length == 0) {
|
|
3381
|
+ this.form.diagnosis = []
|
|
3382
|
+ } else {
|
|
3383
|
+ for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
|
|
3384
|
+ this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
|
|
3385
|
+ }
|
3292
|
3386
|
}
|
3293
|
|
- }
|
3294
|
|
- this.sick_history = this.info.sick_history
|
3295
|
|
- if (this.info.register_type == 0) {
|
3296
|
|
- this.form.p_type = ''
|
3297
|
|
- }
|
3298
|
3387
|
|
3299
|
|
- if (this.info.sick_type == 0) {
|
3300
|
|
- this.form.sick_type = ''
|
|
3388
|
+ this.sick_history = ''
|
3301
|
3389
|
}
|
3302
|
|
- } else {
|
3303
|
|
- this.form.p_type = 14
|
3304
|
|
- this.form.sick_type = this.sick[0].id
|
3305
|
|
- if (response.data.data.last_info.diagnoses.length == 0) {
|
3306
|
|
- this.form.diagnosis = []
|
|
3390
|
+ this.addtions_charge = response.data.data.addtions_charge
|
|
3391
|
+ // this.setMonthPrescription(response.data.data.month_prescriptions)
|
|
3392
|
+
|
|
3393
|
+ if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
|
|
3394
|
+ this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
|
3307
|
3395
|
} else {
|
3308
|
|
- for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
|
3309
|
|
- this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
|
|
3396
|
+ this.prescription_id = 0
|
|
3397
|
+ }
|
|
3398
|
+
|
|
3399
|
+ const big_prescriptions = []
|
|
3400
|
+
|
|
3401
|
+ for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
|
|
3402
|
+ const obj = {
|
|
3403
|
+ med_type: this.unique_three(response.data.data.prescription)[i].med_type,
|
|
3404
|
+ prescriptions: []
|
3310
|
3405
|
}
|
|
3406
|
+ big_prescriptions.push(obj)
|
3311
|
3407
|
}
|
3312
|
3408
|
|
3313
|
|
- this.sick_history = ''
|
3314
|
|
- }
|
3315
|
|
- this.addtions_charge = response.data.data.addtions_charge
|
3316
|
|
- this.setMonthPrescription(response.data.data.month_prescriptions)
|
|
3409
|
+ for (let c = 0; c < big_prescriptions.length; c++) {
|
|
3410
|
+ const inner_prescription = []
|
|
3411
|
+ for (let i = 0; i < response.data.data.prescription.length; i++) {
|
|
3412
|
+ var prescription = response.data.data.prescription[i]
|
|
3413
|
+
|
|
3414
|
+ if (big_prescriptions[c].med_type == prescription.med_type) {
|
|
3415
|
+ const tempAdvice = []
|
|
3416
|
+ const tempProject = []
|
|
3417
|
+ const tempAddition = []
|
|
3418
|
+ for (let b = 0; b < prescription.advices.length; b++) {
|
|
3419
|
+ const obj = {
|
|
3420
|
+ advice_id: prescription.advices[b].id,
|
|
3421
|
+ drug_name: prescription.advices[b].advice_name,
|
|
3422
|
+ single_dose: prescription.advices[b].single_dose,
|
|
3423
|
+ delivery_way: prescription.advices[b].delivery_way,
|
|
3424
|
+ execution_frequency: prescription.advices[b].execution_frequency,
|
|
3425
|
+ retail_price: prescription.advices[b].price.toString(),
|
|
3426
|
+ remark: prescription.advices[b].remark,
|
|
3427
|
+ day: prescription.advices[b].day,
|
|
3428
|
+ prescribing_number: prescription.advices[b].prescribing_number.toString(),
|
|
3429
|
+ single_dose_unit: prescription.advices[b].single_dose_unit,
|
|
3430
|
+ prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
|
3431
|
+ medical_insurance_number: prescription.advices[b].med_list_codg
|
3317
|
3432
|
|
3318
|
|
- if (response.data.data.prescription.length > 0 && response.data.data.prescription[0].advices.length > 0) {
|
3319
|
|
- this.prescription_id = response.data.data.prescription[0].advices[0].prescription_id
|
3320
|
|
- } else {
|
3321
|
|
- this.prescription_id = 0
|
3322
|
|
- }
|
|
3433
|
+ }
|
|
3434
|
+ tempAdvice.push(obj)
|
|
3435
|
+ }
|
3323
|
3436
|
|
3324
|
|
- const big_prescriptions = []
|
|
3437
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
3438
|
+ const obj = {
|
|
3439
|
+ id: prescription.project[b].id,
|
|
3440
|
+ project_id: prescription.project[b].project.id,
|
|
3441
|
+ // project_name: prescription.project[b].project.project_name,
|
|
3442
|
+ // statistical_classification: prescription.project[b].project.statistical_classification,
|
|
3443
|
+ single_dose: prescription.project[b].single_dose,
|
|
3444
|
+ delivery_way: prescription.project[b].delivery_way,
|
|
3445
|
+ execution_frequency: prescription.project[b].execution_frequency,
|
|
3446
|
+ number_days: prescription.project[b].day,
|
|
3447
|
+ total: prescription.project[b].count.toString(),
|
|
3448
|
+ price: prescription.project[b].price,
|
|
3449
|
+ remark: prescription.project[b].remark,
|
|
3450
|
+ // medical_code: prescription.project[b].project.medical_code,
|
|
3451
|
+ unit: prescription.project[b].unit,
|
|
3452
|
+ type: prescription.project[b].type
|
|
3453
|
+ }
|
3325
|
3454
|
|
3326
|
|
- for (let i = 0; i < this.unique_three(response.data.data.prescription).length; i++) {
|
3327
|
|
- const obj = {
|
3328
|
|
- med_type: this.unique_three(response.data.data.prescription)[i].med_type,
|
3329
|
|
- prescriptions: []
|
3330
|
|
- }
|
3331
|
|
- big_prescriptions.push(obj)
|
3332
|
|
- }
|
|
3455
|
+ if (prescription.project[b].type == 2) {
|
|
3456
|
+ obj['statistical_classification'] = prescription.project[b].project.statistical_classification
|
|
3457
|
+ obj['medical_code'] = prescription.project[b].project.medical_code
|
|
3458
|
+ obj['project_name'] = prescription.project[b].project.project_name
|
3333
|
3459
|
|
3334
|
|
- for (let c = 0; c < big_prescriptions.length; c++) {
|
3335
|
|
- const inner_prescription = []
|
3336
|
|
- for (let i = 0; i < response.data.data.prescription.length; i++) {
|
3337
|
|
- var prescription = response.data.data.prescription[i]
|
|
3460
|
+ } else if (prescription.project[b].type == 3) {
|
|
3461
|
+ obj['statistical_classification'] = ''
|
|
3462
|
+ obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
|
|
3463
|
+ obj['project_name'] = prescription.project[b].good_info.good_name
|
|
3464
|
+ }
|
3338
|
3465
|
|
3339
|
|
- if (big_prescriptions[c].med_type == prescription.med_type) {
|
3340
|
|
- const tempAdvice = []
|
3341
|
|
- const tempProject = []
|
3342
|
|
- const tempAddition = []
|
3343
|
|
- for (let b = 0; b < prescription.advices.length; b++) {
|
3344
|
|
- const obj = {
|
3345
|
|
- advice_id: prescription.advices[b].id,
|
3346
|
|
- drug_name: prescription.advices[b].advice_name,
|
3347
|
|
- single_dose: prescription.advices[b].single_dose,
|
3348
|
|
- delivery_way: prescription.advices[b].delivery_way,
|
3349
|
|
- execution_frequency: prescription.advices[b].execution_frequency,
|
3350
|
|
- retail_price: prescription.advices[b].price.toString(),
|
3351
|
|
- remark: prescription.advices[b].remark,
|
3352
|
|
- day: prescription.advices[b].day,
|
3353
|
|
- prescribing_number: prescription.advices[b].prescribing_number.toString(),
|
3354
|
|
- single_dose_unit: prescription.advices[b].single_dose_unit,
|
3355
|
|
- prescribing_number_unit: prescription.advices[b].prescribing_number_unit,
|
3356
|
|
- medical_insurance_number: prescription.advices[b].med_list_codg
|
|
3466
|
+ tempProject.push(obj)
|
|
3467
|
+ }
|
3357
|
3468
|
|
|
3469
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
3470
|
+ const obj = {
|
|
3471
|
+ id: prescription.addition[b].id,
|
|
3472
|
+ item_name: prescription.addition[b].item_name,
|
|
3473
|
+ price: prescription.addition[b].price,
|
|
3474
|
+ count: prescription.addition[b].count,
|
|
3475
|
+ item_id: prescription.addition[b].item_id
|
|
3476
|
+ }
|
|
3477
|
+ tempAddition.push(obj)
|
3358
|
3478
|
}
|
3359
|
|
- tempAdvice.push(obj)
|
3360
|
|
- }
|
|
3479
|
+ const index = i + 1
|
|
3480
|
+ console.log('~~~~~~~~')
|
|
3481
|
+ console.log(prescription.order)
|
|
3482
|
+ prescription.order.order_status = prescription.order.order_status.toString()
|
|
3483
|
+ prescription.order.order_status = parseInt(prescription.order.order_status)
|
3361
|
3484
|
|
3362
|
|
- for (let b = 0; b < prescription.project.length; b++) {
|
3363
|
3485
|
const obj = {
|
3364
|
|
- id: prescription.project[b].id,
|
3365
|
|
- project_id: prescription.project[b].project.id,
|
3366
|
|
- // project_name: prescription.project[b].project.project_name,
|
3367
|
|
- // statistical_classification: prescription.project[b].project.statistical_classification,
|
3368
|
|
- single_dose: prescription.project[b].single_dose,
|
3369
|
|
- delivery_way: prescription.project[b].delivery_way,
|
3370
|
|
- execution_frequency: prescription.project[b].execution_frequency,
|
3371
|
|
- number_days: prescription.project[b].day,
|
3372
|
|
- total: prescription.project[b].count.toString(),
|
3373
|
|
- price: prescription.project[b].price,
|
3374
|
|
- remark: prescription.project[b].remark,
|
3375
|
|
- // medical_code: prescription.project[b].project.medical_code,
|
3376
|
|
- unit: prescription.project[b].unit,
|
3377
|
|
- type: prescription.project[b].type
|
|
3486
|
+ id: prescription.id,
|
|
3487
|
+ name: this.getPName(prescription.med_type, index),
|
|
3488
|
+ advices: tempAdvice,
|
|
3489
|
+ project: tempProject,
|
|
3490
|
+ addition: tempAddition,
|
|
3491
|
+ order_status: prescription.order_status,
|
|
3492
|
+ type: prescription.type,
|
|
3493
|
+ med_type: prescription.med_type,
|
|
3494
|
+ order: prescription.order
|
3378
|
3495
|
}
|
|
3496
|
+ // inner_prescription.push(obj)
|
|
3497
|
+ big_prescriptions[c].prescriptions.push(obj)
|
3379
|
3498
|
|
3380
|
|
- if (prescription.project[b].type == 2) {
|
3381
|
|
- obj['statistical_classification'] = prescription.project[b].project.statistical_classification
|
3382
|
|
- obj['medical_code'] = prescription.project[b].project.medical_code
|
3383
|
|
- obj['project_name'] = prescription.project[b].project.project_name
|
|
3499
|
+ this.prescriptions.push(obj)
|
|
3500
|
+ }
|
|
3501
|
+ }
|
|
3502
|
+ }
|
3384
|
3503
|
|
3385
|
|
- } else if (prescription.project[b].type == 3) {
|
3386
|
|
- obj['statistical_classification'] = ''
|
3387
|
|
- obj['medical_code'] = prescription.project[b].good_info.medical_insurance_number
|
3388
|
|
- obj['project_name'] = prescription.project[b].good_info.good_name
|
3389
|
|
- }
|
|
3504
|
+ this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
|
3390
|
3505
|
|
3391
|
|
- tempProject.push(obj)
|
3392
|
|
- }
|
|
3506
|
+ for (let i = 0; i < this.big_prescriptions.length; i++) {
|
|
3507
|
+ if (this.big_prescriptions[i].med_type == '11') {
|
|
3508
|
+ this.big_prescriptions[i]['is_true'] = 1
|
|
3509
|
+ }
|
|
3510
|
+ }
|
3393
|
3511
|
|
3394
|
|
- for (let b = 0; b < prescription.addition.length; b++) {
|
|
3512
|
+ for (let i = 0; i < this.big_prescriptions.length; i++) {
|
|
3513
|
+ if (this.big_prescriptions[i].is_true == 1) {
|
|
3514
|
+ for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
|
3395
|
3515
|
const obj = {
|
3396
|
|
- id: prescription.addition[b].id,
|
3397
|
|
- item_name: prescription.addition[b].item_name,
|
3398
|
|
- price: prescription.addition[b].price,
|
3399
|
|
- count: prescription.addition[b].count,
|
3400
|
|
- item_id: prescription.addition[b].item_id
|
|
3516
|
+ med_type: '11',
|
|
3517
|
+ prescriptions: []
|
3401
|
3518
|
}
|
3402
|
|
- tempAddition.push(obj)
|
|
3519
|
+ const arr = []
|
|
3520
|
+ arr.push(this.big_prescriptions[i].prescriptions[b])
|
|
3521
|
+ obj.prescriptions = arr
|
|
3522
|
+ this.big_prescriptions.push(obj)
|
3403
|
3523
|
}
|
3404
|
|
- const index = i + 1
|
3405
|
|
- console.log('~~~~~~~~')
|
3406
|
|
- console.log(prescription.order)
|
3407
|
|
- prescription.order.order_status = prescription.order.order_status.toString()
|
3408
|
|
- prescription.order.order_status = parseInt(prescription.order.order_status)
|
3409
|
|
-
|
3410
|
|
- const obj = {
|
3411
|
|
- id: prescription.id,
|
3412
|
|
- name: this.getPName(prescription.med_type, index),
|
3413
|
|
- advices: tempAdvice,
|
3414
|
|
- project: tempProject,
|
3415
|
|
- addition: tempAddition,
|
3416
|
|
- order_status: prescription.order_status,
|
3417
|
|
- type: prescription.type,
|
3418
|
|
- med_type: prescription.med_type,
|
3419
|
|
- order: prescription.order
|
3420
|
|
- }
|
3421
|
|
- // inner_prescription.push(obj)
|
3422
|
|
- big_prescriptions[c].prescriptions.push(obj)
|
3423
|
|
-
|
3424
|
|
- this.prescriptions.push(obj)
|
3425
|
3524
|
}
|
3426
|
3525
|
}
|
3427
|
|
- }
|
3428
|
|
-
|
3429
|
|
- this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
|
3430
|
3526
|
|
3431
|
|
- for (let i = 0; i < this.big_prescriptions.length; i++) {
|
3432
|
|
- if (this.big_prescriptions[i].med_type == '11') {
|
3433
|
|
- this.big_prescriptions[i]['is_true'] = 1
|
|
3527
|
+ console.log(this.big_prescriptions)
|
|
3528
|
+ //
|
|
3529
|
+ for (let i = 0; i < this.big_prescriptions.length; i++) {
|
|
3530
|
+ if (this.big_prescriptions[i].is_true == 1) {
|
|
3531
|
+ this.big_prescriptions.splice(i, 1)
|
|
3532
|
+ }
|
3434
|
3533
|
}
|
3435
|
|
- }
|
|
3534
|
+ // console.log(this.big_prescriptions)
|
3436
|
3535
|
|
3437
|
|
- for (let i = 0; i < this.big_prescriptions.length; i++) {
|
3438
|
|
- if (this.big_prescriptions[i].is_true == 1) {
|
3439
|
|
- for (let b = 0; b < this.big_prescriptions[i].prescriptions.length; b++) {
|
3440
|
|
- const obj = {
|
3441
|
|
- med_type: '11',
|
3442
|
|
- prescriptions: []
|
3443
|
|
- }
|
3444
|
|
- const arr = []
|
3445
|
|
- arr.push(this.big_prescriptions[i].prescriptions[b])
|
3446
|
|
- obj.prescriptions = arr
|
3447
|
|
- this.big_prescriptions.push(obj)
|
|
3536
|
+ for (let i = 0; i < this.big_prescriptions.length; i++) {
|
|
3537
|
+ if (this.big_prescriptions[i].prescriptions.length > 0) {
|
|
3538
|
+ this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
|
|
3539
|
+ } else {
|
|
3540
|
+ this.big_prescriptions[i]['curPrescriptions'] = {}
|
3448
|
3541
|
}
|
|
3542
|
+ this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
|
3449
|
3543
|
}
|
3450
|
|
- }
|
3451
|
3544
|
|
3452
|
|
- console.log(this.big_prescriptions)
|
3453
|
|
- //
|
3454
|
|
- for (let i = 0; i < this.big_prescriptions.length; i++) {
|
3455
|
|
- if (this.big_prescriptions[i].is_true == 1) {
|
3456
|
|
- this.big_prescriptions.splice(i, 1)
|
|
3545
|
+ if (this.big_prescriptions.length > 0) {
|
|
3546
|
+ this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
|
3457
|
3547
|
}
|
|
3548
|
+
|
|
3549
|
+
|
3458
|
3550
|
}
|
3459
|
|
- // console.log(this.big_prescriptions)
|
|
3551
|
+ })
|
|
3552
|
+
|
3460
|
3553
|
|
3461
|
|
- for (let i = 0; i < this.big_prescriptions.length; i++) {
|
3462
|
|
- if (this.big_prescriptions[i].prescriptions.length > 0) {
|
3463
|
|
- this.big_prescriptions[i]['curPrescriptions'] = JSON.parse(JSON.stringify(this.big_prescriptions[i].prescriptions[0]))
|
|
3554
|
+ }else{
|
|
3555
|
+
|
|
3556
|
+ getMonthCharge(params).then(response => {
|
|
3557
|
+ if (response.data.state == 0) {
|
|
3558
|
+ this.loading = false
|
|
3559
|
+
|
|
3560
|
+ this.$message.error(response.data.msg)
|
|
3561
|
+ return false
|
|
3562
|
+ } else {
|
|
3563
|
+ this.prescriptions = []
|
|
3564
|
+ this.month_prescriptions = []
|
|
3565
|
+ this.big_month_prescriptions = []
|
|
3566
|
+ this.big_prescriptions = []
|
|
3567
|
+ this.curPrescriptions = {}
|
|
3568
|
+ this.curMonthPrescriptions = {}
|
|
3569
|
+ this.loading = false
|
|
3570
|
+ this.patientInfo = response.data.data.xt_info
|
|
3571
|
+ this.hisPatientInfo = response.data.data.his_info
|
|
3572
|
+ this.info = response.data.data.info
|
|
3573
|
+ this.order = response.data.data.order
|
|
3574
|
+ this.p_type = ''
|
|
3575
|
+ this.sick_type = ''
|
|
3576
|
+ this.diagnosis = []
|
|
3577
|
+ this.sick_history = ''
|
|
3578
|
+ this.form.diagnosis = []
|
|
3579
|
+ if (this.info.id > 0) {
|
|
3580
|
+ this.form.p_type = response.data.data.info.register_type
|
|
3581
|
+ this.form.sick_type = response.data.data.info.sick_type
|
|
3582
|
+ if (response.data.data.info.diagnosis.length == 0) {
|
|
3583
|
+ this.form.diagnosis = []
|
|
3584
|
+ } else {
|
|
3585
|
+ for (let i = 0; i < response.data.data.info.diagnosis.split(',').length; i++) {
|
|
3586
|
+ this.form.diagnosis.push(parseInt(response.data.data.info.diagnosis.split(',')[i]))
|
|
3587
|
+ }
|
|
3588
|
+ }
|
|
3589
|
+ this.sick_history = this.info.sick_history
|
|
3590
|
+ if (this.info.register_type == 0) {
|
|
3591
|
+ this.form.p_type = ''
|
|
3592
|
+ }
|
|
3593
|
+
|
|
3594
|
+ if (this.info.sick_type == 0) {
|
|
3595
|
+ this.form.sick_type = ''
|
|
3596
|
+ }
|
3464
|
3597
|
} else {
|
3465
|
|
- this.big_prescriptions[i]['curPrescriptions'] = {}
|
|
3598
|
+ this.form.p_type = 14
|
|
3599
|
+ this.form.sick_type = this.sick[0].id
|
|
3600
|
+ if (response.data.data.last_info.diagnoses.length == 0) {
|
|
3601
|
+ this.form.diagnosis = []
|
|
3602
|
+ } else {
|
|
3603
|
+ for (let i = 0; i < response.data.data.last_info.diagnosis.split(',').length; i++) {
|
|
3604
|
+ this.form.diagnosis.push(parseInt(response.data.data.last_info.diagnosis.split(',')[i]))
|
|
3605
|
+ }
|
|
3606
|
+ }
|
|
3607
|
+
|
|
3608
|
+ this.sick_history = ''
|
3466
|
3609
|
}
|
3467
|
|
- this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
|
3468
|
|
- }
|
|
3610
|
+ this.addtions_charge = response.data.data.addtions_charge
|
|
3611
|
+ this.setMonthPrescription(response.data.data.month_prescriptions)
|
3469
|
3612
|
|
3470
|
|
- if (this.big_prescriptions.length > 0) {
|
3471
|
|
- this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
|
3472
|
3613
|
}
|
|
3614
|
+ })
|
3473
|
3615
|
|
3474
|
|
- console.log(this.big_prescriptions)
|
3475
|
|
- console.log(this.big_prescriptions[0].curPrescriptions.order_status)
|
3476
|
|
-
|
3477
|
|
- //
|
3478
|
|
- // if (this.prescriptions.length > 0) {
|
3479
|
|
- // this.curPrescriptions = this.prescriptions[0]
|
3480
|
|
- // } else {
|
3481
|
|
- // this.curPrescriptions = {}
|
3482
|
|
- // }
|
3483
|
|
- // if (this.month_prescriptions.length > 0) {
|
3484
|
|
- // this.curMonthPrescriptions = this.month_prescriptions[0]
|
3485
|
|
- // } else {
|
3486
|
|
- // this.curMonthPrescriptions = {}
|
3487
|
|
- // }
|
3488
|
|
-
|
3489
|
|
- // this.month_total = this.getMonthTotalOne()
|
3490
|
|
- }
|
3491
|
|
- })
|
|
3616
|
+
|
|
3617
|
+ }
|
3492
|
3618
|
}
|
3493
|
3619
|
// sz_open(index, med_type, order, prescriptions) {
|
3494
|
3620
|
// switch (index) {
|