|
@@ -40,8 +40,8 @@ type ResultQuery struct {
|
40
|
40
|
Result []struct {
|
41
|
41
|
Type string `json:"type"`
|
42
|
42
|
Name string `json:"name"`
|
43
|
|
- Vaa01 int `json:"vaa01"`
|
44
|
|
- Vaa07 int `json:"vaa07"`
|
|
43
|
+ Vaa01 int64 `json:"vaa01"`
|
|
44
|
+ Vaa07 int64 `json:"vaa07"`
|
45
|
45
|
Visittime string `json:"visittime"`
|
46
|
46
|
} `json:"result"`
|
47
|
47
|
Code string `json:"code"`
|
|
@@ -226,8 +226,9 @@ func (c *CoordinateController) SettleAccount() {
|
226
|
226
|
info.Diag = append(info.Diag, &diag)
|
227
|
227
|
}
|
228
|
228
|
var presInfos []*models.PresInfo
|
229
|
|
- var presDetails []*models.PresDetail
|
|
229
|
+
|
230
|
230
|
for index, item := range prescriptions {
|
|
231
|
+ var presDetails []*models.PresDetail
|
231
|
232
|
var presDetail models.PresDetail
|
232
|
233
|
var presInfo models.PresInfo
|
233
|
234
|
presInfo.Cbmid = strconv.FormatInt(item.ID, 10)
|
|
@@ -238,9 +239,9 @@ func (c *CoordinateController) SettleAccount() {
|
238
|
239
|
}
|
239
|
240
|
|
240
|
241
|
if item.Type == 1 {
|
241
|
|
- presInfo.Cbm07 = item.MedType
|
|
242
|
+ presInfo.Cbm07 = ""
|
242
|
243
|
} else {
|
243
|
|
- presInfo.Cbm07 = item.MedType
|
|
244
|
+ presInfo.Cbm07 = ""
|
244
|
245
|
}
|
245
|
246
|
|
246
|
247
|
presDetail.Vaf59 = strconv.FormatInt(int64(index+1), 10)
|
|
@@ -251,7 +252,7 @@ func (c *CoordinateController) SettleAccount() {
|
251
|
252
|
var infoItem models.Item
|
252
|
253
|
infoItem.Rownr = strconv.FormatInt(int64(index+1), 10)
|
253
|
254
|
infoItem.Vaf11 = "2"
|
254
|
|
- infoItem.Vaf36 = time.Unix(subItem.ExecutionTime, 0).Format("2006-01-02 15:04:05")
|
|
255
|
+ infoItem.Vaf36 = time.Unix(subItem.StartTime, 0).Format("2006-01-02 15:04:05")
|
255
|
256
|
infoItem.Bbx01 = subItem.BaseDrugLib.MedicalInsuranceNumber
|
256
|
257
|
infoItem.Bda01 = "1"
|
257
|
258
|
infoItem.Bby01 = ""
|
|
@@ -261,6 +262,8 @@ func (c *CoordinateController) SettleAccount() {
|
261
|
262
|
infoItem.Vaf14 = subItem.BaseDrugLib.DrugName
|
262
|
263
|
infoItem.Bdi01 = ef.Code
|
263
|
264
|
infoItem.Vaf17 = strconv.FormatInt(subItem.Day, 10)
|
|
265
|
+ infoItem.Vaf18 = fmt.Sprintf("%.2f", subItem.SingleDose)
|
|
266
|
+
|
264
|
267
|
infoItem.Vaf20 = fmt.Sprintf("%.2f", subItem.SingleDose)
|
265
|
268
|
infoItem.Vaf21 = fmt.Sprintf("%.2f", subItem.PrescribingNumber)
|
266
|
269
|
infoItem.Vaf35 = "0"
|
|
@@ -275,22 +278,23 @@ func (c *CoordinateController) SettleAccount() {
|
275
|
278
|
//ef, _ := service.GetExecutionFrequencyByName(subItem.ExecutionFrequency, subItem.UserOrgId)
|
276
|
279
|
|
277
|
280
|
if subItem.Type == 2 {
|
278
|
|
- if subItem.HisProject.CostClassify == 10 {
|
|
281
|
+ fmt.Println(subItem.HisProject.CostClassify)
|
|
282
|
+ if subItem.HisProject.CostClassify == 100 {
|
279
|
283
|
var infoItem models.Item
|
280
|
284
|
infoItem.Rownr = "0"
|
281
|
285
|
infoItem.Vaf11 = "2"
|
282
|
|
- infoItem.Vaf36 = time.Unix(subItem.ExecutionTime, 0).Format("2006-01-02 15:04:05")
|
|
286
|
+ infoItem.Vaf36 = time.Unix(subItem.Ctime, 0).Format("2006-01-02 15:04:05")
|
283
|
287
|
infoItem.Bbx01 = subItem.HisProject.MedicalCode
|
284
|
288
|
infoItem.Bda01 = "Z"
|
285
|
289
|
infoItem.Bby01 = ""
|
286
|
290
|
infoItem.Vaf14 = subItem.HisProject.ProjectName
|
287
|
291
|
infoItem.Vaf15 = subItem.HisProject.ProjectName
|
288
|
292
|
infoItem.Bdi01 = "160"
|
289
|
|
- infoItem.Vaf17 = subItem.Day
|
|
293
|
+ infoItem.Vaf17 = "1"
|
290
|
294
|
infoItem.Vaf20 = subItem.SingleDose
|
291
|
295
|
infoItem.Vaf21 = subItem.Count
|
292
|
296
|
infoItem.Vaf35 = "0"
|
293
|
|
- infoItem.Vaf18 = 0
|
|
297
|
+ infoItem.Vaf18 = ""
|
294
|
298
|
infoItem.Vaf32 = "1"
|
295
|
299
|
infoItem.Bck01b = departmwnt.Number
|
296
|
300
|
infoItem.Bck01d = departmwnt.Number
|
|
@@ -303,7 +307,7 @@ func (c *CoordinateController) SettleAccount() {
|
303
|
307
|
var infoItem models.Item
|
304
|
308
|
infoItem.Rownr = "0"
|
305
|
309
|
infoItem.Vaf11 = "1"
|
306
|
|
- infoItem.Vaf36 = time.Unix(subItem.ExecutionTime, 0).Format("2006-01-02 15:04:05")
|
|
310
|
+ infoItem.Vaf36 = time.Unix(subItem.Ctime, 0).Format("2006-01-02 15:04:05")
|
307
|
311
|
infoItem.Bbx01 = subItem.HisProject.MedicalCode
|
308
|
312
|
|
309
|
313
|
if subItem.HisProject.CostClassify == 2 {
|
|
@@ -321,7 +325,7 @@ func (c *CoordinateController) SettleAccount() {
|
321
|
325
|
infoItem.Vaf20 = subItem.SingleDose
|
322
|
326
|
infoItem.Vaf21 = subItem.Count
|
323
|
327
|
infoItem.Vaf35 = "0"
|
324
|
|
- infoItem.Vaf18 = 0
|
|
328
|
+ infoItem.Vaf18 = fmt.Sprintf("%.2f", subItem.SingleDose)
|
325
|
329
|
infoItem.Vaf32 = "0"
|
326
|
330
|
infoItem.Bck01b = departmwnt.Number
|
327
|
331
|
infoItem.Bck01d = departmwnt.Number
|
|
@@ -335,7 +339,7 @@ func (c *CoordinateController) SettleAccount() {
|
335
|
339
|
var infoItem models.Item
|
336
|
340
|
infoItem.Rownr = "0"
|
337
|
341
|
infoItem.Vaf11 = "1"
|
338
|
|
- infoItem.Vaf36 = time.Unix(subItem.ExecutionTime, 0).Format("2006-01-02 15:04:05")
|
|
342
|
+ infoItem.Vaf36 = time.Unix(subItem.Ctime, 0).Format("2006-01-02 15:04:05")
|
339
|
343
|
infoItem.Bbx01 = subItem.GoodInfo.MedicalInsuranceNumber
|
340
|
344
|
infoItem.Bda01 = "M"
|
341
|
345
|
infoItem.Bby01 = ""
|
|
@@ -355,6 +359,7 @@ func (c *CoordinateController) SettleAccount() {
|
355
|
359
|
}
|
356
|
360
|
|
357
|
361
|
}
|
|
362
|
+
|
358
|
363
|
presDetail.Item = infoItems
|
359
|
364
|
presDetails = append(presDetails, &presDetail)
|
360
|
365
|
presInfo.PresDetail = presDetails
|
|
@@ -447,7 +452,7 @@ func (c *CoordinateController) SettleAccount() {
|
447
|
452
|
}
|
448
|
453
|
err = service.CreateOrder(order)
|
449
|
454
|
if err != nil {
|
450
|
|
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateOrderException)
|
|
455
|
+ c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeCreateOrderExceptionT)
|
451
|
456
|
return
|
452
|
457
|
}
|
453
|
458
|
|