|
@@ -992,7 +992,8 @@ import {
|
992
|
992
|
Refund,
|
993
|
993
|
refundNumber,
|
994
|
994
|
register,
|
995
|
|
- upload
|
|
995
|
+ upload,
|
|
996
|
+ getMonthHisPatient,
|
996
|
997
|
} from '@/api/his/his'
|
997
|
998
|
import RegisterDialog from './components/registerDialog'
|
998
|
999
|
import treatPrint from './treatPrint'
|
|
@@ -2185,8 +2186,10 @@ export default {
|
2185
|
2186
|
this.cal_two = two_count
|
2186
|
2187
|
this.cal_three = one_count + two_count
|
2187
|
2188
|
this.current_index = 0
|
2188
|
|
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
2189
|
|
- this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
|
2189
|
+ if(this.patientTableData.length > 0) {
|
|
2190
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
2191
|
+ }
|
|
2192
|
+ // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
2190
|
2193
|
}
|
2191
|
2194
|
})
|
2192
|
2195
|
|
|
@@ -2404,8 +2407,10 @@ export default {
|
2404
|
2407
|
this.cal_two = two_count
|
2405
|
2408
|
this.cal_three = one_count + two_count
|
2406
|
2409
|
this.current_index = 0
|
2407
|
|
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
2408
|
|
- this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
|
2410
|
+ if(this.patientTableData.length > 0){
|
|
2411
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
2412
|
+ }
|
|
2413
|
+ // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
2409
|
2414
|
}
|
2410
|
2415
|
})
|
2411
|
2416
|
|
|
@@ -2415,6 +2420,8 @@ export default {
|
2415
|
2420
|
if (this.activeName == 'first') {
|
2416
|
2421
|
this.getPatientList()
|
2417
|
2422
|
} else if (this.activeName == 'second') {
|
|
2423
|
+ this.getMonthHISPatientList()
|
|
2424
|
+
|
2418
|
2425
|
const params = {
|
2419
|
2426
|
'record_date': this.record_date,
|
2420
|
2427
|
'patient_id': this.patientInfo.id,
|
|
@@ -4024,228 +4031,235 @@ export default {
|
4024
|
4031
|
})
|
4025
|
4032
|
},
|
4026
|
4033
|
changeRadio(id) {
|
4027
|
|
- let temp_id = id
|
4028
|
|
- this.radio = id
|
4029
|
|
- let params = {
|
4030
|
|
- 'record_date': this.record_date
|
4031
|
|
- }
|
4032
|
|
- getChargeHisPatientList(params).then(response => {
|
4033
|
|
- if (response.data.state == 0) {
|
4034
|
|
- this.$message.error(response.data.msg)
|
4035
|
|
- return false
|
4036
|
|
- } else {
|
4037
|
|
- this.patientTableData = []
|
4038
|
|
- this.all_table_data = []
|
4039
|
|
- this.hisPatientDatas = []
|
4040
|
|
-
|
4041
|
|
- let one_count = 0
|
4042
|
|
- let two_count = 0
|
4043
|
|
- let three_count = 0
|
4044
|
|
- for (let i = 0; i < response.data.data.list.length; i++) {
|
4045
|
|
- if (response.data.data.list[i].his_patient.length == 0) { //没挂号
|
4046
|
|
- if (response.data.data.list[i].prescription.length > 0) {
|
4047
|
|
- let obj = {
|
4048
|
|
- id: response.data.data.list[i].id,
|
4049
|
|
- name: response.data.data.list[i].name,
|
4050
|
|
- number: '',
|
4051
|
|
- order_status: 0,
|
4052
|
|
- order_number: '',
|
4053
|
|
- his_patient_id: 0,
|
4054
|
|
- prescription: response.data.data.list[i].prescription
|
4055
|
|
- }
|
4056
|
|
-
|
4057
|
|
- this.all_table_data.push(obj)
|
4058
|
|
- }
|
4059
|
|
-
|
4060
|
|
- } else { //挂号
|
4061
|
|
- if (response.data.data.list[i].his_patient.length == 1) {
|
4062
|
|
- if (response.data.data.list[i].his_patient[0].orders.length > 0) {
|
4063
|
|
- for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
|
4064
|
|
- let obj = {
|
4065
|
|
- id: response.data.data.list[i].id,
|
4066
|
|
- name: response.data.data.list[i].name,
|
4067
|
|
- number: response.data.data.list[i].his_patient[0].number,
|
4068
|
|
- order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
|
4069
|
|
- his_patient_id: response.data.data.list[i].his_patient[0].id,
|
4070
|
|
- order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
|
4071
|
|
- order_id: response.data.data.list[i].his_patient[0].orders[b].id,
|
4072
|
|
- prescription: response.data.data.list[i].prescription
|
4073
|
|
-
|
4074
|
|
- }
|
4075
|
|
- this.all_table_data.push(obj)
|
4076
|
|
-
|
4077
|
|
- }
|
4078
|
|
- } else {
|
|
4034
|
+ if(this.activeName == 'first') {
|
|
4035
|
+ let temp_id = id
|
|
4036
|
+ this.radio = id
|
|
4037
|
+ let params = {
|
|
4038
|
+ 'record_date': this.record_date
|
|
4039
|
+ }
|
|
4040
|
+ getChargeHisPatientList(params).then(response => {
|
|
4041
|
+ if (response.data.state == 0) {
|
|
4042
|
+ this.$message.error(response.data.msg)
|
|
4043
|
+ return false
|
|
4044
|
+ } else {
|
|
4045
|
+ this.patientTableData = []
|
|
4046
|
+ this.all_table_data = []
|
|
4047
|
+ this.hisPatientDatas = []
|
|
4048
|
+
|
|
4049
|
+ let one_count = 0
|
|
4050
|
+ let two_count = 0
|
|
4051
|
+ let three_count = 0
|
|
4052
|
+ for (let i = 0; i < response.data.data.list.length; i++) {
|
|
4053
|
+ if (response.data.data.list[i].his_patient.length == 0) { //没挂号
|
|
4054
|
+ if (response.data.data.list[i].prescription.length > 0) {
|
4079
|
4055
|
let obj = {
|
4080
|
4056
|
id: response.data.data.list[i].id,
|
4081
|
4057
|
name: response.data.data.list[i].name,
|
4082
|
|
- number: response.data.data.list[i].his_patient[0].number,
|
|
4058
|
+ number: '',
|
4083
|
4059
|
order_status: 0,
|
4084
|
|
- his_patient_id: response.data.data.list[i].his_patient[0].id,
|
4085
|
4060
|
order_number: '',
|
4086
|
|
- order_id: 0,
|
|
4061
|
+ his_patient_id: 0,
|
4087
|
4062
|
prescription: response.data.data.list[i].prescription
|
4088
|
|
-
|
4089
|
4063
|
}
|
4090
|
|
- this.all_table_data.push(obj)
|
4091
|
4064
|
|
|
4065
|
+ this.all_table_data.push(obj)
|
4092
|
4066
|
}
|
4093
|
|
- }
|
4094
|
4067
|
|
4095
|
|
- if (response.data.data.list[i].his_patient.length > 1) {
|
4096
|
|
- for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
|
4097
|
|
- if (response.data.data.list[i].his_patient[b].orders.length == 0) {
|
|
4068
|
+ } else { //挂号
|
|
4069
|
+ if (response.data.data.list[i].his_patient.length == 1) {
|
|
4070
|
+ if (response.data.data.list[i].his_patient[0].orders.length > 0) {
|
|
4071
|
+ for (let b = 0; b < response.data.data.list[i].his_patient[0].orders.length; b++) {
|
|
4072
|
+ let obj = {
|
|
4073
|
+ id: response.data.data.list[i].id,
|
|
4074
|
+ name: response.data.data.list[i].name,
|
|
4075
|
+ number: response.data.data.list[i].his_patient[0].number,
|
|
4076
|
+ order_status: response.data.data.list[i].his_patient[0].orders[b].order_status,
|
|
4077
|
+ his_patient_id: response.data.data.list[i].his_patient[0].id,
|
|
4078
|
+ order_number: response.data.data.list[i].his_patient[0].orders[b].order_number,
|
|
4079
|
+ order_id: response.data.data.list[i].his_patient[0].orders[b].id,
|
|
4080
|
+ prescription: response.data.data.list[i].prescription
|
|
4081
|
+
|
|
4082
|
+ }
|
|
4083
|
+ this.all_table_data.push(obj)
|
|
4084
|
+
|
|
4085
|
+ }
|
|
4086
|
+ } else {
|
4098
|
4087
|
let obj = {
|
4099
|
4088
|
id: response.data.data.list[i].id,
|
4100
|
4089
|
name: response.data.data.list[i].name,
|
4101
|
|
- number: response.data.data.list[i].his_patient[b].number,
|
|
4090
|
+ number: response.data.data.list[i].his_patient[0].number,
|
4102
|
4091
|
order_status: 0,
|
4103
|
|
- his_patient_id: response.data.data.list[i].his_patient[b].id,
|
|
4092
|
+ his_patient_id: response.data.data.list[i].his_patient[0].id,
|
4104
|
4093
|
order_number: '',
|
4105
|
4094
|
order_id: 0,
|
4106
|
4095
|
prescription: response.data.data.list[i].prescription
|
|
4096
|
+
|
4107
|
4097
|
}
|
4108
|
4098
|
this.all_table_data.push(obj)
|
4109
|
|
- } else {
|
4110
|
4099
|
|
4111
|
|
- for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
|
|
4100
|
+ }
|
|
4101
|
+ }
|
|
4102
|
+
|
|
4103
|
+ if (response.data.data.list[i].his_patient.length > 1) {
|
|
4104
|
+ for (let b = 0; b < response.data.data.list[i].his_patient.length; b++) {
|
|
4105
|
+ if (response.data.data.list[i].his_patient[b].orders.length == 0) {
|
4112
|
4106
|
let obj = {
|
4113
|
4107
|
id: response.data.data.list[i].id,
|
4114
|
4108
|
name: response.data.data.list[i].name,
|
4115
|
4109
|
number: response.data.data.list[i].his_patient[b].number,
|
4116
|
|
- order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
|
|
4110
|
+ order_status: 0,
|
4117
|
4111
|
his_patient_id: response.data.data.list[i].his_patient[b].id,
|
4118
|
|
- order_number: response.data.data.list[i].his_patient[b].orders[c].number,
|
4119
|
|
- order_id: response.data.data.list[i].his_patient[b].orders[c].id,
|
|
4112
|
+ order_number: '',
|
|
4113
|
+ order_id: 0,
|
4120
|
4114
|
prescription: response.data.data.list[i].prescription
|
4121
|
|
-
|
4122
|
4115
|
}
|
4123
|
4116
|
this.all_table_data.push(obj)
|
|
4117
|
+ } else {
|
|
4118
|
+
|
|
4119
|
+ for (let c = 0; c < response.data.data.list[i].his_patient[b].orders.length; c++) {
|
|
4120
|
+ let obj = {
|
|
4121
|
+ id: response.data.data.list[i].id,
|
|
4122
|
+ name: response.data.data.list[i].name,
|
|
4123
|
+ number: response.data.data.list[i].his_patient[b].number,
|
|
4124
|
+ order_status: response.data.data.list[i].his_patient[b].orders[c].order_status,
|
|
4125
|
+ his_patient_id: response.data.data.list[i].his_patient[b].id,
|
|
4126
|
+ order_number: response.data.data.list[i].his_patient[b].orders[c].number,
|
|
4127
|
+ order_id: response.data.data.list[i].his_patient[b].orders[c].id,
|
|
4128
|
+ prescription: response.data.data.list[i].prescription
|
|
4129
|
+
|
|
4130
|
+ }
|
|
4131
|
+ this.all_table_data.push(obj)
|
|
4132
|
+ }
|
|
4133
|
+
|
4124
|
4134
|
}
|
4125
|
4135
|
|
4126
|
4136
|
}
|
4127
|
|
-
|
4128
|
4137
|
}
|
4129
|
4138
|
}
|
4130
|
4139
|
}
|
4131
|
|
- }
|
4132
|
|
- for (let i = 0; i < this.all_table_data.length; i++) {
|
4133
|
|
- if (this.all_table_data[i].his_patient_id > 0) {
|
4134
|
|
- this.hisPatientDatas.push(this.all_table_data[i])
|
|
4140
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4141
|
+ if (this.all_table_data[i].his_patient_id > 0) {
|
|
4142
|
+ this.hisPatientDatas.push(this.all_table_data[i])
|
|
4143
|
+ }
|
4135
|
4144
|
}
|
4136
|
|
- }
|
4137
|
4145
|
|
4138
|
|
- let unChargePatient = []
|
4139
|
|
- for (let i = 0; i < this.all_table_data.length; i++) {
|
4140
|
|
- let isHasUnCharge = false
|
4141
|
|
- for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
|
4142
|
|
- if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
4143
|
|
- isHasUnCharge = true
|
4144
|
|
- } else {
|
4145
|
|
- if (this.all_table_data[i].his_patient_id > 0) {
|
4146
|
|
- if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
|
4147
|
|
- isHasUnCharge = true
|
|
4146
|
+ let unChargePatient = []
|
|
4147
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4148
|
+ let isHasUnCharge = false
|
|
4149
|
+ for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
|
|
4150
|
+ if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
|
4151
|
+ isHasUnCharge = true
|
|
4152
|
+ } else {
|
|
4153
|
+ if (this.all_table_data[i].his_patient_id > 0) {
|
|
4154
|
+ if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
|
|
4155
|
+ isHasUnCharge = true
|
|
4156
|
+ }
|
4148
|
4157
|
}
|
|
4158
|
+
|
4149
|
4159
|
}
|
|
4160
|
+ }
|
|
4161
|
+ if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
|
4162
|
+ isHasUnCharge = true
|
4150
|
4163
|
|
4151
|
4164
|
}
|
4152
|
|
- }
|
4153
|
|
- if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
4154
|
|
- isHasUnCharge = true
|
4155
|
4165
|
|
4156
|
|
- }
|
|
4166
|
+ if (isHasUnCharge) {
|
|
4167
|
+ unChargePatient.push(this.all_table_data[i])
|
|
4168
|
+ }
|
4157
|
4169
|
|
4158
|
|
- if (isHasUnCharge) {
|
4159
|
|
- unChargePatient.push(this.all_table_data[i])
|
4160
|
4170
|
}
|
4161
|
4171
|
|
4162
|
|
- }
|
|
4172
|
+ unChargePatient = this.unique_four(unChargePatient)
|
4163
|
4173
|
|
4164
|
|
- unChargePatient = this.unique_four(unChargePatient)
|
|
4174
|
+ one_count = one_count + unChargePatient.length
|
4165
|
4175
|
|
4166
|
|
- one_count = one_count + unChargePatient.length
|
|
4176
|
+ let ChargePatient = []
|
|
4177
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4178
|
+ if (this.all_table_data[i].order_status == 2) {
|
|
4179
|
+ ChargePatient.push(this.all_table_data[i])
|
|
4180
|
+ }
|
4167
|
4181
|
|
4168
|
|
- let ChargePatient = []
|
4169
|
|
- for (let i = 0; i < this.all_table_data.length; i++) {
|
4170
|
|
- if (this.all_table_data[i].order_status == 2) {
|
4171
|
|
- ChargePatient.push(this.all_table_data[i])
|
4172
|
4182
|
}
|
4173
|
4183
|
|
4174
|
|
- }
|
|
4184
|
+ two_count = two_count + ChargePatient.length
|
4175
|
4185
|
|
4176
|
|
- two_count = two_count + ChargePatient.length
|
4177
|
|
-
|
4178
|
|
- if (this.radio == 1) {
|
4179
|
|
- this.all_table_data = this.unique_four(this.all_table_data)
|
4180
|
|
- }
|
|
4186
|
+ if (this.radio == 1) {
|
|
4187
|
+ this.all_table_data = this.unique_four(this.all_table_data)
|
|
4188
|
+ }
|
4181
|
4189
|
|
4182
|
|
- console.log(this.all_table_data)
|
|
4190
|
+ console.log(this.all_table_data)
|
4183
|
4191
|
|
4184
|
|
- switch (this.radio) {
|
4185
|
|
- case 1:
|
4186
|
|
- this.patientTableData = []
|
4187
|
|
- for (let i = 0; i < this.all_table_data.length; i++) {
|
4188
|
|
- let isHasUnCharge = false
|
4189
|
|
- for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
|
4190
|
|
- console.log('!111111111')
|
4191
|
|
- console.log(this.all_table_data[i].order_status)
|
4192
|
|
- if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
4193
|
|
- console.log('!22222222222')
|
|
4192
|
+ switch (this.radio) {
|
|
4193
|
+ case 1:
|
|
4194
|
+ this.patientTableData = []
|
|
4195
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4196
|
+ let isHasUnCharge = false
|
|
4197
|
+ for (let b = 0; b < this.all_table_data[i].prescription.length; b++) {
|
|
4198
|
+ console.log('!111111111')
|
|
4199
|
+ console.log(this.all_table_data[i].order_status)
|
|
4200
|
+ if (this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
|
4201
|
+ console.log('!22222222222')
|
4194
|
4202
|
|
4195
|
|
- isHasUnCharge = true
|
4196
|
|
- } else {
|
4197
|
|
- if (this.all_table_data[i].his_patient_id > 0) {
|
4198
|
|
- console.log('!4444444444444')
|
|
4203
|
+ isHasUnCharge = true
|
|
4204
|
+ } else {
|
|
4205
|
+ if (this.all_table_data[i].his_patient_id > 0) {
|
|
4206
|
+ console.log('!4444444444444')
|
4199
|
4207
|
|
4200
|
|
- if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
|
4201
|
|
- isHasUnCharge = true
|
4202
|
|
- console.log('!33333333333')
|
|
4208
|
+ if (this.all_table_data[i].his_patient_id == this.all_table_data[i].prescription[0].his_patient_id) {
|
|
4209
|
+ isHasUnCharge = true
|
|
4210
|
+ console.log('!33333333333')
|
4203
|
4211
|
|
|
4212
|
+ }
|
4204
|
4213
|
}
|
|
4214
|
+
|
4205
|
4215
|
}
|
4206
|
4216
|
|
4207
|
4217
|
}
|
|
4218
|
+ if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
|
4219
|
+ console.log('11111111')
|
4208
|
4220
|
|
|
4221
|
+ isHasUnCharge = true
|
|
4222
|
+ }
|
|
4223
|
+ if (isHasUnCharge) {
|
|
4224
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
4225
|
+ }
|
4209
|
4226
|
}
|
4210
|
|
- if (this.all_table_data[i].his_patient_id > 0 && this.all_table_data[i].order_status != 2 && this.all_table_data[i].order_status != 3) {
|
4211
|
|
- console.log('11111111')
|
4212
|
|
-
|
4213
|
|
- isHasUnCharge = true
|
4214
|
|
- }
|
4215
|
|
- if (isHasUnCharge) {
|
4216
|
|
- this.patientTableData.push(this.all_table_data[i])
|
4217
|
|
- }
|
4218
|
|
- }
|
4219
|
|
- this.all_patient = this.patientTableData
|
4220
|
|
- break
|
4221
|
|
- case 2:
|
4222
|
|
- this.patientTableData = []
|
4223
|
|
- for (let i = 0; i < this.all_table_data.length; i++) {
|
4224
|
|
- if (this.all_table_data[i].order_status == 2) {
|
4225
|
|
- this.patientTableData.push(this.all_table_data[i])
|
|
4227
|
+ this.all_patient = this.patientTableData
|
|
4228
|
+ break
|
|
4229
|
+ case 2:
|
|
4230
|
+ this.patientTableData = []
|
|
4231
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4232
|
+ if (this.all_table_data[i].order_status == 2) {
|
|
4233
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
4234
|
+ }
|
4226
|
4235
|
}
|
4227
|
|
- }
|
4228
|
|
- this.all_patient = this.patientTableData
|
4229
|
|
- break
|
4230
|
|
- case 4:
|
4231
|
|
- this.patientTableData = []
|
4232
|
|
- this.patientTableData = this.all_table_data
|
4233
|
|
- this.all_patient = this.patientTableData
|
4234
|
|
- break
|
4235
|
|
- }
|
|
4236
|
+ this.all_patient = this.patientTableData
|
|
4237
|
+ break
|
|
4238
|
+ case 4:
|
|
4239
|
+ this.patientTableData = []
|
|
4240
|
+ this.patientTableData = this.all_table_data
|
|
4241
|
+ this.all_patient = this.patientTableData
|
|
4242
|
+ break
|
|
4243
|
+ }
|
4236
|
4244
|
|
4237
|
|
- this.cal_one = one_count
|
4238
|
|
- this.cal_two = two_count
|
4239
|
|
- this.cal_three = one_count + two_count
|
4240
|
|
- this.current_index = 0
|
|
4245
|
+ this.cal_one = one_count
|
|
4246
|
+ this.cal_two = two_count
|
|
4247
|
+ this.cal_three = one_count + two_count
|
|
4248
|
+ this.current_index = 0
|
4241
|
4249
|
|
4242
|
|
- this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
4243
|
|
- // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
|
4250
|
+ if(this.patientTableData.length > 0) {
|
|
4251
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
4252
|
+ }
|
|
4253
|
+ // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
4244
|
4254
|
|
4245
|
|
- }
|
|
4255
|
+ }
|
4246
|
4256
|
|
4247
|
|
- })
|
|
4257
|
+ })
|
|
4258
|
+ }else{
|
|
4259
|
+ this.radio = id
|
|
4260
|
+ this.getMonthHISPatientList()
|
4248
|
4261
|
|
|
4262
|
+ }
|
4249
|
4263
|
},
|
4250
|
4264
|
formatDecimal(num, decimal) {
|
4251
|
4265
|
num = num.toString()
|
|
@@ -4479,10 +4493,109 @@ export default {
|
4479
|
4493
|
this.cal_three = one_count + two_count
|
4480
|
4494
|
this.current_index = 0
|
4481
|
4495
|
this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
4482
|
|
- this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
|
4496
|
+ // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
|
4497
|
+ }
|
|
4498
|
+ })
|
|
4499
|
+ },
|
|
4500
|
+ getMonthHISPatientList() {
|
|
4501
|
+ let params = {
|
|
4502
|
+ 'record_date': this.record_date,
|
|
4503
|
+ 'type': this.radio
|
|
4504
|
+ }
|
|
4505
|
+ getMonthHisPatient(params).then(response => {
|
|
4506
|
+ if (response.data.state == 0) {
|
|
4507
|
+ this.$message.error(response.data.msg)
|
|
4508
|
+ return false
|
|
4509
|
+ } else {
|
|
4510
|
+ this.patientTableData = []
|
|
4511
|
+ this.all_table_data = []
|
|
4512
|
+ this.hisPatientDatas = []
|
|
4513
|
+
|
|
4514
|
+ if (response.data.data.list == null){
|
|
4515
|
+ response.data.data.list = []
|
|
4516
|
+ }
|
|
4517
|
+
|
|
4518
|
+ if (response.data.data.chargePatients == null){
|
|
4519
|
+ response.data.data.chargePatients = []
|
|
4520
|
+ }
|
|
4521
|
+ let one_count = 0
|
|
4522
|
+ let two_count = 0
|
|
4523
|
+
|
|
4524
|
+ for (let i = 0; i < response.data.data.list.length; i++) {
|
|
4525
|
+ if (response.data.data.list[i].his_patient.length > 0) {
|
|
4526
|
+ let obj = {
|
|
4527
|
+ id: response.data.data.list[i].id,
|
|
4528
|
+ name: response.data.data.list[i].name,
|
|
4529
|
+ number: response.data.data.list[i].his_patient[0].number,
|
|
4530
|
+ order_status: 0,
|
|
4531
|
+ his_patient_id: response.data.data.list[i].his_patient[0].id,
|
|
4532
|
+ order_number: '',
|
|
4533
|
+ order_id: 0,
|
|
4534
|
+ prescription: response.data.data.list[i].prescription
|
|
4535
|
+ }
|
|
4536
|
+ this.all_table_data.push(obj)
|
|
4537
|
+ }
|
|
4538
|
+
|
|
4539
|
+ }
|
|
4540
|
+
|
|
4541
|
+ let unChargePatient = []
|
|
4542
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4543
|
+ unChargePatient.push(this.all_table_data[i])
|
|
4544
|
+ }
|
|
4545
|
+ unChargePatient = this.unique_four(unChargePatient)
|
|
4546
|
+ one_count = one_count + unChargePatient.length
|
|
4547
|
+
|
|
4548
|
+ let ChargePatient = []
|
|
4549
|
+ for (let i = 0; i < response.data.data.chargePatients.length; i++) {
|
|
4550
|
+ let obj = {
|
|
4551
|
+ id: response.data.data.chargePatients[i].patient_id,
|
|
4552
|
+ name: response.data.data.chargePatients[i].patient.name,
|
|
4553
|
+ number: response.data.data.chargePatients[i].mdtrt_id,
|
|
4554
|
+ order_status: 2,
|
|
4555
|
+ his_patient_id: 0,
|
|
4556
|
+ order_number: response.data.data.chargePatients[i].number,
|
|
4557
|
+ order_id: response.data.data.chargePatients[i].id,
|
|
4558
|
+ }
|
|
4559
|
+ ChargePatient.push(obj)
|
|
4560
|
+ }
|
|
4561
|
+ two_count = two_count + ChargePatient.length
|
|
4562
|
+
|
|
4563
|
+ if (this.radio == 1) {
|
|
4564
|
+ this.all_table_data = this.unique_four(this.all_table_data)
|
|
4565
|
+ }else{
|
|
4566
|
+ this.all_table_data = ChargePatient
|
|
4567
|
+ }
|
|
4568
|
+
|
|
4569
|
+
|
|
4570
|
+ switch (this.radio) {
|
|
4571
|
+ case 1:
|
|
4572
|
+ this.patientTableData = []
|
|
4573
|
+ for (let i = 0; i < this.all_table_data.length; i++) {
|
|
4574
|
+ this.patientTableData.push(this.all_table_data[i])
|
|
4575
|
+ }
|
|
4576
|
+ this.all_patient = this.patientTableData
|
|
4577
|
+ break
|
|
4578
|
+ case 2:
|
|
4579
|
+ this.patientTableData = []
|
|
4580
|
+ for (let i = 0; i < ChargePatient.length; i++) {
|
|
4581
|
+ this.patientTableData.push(ChargePatient[i])
|
|
4582
|
+ }
|
|
4583
|
+ break
|
|
4584
|
+ }
|
|
4585
|
+ console.log("111122222")
|
|
4586
|
+ console.log(this.patientTableData)
|
|
4587
|
+
|
|
4588
|
+ this.cal_one = one_count
|
|
4589
|
+ this.cal_two = two_count
|
|
4590
|
+ this.current_index = 0
|
|
4591
|
+ if(this.patientTableData.length > 0){
|
|
4592
|
+ this.$refs.tab.setCurrentRow(this.patientTableData[0])
|
|
4593
|
+ }
|
|
4594
|
+ // this.getPatientInformation(this.patientTableData[0].id, this.patientTableData[0].order_number, this.patientTableData[0].his_patient_id, this.patientTableData[0].order_id)
|
4483
|
4595
|
}
|
4484
|
4596
|
})
|
4485
|
4597
|
},
|
|
4598
|
+
|
4486
|
4599
|
setMonthPrescription(month_prescriptions) {
|
4487
|
4600
|
let big_prescriptions = []
|
4488
|
4601
|
for (let i = 0; i < this.unique_three(month_prescriptions).length; i++) {
|
|
@@ -4818,14 +4931,17 @@ export default {
|
4818
|
4931
|
this.month_prescriptions = []
|
4819
|
4932
|
this.big_prescriptions = []
|
4820
|
4933
|
this.big_month_prescriptions = []
|
4821
|
|
-
|
4822
|
|
- this.getPatientInformation(val.id, val.order_number, val.his_patient_id, val.order_id)
|
4823
|
|
- this.patient_id = val.id
|
4824
|
|
-
|
4825
|
|
- for (let i = 0; i < this.patientTableData.length; i++) {
|
4826
|
|
- if (this.patientTableData[i].his_patient_id == val.his_patient_id) {
|
4827
|
|
- this.current_index = i
|
|
4934
|
+ if(val != null) {
|
|
4935
|
+ this.getPatientInformation(val.id, val.order_number, val.his_patient_id, val.order_id)
|
|
4936
|
+ this.patient_id = val.id
|
|
4937
|
+ for (let i = 0; i < this.patientTableData.length; i++) {
|
|
4938
|
+ if (this.patientTableData[i].his_patient_id == val.his_patient_id) {
|
|
4939
|
+ this.current_index = i
|
|
4940
|
+ }
|
4828
|
4941
|
}
|
|
4942
|
+ }else{
|
|
4943
|
+ this.loading = false
|
|
4944
|
+
|
4829
|
4945
|
}
|
4830
|
4946
|
},
|
4831
|
4947
|
// 获取患者的基本信息
|