|
@@ -510,8 +510,9 @@
|
510
|
510
|
refunddetail,
|
511
|
511
|
refundNumber,
|
512
|
512
|
register,
|
513
|
|
- upload
|
514
|
|
- } from '@/api/his/his'
|
|
513
|
+ upload,
|
|
514
|
+ getMonthCharge
|
|
515
|
+ } from '@api/his/his'
|
515
|
516
|
import RegisterDialog from './components/registerDialog'
|
516
|
517
|
import treatPrint from './treatPrint'
|
517
|
518
|
import statementPrint from './statementPrint'
|
|
@@ -537,7 +538,7 @@
|
537
|
538
|
prescriptionTable,
|
538
|
539
|
additionalCharges,
|
539
|
540
|
treatPrint,
|
540
|
|
- statementPrint
|
|
541
|
+ statementPrint,
|
541
|
542
|
|
542
|
543
|
},
|
543
|
544
|
data() {
|
|
@@ -3243,6 +3244,253 @@
|
3243
|
3244
|
}
|
3244
|
3245
|
}
|
3245
|
3246
|
},
|
|
3247
|
+ getMonthPatientInformation(id, batch_number, his_patient_id, order_id) {
|
|
3248
|
+ const params = {
|
|
3249
|
+ 'record_date': this.record_date,
|
|
3250
|
+ 'patient_id': id,
|
|
3251
|
+ 'his_patient_id': his_patient_id,
|
|
3252
|
+ 'number': batch_number,
|
|
3253
|
+ 'start_time': this.other_start_time,
|
|
3254
|
+ 'end_time': this.other_end_time,
|
|
3255
|
+ 'type': this.radio,
|
|
3256
|
+ 'p_type': 2,
|
|
3257
|
+ 'order_id': order_id
|
|
3258
|
+
|
|
3259
|
+ }
|
|
3260
|
+ this.loading = true
|
|
3261
|
+ getChargeHisPatientInfo(params).then(response => {
|
|
3262
|
+ if (response.data.state == 0) {
|
|
3263
|
+ this.loading = false
|
|
3264
|
+
|
|
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 = []
|
|
3289
|
+ } 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]))
|
|
3292
|
+ }
|
|
3293
|
+ }
|
|
3294
|
+ this.sick_history = this.info.sick_history
|
|
3295
|
+ if (this.info.register_type == 0) {
|
|
3296
|
+ this.form.p_type = ''
|
|
3297
|
+ }
|
|
3298
|
+
|
|
3299
|
+ if (this.info.sick_type == 0) {
|
|
3300
|
+ this.form.sick_type = ''
|
|
3301
|
+ }
|
|
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 = []
|
|
3307
|
+ } 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]))
|
|
3310
|
+ }
|
|
3311
|
+ }
|
|
3312
|
+
|
|
3313
|
+ this.sick_history = ''
|
|
3314
|
+ }
|
|
3315
|
+ this.addtions_charge = response.data.data.addtions_charge
|
|
3316
|
+ this.setMonthPrescription(response.data.data.month_prescriptions)
|
|
3317
|
+
|
|
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
|
+ }
|
|
3323
|
+
|
|
3324
|
+ const big_prescriptions = []
|
|
3325
|
+
|
|
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
|
+ }
|
|
3333
|
+
|
|
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]
|
|
3338
|
+
|
|
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
|
|
3357
|
+
|
|
3358
|
+ }
|
|
3359
|
+ tempAdvice.push(obj)
|
|
3360
|
+ }
|
|
3361
|
+
|
|
3362
|
+ for (let b = 0; b < prescription.project.length; b++) {
|
|
3363
|
+ 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
|
|
3378
|
+ }
|
|
3379
|
+
|
|
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
|
|
3384
|
+
|
|
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
|
+ }
|
|
3390
|
+
|
|
3391
|
+ tempProject.push(obj)
|
|
3392
|
+ }
|
|
3393
|
+
|
|
3394
|
+ for (let b = 0; b < prescription.addition.length; b++) {
|
|
3395
|
+ 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
|
|
3401
|
+ }
|
|
3402
|
+ tempAddition.push(obj)
|
|
3403
|
+ }
|
|
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
|
+ }
|
|
3426
|
+ }
|
|
3427
|
+ }
|
|
3428
|
+
|
|
3429
|
+ this.big_prescriptions = JSON.parse(JSON.stringify(big_prescriptions))
|
|
3430
|
+
|
|
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
|
|
3434
|
+ }
|
|
3435
|
+ }
|
|
3436
|
+
|
|
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)
|
|
3448
|
+ }
|
|
3449
|
+ }
|
|
3450
|
+ }
|
|
3451
|
+
|
|
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)
|
|
3457
|
+ }
|
|
3458
|
+ }
|
|
3459
|
+ // console.log(this.big_prescriptions)
|
|
3460
|
+
|
|
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]))
|
|
3464
|
+ } else {
|
|
3465
|
+ this.big_prescriptions[i]['curPrescriptions'] = {}
|
|
3466
|
+ }
|
|
3467
|
+ this.big_prescriptions[i]['total'] = this.getTotalThree(this.big_prescriptions[i])
|
|
3468
|
+ }
|
|
3469
|
+
|
|
3470
|
+ if (this.big_prescriptions.length > 0) {
|
|
3471
|
+ this.editableTabsValue = this.getPName(this.big_prescriptions[0].med_type, 1)
|
|
3472
|
+ }
|
|
3473
|
+
|
|
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
|
+ })
|
|
3492
|
+ },
|
|
3493
|
+
|
3246
|
3494
|
// 获取患者的基本信息
|
3247
|
3495
|
getPatientInformation(id, batch_number, his_patient_id, order_id) {
|
3248
|
3496
|
const params = {
|