|
@@ -3,9 +3,7 @@ package controllers
|
3
|
3
|
import (
|
4
|
4
|
"XT_New/enums"
|
5
|
5
|
"XT_New/service"
|
6
|
|
- "fmt"
|
7
|
6
|
"github.com/astaxie/beego"
|
8
|
|
- "github.com/shopspring/decimal"
|
9
|
7
|
"time"
|
10
|
8
|
)
|
11
|
9
|
|
|
@@ -94,449 +92,523 @@ func (this *HisSummaryApiController) GetGatherDetaiList() {
|
94
|
92
|
}
|
95
|
93
|
endRecordDateTime := endTime.Unix()
|
96
|
94
|
|
97
|
|
- //查询该病人这段时间的记录单号
|
98
|
|
- orderInfo, _ := service.GetGatherHisOrder(keyword, item_type, patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
99
|
|
-
|
100
|
|
- org_id := this.GetAdminUserInfo().CurrentOrgId
|
101
|
|
- appid := this.GetAdminUserInfo().CurrentAppId
|
102
|
|
- var order_info []*service.HisOrderInfo
|
103
|
|
-
|
104
|
|
- var MdtrtId string
|
105
|
|
-
|
106
|
|
- patient, _ := service.GetPatientByID(org_id, patient_id)
|
107
|
|
- for _, item := range orderInfo {
|
108
|
|
- orderinfo, _ := service.GetHisOrderDetailByNumber(item.Number, org_id)
|
109
|
|
- //number = item.Number
|
110
|
|
- MdtrtId = item.MdtrtId
|
111
|
|
- for _, it := range orderinfo {
|
112
|
|
-
|
113
|
|
- order_info = append(order_info, it)
|
114
|
|
- }
|
115
|
|
- }
|
116
|
|
- his, _ := service.GetHisPatientInfoFive(org_id, patient_id, startRecordDateTime, endRecordDateTime)
|
117
|
|
-
|
118
|
|
- record, _ := service.GetInHospitalRecordByNumber(MdtrtId)
|
119
|
|
-
|
120
|
|
- //获取所有客户
|
121
|
|
- adminInfo, _ := service.GetAllDoctorSix(org_id, appid)
|
122
|
|
-
|
123
|
|
- //获取最后一次排班
|
124
|
|
- schedule, _ := service.GetHisSchedule(patient_id, org_id, startRecordDateTime, endRecordDateTime)
|
125
|
|
- fmt.Println("scheudlwe3223333232233232232323232323232323", schedule)
|
126
|
|
- bedNumber, _ := service.GetAllBedNumberSix(org_id)
|
127
|
|
- var bedCostTotal float64 = 0 //床位总费
|
128
|
|
-
|
129
|
|
- var operationCostTotal float64 = 0 //手术费
|
130
|
|
-
|
131
|
|
- var otherCostTotal float64 = 0 //其他费用
|
132
|
|
-
|
133
|
|
- var materialCostTotal float64 = 0 //材料费
|
134
|
|
-
|
135
|
|
- var westernMedicineCostTotal float64 = 0 //西药费
|
136
|
|
-
|
137
|
|
- var chineseTraditionalMedicineCostTotal float64 = 0 //中成药
|
138
|
|
-
|
139
|
|
- var checkCostTotal float64 = 0 //检查费
|
140
|
|
-
|
141
|
|
- var laboratoryCostTotal float64 = 0 //化验费
|
142
|
|
-
|
143
|
|
- var treatCostTotal float64 = 0 //治疗费用
|
|
95
|
+ list, err := service.GetHisSummaryDetailList(keyword, item_type, patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
|
96
|
+ patient, _ := service.GetPatientByID(adminUser.CurrentOrgId, patient_id)
|
144
|
97
|
|
145
|
|
- var zhenChaCostTotal float64 = 0 //其他费用
|
|
98
|
+ his_patient, _ := service.GetHisSummaryPatientInfo(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
146
|
99
|
|
147
|
|
- decimal.DivisionPrecision = 2
|
148
|
|
- var BalanceAccountsType int64
|
149
|
|
- if his.ID > 0 {
|
150
|
|
- BalanceAccountsType = his.BalanceAccountsType
|
151
|
|
- } else {
|
152
|
|
- BalanceAccountsType = record.BalanceAccountsType
|
153
|
|
- }
|
|
100
|
+ order, _ := service.GetHisLastOrder(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
154
|
101
|
|
155
|
|
- his_patient, _ := service.GetHisSummaryPatientInfo(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
|
102
|
+ his_record_patient, _ := service.GetHisSummaryPatientInfoSix(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
156
|
103
|
|
157
|
104
|
//获取所有的科室
|
158
|
105
|
hisDepatment, _ := service.GetHisDepatment(adminUser.CurrentOrgId)
|
159
|
106
|
|
160
|
|
- //统计
|
161
|
|
- prescription, _ := service.GetHisPrescriptionTenty(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, keyword, item_type)
|
162
|
|
-
|
163
|
|
- //orderlist, _ := service.GetHisChargeOrder(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, keyword, item_type)
|
164
|
|
-
|
165
|
107
|
var medicalInsuranceLevel = "医保等级"
|
166
|
108
|
medicalInsuranceLevelParent, _ := service.GetDrugDataConfig(0, medicalInsuranceLevel)
|
167
|
109
|
medicalInsuranceLevelList, _ := service.GetParentDataConfig(medicalInsuranceLevelParent.ID, adminUser.CurrentOrgId)
|
168
|
|
- if BalanceAccountsType != 2 && BalanceAccountsType > 0 {
|
169
|
|
- for _, item := range order_info {
|
170
|
|
- if org_id == 10215 {
|
171
|
|
- if item.MedChrgitmType == "01" { //床位费
|
172
|
|
- bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
173
|
|
- }
|
174
|
|
- if item.MedChrgitmType == "02" { //诊察费
|
175
|
|
- zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
176
|
|
-
|
177
|
|
- }
|
178
|
|
- if item.MedChrgitmType == "03" { //检查费
|
179
|
|
- checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
180
|
|
-
|
181
|
|
- }
|
182
|
|
-
|
183
|
|
- if item.MedChrgitmType == "04" { //化验费
|
184
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
185
|
|
- }
|
186
|
|
-
|
187
|
|
- if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
188
|
|
- treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
189
|
|
-
|
190
|
|
- }
|
191
|
|
-
|
192
|
|
- if item.MedChrgitmType == "06" { //手术费
|
193
|
|
- operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
194
|
|
- }
|
195
|
|
-
|
196
|
|
- if item.MedChrgitmType == "08" { //材料费
|
197
|
|
- materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
198
|
|
- }
|
|
110
|
+ var drugType = "药品类型"
|
|
111
|
+ drugTypeParent, _ := service.GetDrugDataConfig(0, drugType)
|
|
112
|
+ drugTypeList, _ := service.GetParentDataConfig(drugTypeParent.ID, adminUser.CurrentOrgId)
|
|
113
|
+ var costClassify = "费用类别"
|
|
114
|
+ costClassifyParent, _ := service.GetDrugDataConfig(0, costClassify)
|
|
115
|
+ costClassifyList, _ := service.GetParentDataConfig(costClassifyParent.ID, adminUser.CurrentOrgId)
|
|
116
|
+ doctorlist, _ := service.GetAllDoctorSix(adminUser.CurrentOrgId, adminUser.CurrentAppId)
|
199
|
117
|
|
200
|
|
- if item.MedChrgitmType == "09" { //西药费
|
201
|
|
- westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
202
|
|
- }
|
203
|
|
-
|
204
|
|
- if item.MedChrgitmType == "11" { //中成费
|
205
|
|
- chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
206
|
|
- }
|
207
|
|
-
|
208
|
|
- if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
209
|
|
- otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
210
|
|
- }
|
211
|
|
-
|
212
|
|
- } else if org_id == 10188 || org_id == 10217 {
|
213
|
|
- if item.MedChrgitmType == "01" { //床位费
|
214
|
|
- bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
215
|
|
-
|
216
|
|
- }
|
217
|
|
- if item.MedChrgitmType == "02" { //诊察费
|
218
|
|
- zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
219
|
|
- }
|
220
|
|
- if item.MedChrgitmType == "03" { //检查费
|
221
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
222
|
|
- }
|
223
|
|
-
|
224
|
|
- if item.MedChrgitmType == "04" { //化验费
|
225
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
226
|
|
- }
|
227
|
|
-
|
228
|
|
- if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
229
|
|
- treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
230
|
|
- }
|
231
|
|
-
|
232
|
|
- if item.MedChrgitmType == "06" { //手术费
|
233
|
|
- operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
234
|
|
- }
|
235
|
|
-
|
236
|
|
- if item.MedChrgitmType == "08" { //材料费
|
237
|
|
- materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
238
|
|
- }
|
239
|
|
-
|
240
|
|
- if item.MedChrgitmType == "09" { //西药费
|
241
|
|
- westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
242
|
|
- }
|
243
|
|
-
|
244
|
|
- if item.MedChrgitmType == "11" { //中成费
|
245
|
|
- chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
246
|
|
- }
|
247
|
|
-
|
248
|
|
- if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
249
|
|
- otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
250
|
|
- }
|
251
|
|
-
|
252
|
|
- } else {
|
253
|
|
-
|
254
|
|
- if item.MedChrgitmType == "01" { //床位费
|
255
|
|
- bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
256
|
|
-
|
257
|
|
- }
|
258
|
|
-
|
259
|
|
- if item.MedChrgitmType == "03" { //检查费
|
260
|
|
- checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
261
|
|
- }
|
262
|
|
-
|
263
|
|
- if item.MedChrgitmType == "04" { //化验费
|
264
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
265
|
|
-
|
266
|
|
- }
|
267
|
|
-
|
268
|
|
- if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
269
|
|
- treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
270
|
|
- }
|
271
|
|
-
|
272
|
|
- if item.MedChrgitmType == "06" { //手术费
|
273
|
|
- operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
274
|
|
- }
|
275
|
|
-
|
276
|
|
- if item.MedChrgitmType == "08" { //材料费
|
277
|
|
- materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
278
|
|
- }
|
279
|
|
-
|
280
|
|
- if item.MedChrgitmType == "09" { //西药费
|
281
|
|
- westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
282
|
|
- }
|
283
|
|
-
|
284
|
|
- if item.MedChrgitmType == "11" { //中成费
|
285
|
|
- chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
286
|
|
- }
|
287
|
|
-
|
288
|
|
- if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
|
289
|
|
- otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
290
|
|
-
|
291
|
|
- }
|
|
118
|
+ //获取最后一次排班
|
|
119
|
+ schedule, _ := service.GetHisSchedule(patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
|
120
|
+ bedNumber, _ := service.GetAllBedNumberSix(adminUser.CurrentOrgId)
|
|
121
|
+ orderInfo, _ := service.GetHisLastOrder(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
292
|
122
|
|
293
|
|
- }
|
294
|
|
- }
|
|
123
|
+ if err == nil {
|
295
|
124
|
this.ServeSuccessJSON(map[string]interface{}{
|
296
|
|
- "order": orderInfo,
|
297
|
|
- "order_info": order_info,
|
298
|
|
- "patient": patient,
|
299
|
|
- "admin_info": adminInfo,
|
300
|
|
- "his_hospital": record,
|
301
|
|
- "bedCostTotal": bedCostTotal,
|
302
|
|
- "operationCostTotal": operationCostTotal,
|
303
|
|
- "otherCostTotal": otherCostTotal,
|
304
|
|
- "materialCostTotal": materialCostTotal,
|
305
|
|
- "westernMedicineCostTotal": westernMedicineCostTotal,
|
306
|
|
- "chineseTraditionalMedicineCostTotal": chineseTraditionalMedicineCostTotal,
|
307
|
|
- "checkCostTotal": checkCostTotal,
|
308
|
|
- "zhenChaCostTotal": zhenChaCostTotal,
|
309
|
|
- "laboratoryCostTotal": laboratoryCostTotal,
|
310
|
|
- "treatCostTotal": treatCostTotal,
|
311
|
|
- "his_patient": his_patient,
|
312
|
|
- "hisDepatment": hisDepatment,
|
313
|
|
- "prescription": prescription,
|
314
|
|
- "schedule": schedule,
|
315
|
|
- "bedNumber": bedNumber,
|
|
125
|
+ "list": list,
|
|
126
|
+ "patient": patient,
|
|
127
|
+ "his_patient": his_patient,
|
|
128
|
+ "hisDepatment": hisDepatment,
|
|
129
|
+ "order": order,
|
|
130
|
+ "his_record_patient": his_record_patient,
|
|
131
|
+ "medicalInsuranceLevelList": medicalInsuranceLevelList,
|
|
132
|
+ "drugTypeList": drugTypeList,
|
|
133
|
+ "costClassifyList": costClassifyList,
|
|
134
|
+ "doctorlist": doctorlist,
|
|
135
|
+ "schedule": schedule,
|
|
136
|
+ "bedNumber": bedNumber,
|
|
137
|
+ "orderInfo": orderInfo,
|
316
|
138
|
})
|
|
139
|
+ return
|
317
|
140
|
} else {
|
318
|
|
- for _, item := range order_info {
|
319
|
|
-
|
320
|
|
- item.FulamtOwnpayAmt = item.DetItemFeeSumamt
|
321
|
|
- if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
|
322
|
|
- item.MedChrgitmType = "09"
|
323
|
|
- }
|
324
|
|
- if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
|
325
|
|
- if item.HisPrescriptionProject.Type == 2 {
|
326
|
|
- if this.GetAdminUserInfo().CurrentOrgId == 10215 {
|
327
|
|
- switch item.HisPrescriptionProject.VMHisProject.CostClassify {
|
328
|
|
- case 0:
|
329
|
|
- item.MedChrgitmType = "0"
|
330
|
|
- break
|
331
|
|
- case 1:
|
332
|
|
- item.MedChrgitmType = "14"
|
333
|
|
- break
|
334
|
|
- case 2:
|
335
|
|
- item.MedChrgitmType = "05"
|
336
|
|
-
|
337
|
|
- break
|
338
|
|
- case 3:
|
339
|
|
- item.MedChrgitmType = "03"
|
340
|
|
-
|
341
|
|
- break
|
342
|
|
- case 4:
|
343
|
|
- item.MedChrgitmType = "03"
|
344
|
|
-
|
345
|
|
- break
|
346
|
|
- case 5:
|
347
|
|
- item.MedChrgitmType = "08"
|
348
|
|
-
|
349
|
|
- break
|
350
|
|
- case 6:
|
351
|
|
- item.MedChrgitmType = "14"
|
352
|
|
-
|
353
|
|
- break
|
354
|
|
- case 7:
|
355
|
|
- item.MedChrgitmType = "14"
|
356
|
|
-
|
357
|
|
- break
|
358
|
|
- case 8:
|
359
|
|
- item.MedChrgitmType = "03"
|
360
|
|
- break
|
361
|
|
- case 9:
|
362
|
|
- item.MedChrgitmType = "14"
|
363
|
|
- break
|
364
|
|
- case 10:
|
365
|
|
- item.MedChrgitmType = "14"
|
366
|
|
- break
|
367
|
|
- case 11:
|
368
|
|
- item.MedChrgitmType = "06"
|
369
|
|
- break
|
370
|
|
- case 12:
|
371
|
|
- item.MedChrgitmType = "12"
|
372
|
|
- break
|
373
|
|
- case 13:
|
374
|
|
- item.MedChrgitmType = "01"
|
375
|
|
- break
|
376
|
|
- case 14:
|
377
|
|
- item.MedChrgitmType = "04"
|
378
|
|
- break
|
379
|
|
- case 15:
|
380
|
|
- item.MedChrgitmType = "14"
|
381
|
|
- break
|
382
|
|
-
|
383
|
|
- }
|
384
|
|
-
|
385
|
|
- } else {
|
386
|
|
- switch item.HisPrescriptionProject.VMHisProject.CostClassify {
|
387
|
|
-
|
388
|
|
- case 1:
|
389
|
|
- item.MedChrgitmType = "14"
|
390
|
|
- break
|
391
|
|
- case 2:
|
392
|
|
- item.MedChrgitmType = "05"
|
393
|
|
-
|
394
|
|
- break
|
395
|
|
- case 3:
|
396
|
|
- item.MedChrgitmType = "04"
|
397
|
|
-
|
398
|
|
- break
|
399
|
|
- case 4:
|
400
|
|
- item.MedChrgitmType = "14"
|
401
|
|
-
|
402
|
|
- break
|
403
|
|
- case 5:
|
404
|
|
- item.MedChrgitmType = "08"
|
405
|
|
-
|
406
|
|
- break
|
407
|
|
- case 6:
|
408
|
|
- item.MedChrgitmType = "14"
|
409
|
|
-
|
410
|
|
- break
|
411
|
|
- case 7:
|
412
|
|
- item.MedChrgitmType = "14"
|
413
|
|
-
|
414
|
|
- break
|
415
|
|
- case 8:
|
416
|
|
- item.MedChrgitmType = "03"
|
417
|
|
- break
|
418
|
|
- case 9:
|
419
|
|
- item.MedChrgitmType = "14"
|
420
|
|
- break
|
421
|
|
- }
|
422
|
|
- }
|
423
|
|
- } else if item.HisPrescriptionProject.Type == 3 {
|
424
|
|
- item.MedChrgitmType = "08"
|
425
|
|
- }
|
426
|
|
- }
|
427
|
|
- }
|
428
|
|
-
|
429
|
|
- for _, item := range order_info {
|
430
|
|
- if org_id == 10215 {
|
431
|
|
- if item.MedChrgitmType == "01" { //床位费
|
432
|
|
- bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
433
|
|
- }
|
434
|
|
- if item.MedChrgitmType == "02" { //诊察费
|
435
|
|
- zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
436
|
|
- }
|
437
|
|
-
|
438
|
|
- if item.MedChrgitmType == "03" { //检查费
|
439
|
|
- checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
440
|
|
- }
|
441
|
|
-
|
442
|
|
- if item.MedChrgitmType == "04" { //化验费
|
443
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
444
|
|
- }
|
445
|
|
-
|
446
|
|
- if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
447
|
|
- treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
448
|
|
- }
|
449
|
|
-
|
450
|
|
- if item.MedChrgitmType == "06" { //手术费
|
451
|
|
- operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
452
|
|
- }
|
453
|
|
-
|
454
|
|
- if item.MedChrgitmType == "08" { //材料费
|
455
|
|
- materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
456
|
|
- }
|
457
|
|
-
|
458
|
|
- if item.MedChrgitmType == "09" { //西药费
|
459
|
|
- westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
460
|
|
- }
|
461
|
|
-
|
462
|
|
- if item.MedChrgitmType == "11" { //中成费
|
463
|
|
- chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
464
|
|
- }
|
465
|
|
-
|
466
|
|
- if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
467
|
|
- otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
468
|
|
- }
|
469
|
|
-
|
470
|
|
- } else {
|
471
|
|
-
|
472
|
|
- if item.MedChrgitmType == "01" { //床位费
|
473
|
|
- bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
474
|
|
- }
|
475
|
|
-
|
476
|
|
- if item.MedChrgitmType == "03" { //检查费
|
477
|
|
- checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
478
|
|
- }
|
479
|
|
-
|
480
|
|
- if item.MedChrgitmType == "04" { //化验费
|
481
|
|
- laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
482
|
|
- }
|
483
|
|
-
|
484
|
|
- if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
485
|
|
- treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
486
|
|
- }
|
487
|
|
-
|
488
|
|
- if item.MedChrgitmType == "06" { //手术费
|
489
|
|
- operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
490
|
|
- }
|
491
|
|
-
|
492
|
|
- if item.MedChrgitmType == "08" { //材料费
|
493
|
|
- materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
494
|
|
- }
|
495
|
|
-
|
496
|
|
- if item.MedChrgitmType == "09" { //西药费
|
497
|
|
- westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
498
|
|
- }
|
499
|
|
-
|
500
|
|
- if item.MedChrgitmType == "11" { //中成费
|
501
|
|
- chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
502
|
|
- }
|
503
|
|
-
|
504
|
|
- if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
|
505
|
|
- otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
506
|
|
- }
|
507
|
|
-
|
508
|
|
- }
|
509
|
|
-
|
510
|
|
- }
|
511
|
|
-
|
512
|
|
- this.ServeSuccessJSON(map[string]interface{}{
|
513
|
|
- "order": orderInfo,
|
514
|
|
- "order_info": order_info,
|
515
|
|
- "patient": patient,
|
516
|
|
- "admin_info": adminInfo,
|
517
|
|
- "his_hospital": record,
|
518
|
|
- "bedCostTotal": bedCostTotal,
|
519
|
|
- "operationCostTotal": operationCostTotal,
|
520
|
|
- "otherCostTotal": otherCostTotal,
|
521
|
|
- "materialCostTotal": materialCostTotal,
|
522
|
|
- "westernMedicineCostTotal": westernMedicineCostTotal,
|
523
|
|
- "chineseTraditionalMedicineCostTotal": chineseTraditionalMedicineCostTotal,
|
524
|
|
- "checkCostTotal": checkCostTotal,
|
525
|
|
- "zhenChaCostTotal": zhenChaCostTotal,
|
526
|
|
- "laboratoryCostTotal": laboratoryCostTotal,
|
527
|
|
- "treatCostTotal": treatCostTotal,
|
528
|
|
- "his_patient": his_patient,
|
529
|
|
- "hisDepatment": hisDepatment,
|
530
|
|
- "prescription": prescription,
|
531
|
|
- "balanceAccountsType": BalanceAccountsType,
|
532
|
|
- "medicalInsuranceLevelList": medicalInsuranceLevelList,
|
533
|
|
- "schedule": schedule,
|
534
|
|
- "bedNumber": bedNumber,
|
535
|
|
- })
|
|
141
|
+ this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
142
|
+ return
|
536
|
143
|
|
537
|
144
|
}
|
538
|
145
|
}
|
539
|
146
|
|
|
147
|
+//func (this *HisSummaryApiController) GetGatherDetaiList() {
|
|
148
|
+//
|
|
149
|
+// start_time := this.GetString("start_time")
|
|
150
|
+// end_time := this.GetString("end_time")
|
|
151
|
+// keyword := this.GetString("keyword")
|
|
152
|
+// item_type, _ := this.GetInt64("type")
|
|
153
|
+// patient_id, _ := this.GetInt64("patient_id")
|
|
154
|
+// adminUser := this.GetAdminUserInfo()
|
|
155
|
+//
|
|
156
|
+// timeLayout := "2006-01-02"
|
|
157
|
+// loc, _ := time.LoadLocation("Local")
|
|
158
|
+// startTime, err := time.ParseInLocation(timeLayout+" 15:04:05", start_time+" 00:00:00", loc)
|
|
159
|
+// if err != nil {
|
|
160
|
+//
|
|
161
|
+// }
|
|
162
|
+// startRecordDateTime := startTime.Unix()
|
|
163
|
+//
|
|
164
|
+// endTime, err := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
|
|
165
|
+// if err != nil {
|
|
166
|
+//
|
|
167
|
+// }
|
|
168
|
+// endRecordDateTime := endTime.Unix()
|
|
169
|
+//
|
|
170
|
+// //查询该病人这段时间的记录单号
|
|
171
|
+// orderInfo, _ := service.GetGatherHisOrder(keyword, item_type, patient_id, adminUser.CurrentOrgId, startRecordDateTime, endRecordDateTime)
|
|
172
|
+//
|
|
173
|
+// org_id := this.GetAdminUserInfo().CurrentOrgId
|
|
174
|
+// appid := this.GetAdminUserInfo().CurrentAppId
|
|
175
|
+// var order_info []*service.HisOrderInfo
|
|
176
|
+//
|
|
177
|
+// var MdtrtId string
|
|
178
|
+//
|
|
179
|
+// patient, _ := service.GetPatientByID(org_id, patient_id)
|
|
180
|
+// for _, item := range orderInfo {
|
|
181
|
+// orderinfo, _ := service.GetHisOrderDetailByNumber(item.Number, org_id)
|
|
182
|
+// MdtrtId = item.MdtrtId
|
|
183
|
+// for _, it := range orderinfo {
|
|
184
|
+//
|
|
185
|
+// order_info = append(order_info, it)
|
|
186
|
+// }
|
|
187
|
+// }
|
|
188
|
+// his, _ := service.GetHisPatientInfoFive(org_id, patient_id, startRecordDateTime, endRecordDateTime)
|
|
189
|
+//
|
|
190
|
+// record, _ := service.GetInHospitalRecordByNumber(MdtrtId)
|
|
191
|
+//
|
|
192
|
+// //获取所有客户
|
|
193
|
+// adminInfo, _ := service.GetAllDoctorSix(org_id, appid)
|
|
194
|
+//
|
|
195
|
+// //获取最后一次排班
|
|
196
|
+// schedule, _ := service.GetHisSchedule(patient_id, org_id, startRecordDateTime, endRecordDateTime)
|
|
197
|
+//
|
|
198
|
+// bedNumber, _ := service.GetAllBedNumberSix(org_id)
|
|
199
|
+// var bedCostTotal float64 = 0 //床位总费
|
|
200
|
+//
|
|
201
|
+// var operationCostTotal float64 = 0 //手术费
|
|
202
|
+//
|
|
203
|
+// var otherCostTotal float64 = 0 //其他费用
|
|
204
|
+//
|
|
205
|
+// var materialCostTotal float64 = 0 //材料费
|
|
206
|
+//
|
|
207
|
+// var westernMedicineCostTotal float64 = 0 //西药费
|
|
208
|
+//
|
|
209
|
+// var chineseTraditionalMedicineCostTotal float64 = 0 //中成药
|
|
210
|
+//
|
|
211
|
+// var checkCostTotal float64 = 0 //检查费
|
|
212
|
+//
|
|
213
|
+// var laboratoryCostTotal float64 = 0 //化验费
|
|
214
|
+//
|
|
215
|
+// var treatCostTotal float64 = 0 //治疗费用
|
|
216
|
+//
|
|
217
|
+// var zhenChaCostTotal float64 = 0 //其他费用
|
|
218
|
+//
|
|
219
|
+// decimal.DivisionPrecision = 2
|
|
220
|
+// var BalanceAccountsType int64
|
|
221
|
+// if his.ID > 0 {
|
|
222
|
+// BalanceAccountsType = his.BalanceAccountsType
|
|
223
|
+// } else {
|
|
224
|
+// BalanceAccountsType = record.BalanceAccountsType
|
|
225
|
+// }
|
|
226
|
+//
|
|
227
|
+// his_patient, _ := service.GetHisSummaryPatientInfo(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime)
|
|
228
|
+//
|
|
229
|
+// //获取所有的科室
|
|
230
|
+// hisDepatment, _ := service.GetHisDepatment(adminUser.CurrentOrgId)
|
|
231
|
+//
|
|
232
|
+// //统计
|
|
233
|
+// prescription, _ := service.GetHisPrescriptionTenty(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, keyword, item_type)
|
|
234
|
+//
|
|
235
|
+// //orderlist, _ := service.GetHisChargeOrder(adminUser.CurrentOrgId, patient_id, startRecordDateTime, endRecordDateTime, keyword, item_type)
|
|
236
|
+//
|
|
237
|
+// var medicalInsuranceLevel = "医保等级"
|
|
238
|
+// medicalInsuranceLevelParent, _ := service.GetDrugDataConfig(0, medicalInsuranceLevel)
|
|
239
|
+// medicalInsuranceLevelList, _ := service.GetParentDataConfig(medicalInsuranceLevelParent.ID, adminUser.CurrentOrgId)
|
|
240
|
+// if BalanceAccountsType != 2 && BalanceAccountsType > 0 {
|
|
241
|
+// for _, item := range order_info {
|
|
242
|
+// if org_id == 10215 {
|
|
243
|
+// if item.MedChrgitmType == "01" { //床位费
|
|
244
|
+// bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
245
|
+// }
|
|
246
|
+// if item.MedChrgitmType == "02" { //诊察费
|
|
247
|
+// zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
248
|
+//
|
|
249
|
+// }
|
|
250
|
+// if item.MedChrgitmType == "03" { //检查费
|
|
251
|
+// checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
252
|
+//
|
|
253
|
+// }
|
|
254
|
+//
|
|
255
|
+// if item.MedChrgitmType == "04" { //化验费
|
|
256
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
257
|
+// }
|
|
258
|
+//
|
|
259
|
+// if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
|
260
|
+// treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
261
|
+//
|
|
262
|
+// }
|
|
263
|
+//
|
|
264
|
+// if item.MedChrgitmType == "06" { //手术费
|
|
265
|
+// operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
266
|
+// }
|
|
267
|
+//
|
|
268
|
+// if item.MedChrgitmType == "08" { //材料费
|
|
269
|
+// materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
270
|
+// }
|
|
271
|
+//
|
|
272
|
+// if item.MedChrgitmType == "09" { //西药费
|
|
273
|
+// westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
274
|
+// }
|
|
275
|
+//
|
|
276
|
+// if item.MedChrgitmType == "11" { //中成费
|
|
277
|
+// chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
278
|
+// }
|
|
279
|
+//
|
|
280
|
+// if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
|
281
|
+// otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
282
|
+// }
|
|
283
|
+//
|
|
284
|
+// } else if org_id == 10188 || org_id == 10217 {
|
|
285
|
+// if item.MedChrgitmType == "01" { //床位费
|
|
286
|
+// bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
287
|
+//
|
|
288
|
+// }
|
|
289
|
+// if item.MedChrgitmType == "02" { //诊察费
|
|
290
|
+// zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
291
|
+// }
|
|
292
|
+// if item.MedChrgitmType == "03" { //检查费
|
|
293
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
294
|
+// }
|
|
295
|
+//
|
|
296
|
+// if item.MedChrgitmType == "04" { //化验费
|
|
297
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
298
|
+// }
|
|
299
|
+//
|
|
300
|
+// if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
|
301
|
+// treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
302
|
+// }
|
|
303
|
+//
|
|
304
|
+// if item.MedChrgitmType == "06" { //手术费
|
|
305
|
+// operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
306
|
+// }
|
|
307
|
+//
|
|
308
|
+// if item.MedChrgitmType == "08" { //材料费
|
|
309
|
+// materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
310
|
+// }
|
|
311
|
+//
|
|
312
|
+// if item.MedChrgitmType == "09" { //西药费
|
|
313
|
+// westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
314
|
+// }
|
|
315
|
+//
|
|
316
|
+// if item.MedChrgitmType == "11" { //中成费
|
|
317
|
+// chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
318
|
+// }
|
|
319
|
+//
|
|
320
|
+// if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
|
321
|
+// otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
322
|
+// }
|
|
323
|
+//
|
|
324
|
+// } else {
|
|
325
|
+//
|
|
326
|
+// if item.MedChrgitmType == "01" { //床位费
|
|
327
|
+// bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
328
|
+//
|
|
329
|
+// }
|
|
330
|
+//
|
|
331
|
+// if item.MedChrgitmType == "03" { //检查费
|
|
332
|
+// checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
333
|
+// }
|
|
334
|
+//
|
|
335
|
+// if item.MedChrgitmType == "04" { //化验费
|
|
336
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
337
|
+//
|
|
338
|
+// }
|
|
339
|
+//
|
|
340
|
+// if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
|
341
|
+// treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
342
|
+// }
|
|
343
|
+//
|
|
344
|
+// if item.MedChrgitmType == "06" { //手术费
|
|
345
|
+// operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
346
|
+// }
|
|
347
|
+//
|
|
348
|
+// if item.MedChrgitmType == "08" { //材料费
|
|
349
|
+// materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
350
|
+// }
|
|
351
|
+//
|
|
352
|
+// if item.MedChrgitmType == "09" { //西药费
|
|
353
|
+// westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
354
|
+// }
|
|
355
|
+//
|
|
356
|
+// if item.MedChrgitmType == "11" { //中成费
|
|
357
|
+// chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
358
|
+// }
|
|
359
|
+//
|
|
360
|
+// if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
|
|
361
|
+// otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
362
|
+//
|
|
363
|
+// }
|
|
364
|
+//
|
|
365
|
+// }
|
|
366
|
+// }
|
|
367
|
+// this.ServeSuccessJSON(map[string]interface{}{
|
|
368
|
+// "order": orderInfo,
|
|
369
|
+// "order_info": order_info,
|
|
370
|
+// "patient": patient,
|
|
371
|
+// "admin_info": adminInfo,
|
|
372
|
+// "his_hospital": record,
|
|
373
|
+// "bedCostTotal": bedCostTotal,
|
|
374
|
+// "operationCostTotal": operationCostTotal,
|
|
375
|
+// "otherCostTotal": otherCostTotal,
|
|
376
|
+// "materialCostTotal": materialCostTotal,
|
|
377
|
+// "westernMedicineCostTotal": westernMedicineCostTotal,
|
|
378
|
+// "chineseTraditionalMedicineCostTotal": chineseTraditionalMedicineCostTotal,
|
|
379
|
+// "checkCostTotal": checkCostTotal,
|
|
380
|
+// "zhenChaCostTotal": zhenChaCostTotal,
|
|
381
|
+// "laboratoryCostTotal": laboratoryCostTotal,
|
|
382
|
+// "treatCostTotal": treatCostTotal,
|
|
383
|
+// "his_patient": his_patient,
|
|
384
|
+// "hisDepatment": hisDepatment,
|
|
385
|
+// "prescription": prescription,
|
|
386
|
+// "schedule": schedule,
|
|
387
|
+// "bedNumber": bedNumber,
|
|
388
|
+// })
|
|
389
|
+// } else {
|
|
390
|
+// for _, item := range order_info {
|
|
391
|
+//
|
|
392
|
+// item.FulamtOwnpayAmt = item.DetItemFeeSumamt
|
|
393
|
+// if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
|
|
394
|
+// item.MedChrgitmType = "09"
|
|
395
|
+// }
|
|
396
|
+// if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
|
|
397
|
+// if item.HisPrescriptionProject.Type == 2 {
|
|
398
|
+// if this.GetAdminUserInfo().CurrentOrgId == 10215 {
|
|
399
|
+// switch item.HisPrescriptionProject.VMHisProject.CostClassify {
|
|
400
|
+// case 0:
|
|
401
|
+// item.MedChrgitmType = "0"
|
|
402
|
+// break
|
|
403
|
+// case 1:
|
|
404
|
+// item.MedChrgitmType = "14"
|
|
405
|
+// break
|
|
406
|
+// case 2:
|
|
407
|
+// item.MedChrgitmType = "05"
|
|
408
|
+//
|
|
409
|
+// break
|
|
410
|
+// case 3:
|
|
411
|
+// item.MedChrgitmType = "03"
|
|
412
|
+//
|
|
413
|
+// break
|
|
414
|
+// case 4:
|
|
415
|
+// item.MedChrgitmType = "03"
|
|
416
|
+//
|
|
417
|
+// break
|
|
418
|
+// case 5:
|
|
419
|
+// item.MedChrgitmType = "08"
|
|
420
|
+//
|
|
421
|
+// break
|
|
422
|
+// case 6:
|
|
423
|
+// item.MedChrgitmType = "14"
|
|
424
|
+//
|
|
425
|
+// break
|
|
426
|
+// case 7:
|
|
427
|
+// item.MedChrgitmType = "14"
|
|
428
|
+//
|
|
429
|
+// break
|
|
430
|
+// case 8:
|
|
431
|
+// item.MedChrgitmType = "03"
|
|
432
|
+// break
|
|
433
|
+// case 9:
|
|
434
|
+// item.MedChrgitmType = "14"
|
|
435
|
+// break
|
|
436
|
+// case 10:
|
|
437
|
+// item.MedChrgitmType = "14"
|
|
438
|
+// break
|
|
439
|
+// case 11:
|
|
440
|
+// item.MedChrgitmType = "06"
|
|
441
|
+// break
|
|
442
|
+// case 12:
|
|
443
|
+// item.MedChrgitmType = "12"
|
|
444
|
+// break
|
|
445
|
+// case 13:
|
|
446
|
+// item.MedChrgitmType = "01"
|
|
447
|
+// break
|
|
448
|
+// case 14:
|
|
449
|
+// item.MedChrgitmType = "04"
|
|
450
|
+// break
|
|
451
|
+// case 15:
|
|
452
|
+// item.MedChrgitmType = "14"
|
|
453
|
+// break
|
|
454
|
+//
|
|
455
|
+// }
|
|
456
|
+//
|
|
457
|
+// } else {
|
|
458
|
+// switch item.HisPrescriptionProject.VMHisProject.CostClassify {
|
|
459
|
+//
|
|
460
|
+// case 1:
|
|
461
|
+// item.MedChrgitmType = "14"
|
|
462
|
+// break
|
|
463
|
+// case 2:
|
|
464
|
+// item.MedChrgitmType = "05"
|
|
465
|
+//
|
|
466
|
+// break
|
|
467
|
+// case 3:
|
|
468
|
+// item.MedChrgitmType = "04"
|
|
469
|
+//
|
|
470
|
+// break
|
|
471
|
+// case 4:
|
|
472
|
+// item.MedChrgitmType = "14"
|
|
473
|
+//
|
|
474
|
+// break
|
|
475
|
+// case 5:
|
|
476
|
+// item.MedChrgitmType = "08"
|
|
477
|
+//
|
|
478
|
+// break
|
|
479
|
+// case 6:
|
|
480
|
+// item.MedChrgitmType = "14"
|
|
481
|
+//
|
|
482
|
+// break
|
|
483
|
+// case 7:
|
|
484
|
+// item.MedChrgitmType = "14"
|
|
485
|
+//
|
|
486
|
+// break
|
|
487
|
+// case 8:
|
|
488
|
+// item.MedChrgitmType = "03"
|
|
489
|
+// break
|
|
490
|
+// case 9:
|
|
491
|
+// item.MedChrgitmType = "14"
|
|
492
|
+// break
|
|
493
|
+// }
|
|
494
|
+// }
|
|
495
|
+// } else if item.HisPrescriptionProject.Type == 3 {
|
|
496
|
+// item.MedChrgitmType = "08"
|
|
497
|
+// }
|
|
498
|
+// }
|
|
499
|
+// }
|
|
500
|
+//
|
|
501
|
+// for _, item := range order_info {
|
|
502
|
+// if org_id == 10215 {
|
|
503
|
+// if item.MedChrgitmType == "01" { //床位费
|
|
504
|
+// bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
505
|
+// }
|
|
506
|
+// if item.MedChrgitmType == "02" { //诊察费
|
|
507
|
+// zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
508
|
+// }
|
|
509
|
+//
|
|
510
|
+// if item.MedChrgitmType == "03" { //检查费
|
|
511
|
+// checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
512
|
+// }
|
|
513
|
+//
|
|
514
|
+// if item.MedChrgitmType == "04" { //化验费
|
|
515
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
516
|
+// }
|
|
517
|
+//
|
|
518
|
+// if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
|
519
|
+// treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
520
|
+// }
|
|
521
|
+//
|
|
522
|
+// if item.MedChrgitmType == "06" { //手术费
|
|
523
|
+// operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
524
|
+// }
|
|
525
|
+//
|
|
526
|
+// if item.MedChrgitmType == "08" { //材料费
|
|
527
|
+// materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
528
|
+// }
|
|
529
|
+//
|
|
530
|
+// if item.MedChrgitmType == "09" { //西药费
|
|
531
|
+// westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
532
|
+// }
|
|
533
|
+//
|
|
534
|
+// if item.MedChrgitmType == "11" { //中成费
|
|
535
|
+// chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
536
|
+// }
|
|
537
|
+//
|
|
538
|
+// if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
|
|
539
|
+// otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
540
|
+// }
|
|
541
|
+//
|
|
542
|
+// } else {
|
|
543
|
+//
|
|
544
|
+// if item.MedChrgitmType == "01" { //床位费
|
|
545
|
+// bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
546
|
+// }
|
|
547
|
+//
|
|
548
|
+// if item.MedChrgitmType == "03" { //检查费
|
|
549
|
+// checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
550
|
+// }
|
|
551
|
+//
|
|
552
|
+// if item.MedChrgitmType == "04" { //化验费
|
|
553
|
+// laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
554
|
+// }
|
|
555
|
+//
|
|
556
|
+// if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
|
|
557
|
+// treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
558
|
+// }
|
|
559
|
+//
|
|
560
|
+// if item.MedChrgitmType == "06" { //手术费
|
|
561
|
+// operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
562
|
+// }
|
|
563
|
+//
|
|
564
|
+// if item.MedChrgitmType == "08" { //材料费
|
|
565
|
+// materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
566
|
+// }
|
|
567
|
+//
|
|
568
|
+// if item.MedChrgitmType == "09" { //西药费
|
|
569
|
+// westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
570
|
+// }
|
|
571
|
+//
|
|
572
|
+// if item.MedChrgitmType == "11" { //中成费
|
|
573
|
+// chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
574
|
+// }
|
|
575
|
+//
|
|
576
|
+// if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
|
|
577
|
+// otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
|
|
578
|
+// }
|
|
579
|
+//
|
|
580
|
+// }
|
|
581
|
+//
|
|
582
|
+// }
|
|
583
|
+//
|
|
584
|
+// this.ServeSuccessJSON(map[string]interface{}{
|
|
585
|
+// "order": orderInfo,
|
|
586
|
+// "order_info": order_info,
|
|
587
|
+// "patient": patient,
|
|
588
|
+// "admin_info": adminInfo,
|
|
589
|
+// "his_hospital": record,
|
|
590
|
+// "bedCostTotal": bedCostTotal,
|
|
591
|
+// "operationCostTotal": operationCostTotal,
|
|
592
|
+// "otherCostTotal": otherCostTotal,
|
|
593
|
+// "materialCostTotal": materialCostTotal,
|
|
594
|
+// "westernMedicineCostTotal": westernMedicineCostTotal,
|
|
595
|
+// "chineseTraditionalMedicineCostTotal": chineseTraditionalMedicineCostTotal,
|
|
596
|
+// "checkCostTotal": checkCostTotal,
|
|
597
|
+// "zhenChaCostTotal": zhenChaCostTotal,
|
|
598
|
+// "laboratoryCostTotal": laboratoryCostTotal,
|
|
599
|
+// "treatCostTotal": treatCostTotal,
|
|
600
|
+// "his_patient": his_patient,
|
|
601
|
+// "hisDepatment": hisDepatment,
|
|
602
|
+// "prescription": prescription,
|
|
603
|
+// "balanceAccountsType": BalanceAccountsType,
|
|
604
|
+// "medicalInsuranceLevelList": medicalInsuranceLevelList,
|
|
605
|
+// "schedule": schedule,
|
|
606
|
+// "bedNumber": bedNumber,
|
|
607
|
+// })
|
|
608
|
+//
|
|
609
|
+// }
|
|
610
|
+//}
|
|
611
|
+
|
540
|
612
|
func (this *HisSummaryApiController) GetDetailPatients() {
|
541
|
613
|
|
542
|
614
|
keyword := this.GetString("keyword")
|