|
@@ -38,7 +38,7 @@ func HisManagerApiRegistRouters() {
|
38
|
38
|
beego.Router("/api/checkaccount/get", &HisApiController{}, "get:GetCheckAccount")
|
39
|
39
|
beego.Router("/api/checkdetailaccount/get", &HisApiController{}, "get:GetCheckDetailAccount")
|
40
|
40
|
beego.Router("/api/refund/post", &HisApiController{}, "get:Refund")
|
41
|
|
- //beego.Router("/api/sscard", &HisApiController{}, "get:Sscard")
|
|
41
|
+ beego.Router("/api/sscard", &HisApiController{}, "get:Sscard")
|
42
|
42
|
beego.Router("/api/refundnumber/post", &HisApiController{}, "get:RefundNumber")
|
43
|
43
|
beego.Router("/api/refunddetail/post", &HisApiController{}, "get:RefundDetail")
|
44
|
44
|
beego.Router("/api/treatment/check", &HisApiController{}, "get:CheckTreatment")
|
|
@@ -309,201 +309,201 @@ func (c *HisApiController) GetHisPatientInfo() {
|
309
|
309
|
}
|
310
|
310
|
}
|
311
|
311
|
|
312
|
|
-//func (c *HisApiController) Sscard() {
|
313
|
|
-// //id_card_type, _ := c.GetInt64("id_card_type")
|
314
|
|
-// //adminUser := c.GetAdminUserInfo()
|
315
|
|
-// //miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
316
|
|
-// id_card_type := 1
|
317
|
|
-// r := CardInit()
|
318
|
|
-// fmt.Println(r)
|
319
|
|
-// //if r == 0 {
|
320
|
|
-// switch id_card_type {
|
321
|
|
-// case 1:
|
322
|
|
-// defer GetBasBaseInfo()
|
323
|
|
-//
|
324
|
|
-// //if err != nil {
|
325
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
326
|
|
-// // return
|
327
|
|
-// //
|
328
|
|
-// //} else {
|
329
|
|
-// // fmt.Println(basStr)
|
330
|
|
-// //
|
331
|
|
-// // bas := strings.Split(basStr, "|")
|
332
|
|
-// //
|
333
|
|
-// // basNumber := bas[1]
|
334
|
|
-// //
|
335
|
|
-// // //basNumber := bas[2]
|
336
|
|
-// // card_sn := bas[3]
|
337
|
|
-// //
|
338
|
|
-// // appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
339
|
|
-// //
|
340
|
|
-// // api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + basNumber + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10) + "&card_sn=" + card_sn
|
341
|
|
-// // resp, requestErr := http.Get(api)
|
342
|
|
-// // if requestErr != nil {
|
343
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
344
|
|
-// // return
|
345
|
|
-// // }
|
346
|
|
-// // defer resp.Body.Close()
|
347
|
|
-// // body, ioErr := ioutil.ReadAll(resp.Body)
|
348
|
|
-// // if ioErr != nil {
|
349
|
|
-// // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
350
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
351
|
|
-// // return
|
352
|
|
-// // }
|
353
|
|
-// // var respJSON map[string]interface{}
|
354
|
|
-// //
|
355
|
|
-// // if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
356
|
|
-// // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
357
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
358
|
|
-// // return
|
359
|
|
-// // }
|
360
|
|
-// //
|
361
|
|
-// // userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
362
|
|
-// // userJSONBytes, _ := json.Marshal(userJSON)
|
363
|
|
-// // var res ResultTwo
|
364
|
|
-// // if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
365
|
|
-// // utils.ErrorLog("解析失败:%v", err)
|
366
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
367
|
|
-// // return
|
368
|
|
-// // }
|
369
|
|
-// // Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
370
|
|
-// // Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
371
|
|
-// // infoStr := string(Iinfos)
|
372
|
|
-// // idetinfoStr := string(Idetinfos)
|
373
|
|
-// //
|
374
|
|
-// // if res.Infcode == 0 {
|
375
|
|
-// // his := models.VMHisPatient{
|
376
|
|
-// // Status: 1,
|
377
|
|
-// // Ctime: time.Now().Unix(),
|
378
|
|
-// // Mtime: time.Now().Unix(),
|
379
|
|
-// // PsnNo: res.Output.Baseinfo.PsnNo,
|
380
|
|
-// // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
381
|
|
-// // Certno: res.Output.Baseinfo.Certno,
|
382
|
|
-// // PsnName: res.Output.Baseinfo.PsnName,
|
383
|
|
-// // Gend: res.Output.Baseinfo.Gend,
|
384
|
|
-// // Naty: res.Output.Baseinfo.Naty,
|
385
|
|
-// // Brdy: res.Output.Baseinfo.Brdy,
|
386
|
|
-// // Age: res.Output.Baseinfo.Age,
|
387
|
|
-// // Iinfo: infoStr,
|
388
|
|
-// // Idetinfo: idetinfoStr,
|
389
|
|
-// // UserOrgId: adminUser.CurrentOrgId,
|
390
|
|
-// // IsReturn: 1,
|
391
|
|
-// // IdCardType: id_card_type,
|
392
|
|
-// // }
|
393
|
|
-// //
|
394
|
|
-// // patient, err := service.GetPatientByNumber(basNumber, adminUser.CurrentOrgId)
|
395
|
|
-// // if err == gorm.ErrRecordNotFound {
|
396
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
397
|
|
-// // return
|
398
|
|
-// //
|
399
|
|
-// // } else if err != nil {
|
400
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
401
|
|
-// // return
|
402
|
|
-// //
|
403
|
|
-// // } else {
|
404
|
|
-// // c.ServeSuccessJSON(map[string]interface{}{
|
405
|
|
-// // "patient": patient,
|
406
|
|
-// // "his": his,
|
407
|
|
-// // "number": basNumber,
|
408
|
|
-// // })
|
409
|
|
-// // }
|
410
|
|
-// // } else {
|
411
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
412
|
|
-// // return
|
413
|
|
-// // }
|
414
|
|
-// //
|
415
|
|
-// //}
|
416
|
|
-//
|
417
|
|
-// break
|
418
|
|
-// case 2:
|
419
|
|
-// ////SFZStr, err := GetSFZBaseInfo()
|
420
|
|
-// //if err != nil {
|
421
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
422
|
|
-// // return
|
423
|
|
-// //
|
424
|
|
-// //} else {
|
425
|
|
-// //
|
426
|
|
-// // id_card_str := strings.Split(SFZStr, "^")
|
427
|
|
-// // id_card_number := id_card_str[0]
|
428
|
|
-// //appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
429
|
|
-// //
|
430
|
|
-// //api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + id_card_number + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
431
|
|
-// //resp, requestErr := http.Get(api)
|
432
|
|
-// //if requestErr != nil {
|
433
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
434
|
|
-// // return
|
435
|
|
-// //}
|
436
|
|
-// //defer resp.Body.Close()
|
437
|
|
-// //body, ioErr := ioutil.ReadAll(resp.Body)
|
438
|
|
-// //if ioErr != nil {
|
439
|
|
-// // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
440
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
441
|
|
-// // return
|
442
|
|
-// //}
|
443
|
|
-// //var respJSON map[string]interface{}
|
444
|
|
-// //
|
445
|
|
-// //if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
446
|
|
-// // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
447
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
448
|
|
-// // return
|
449
|
|
-// //}
|
450
|
|
-// //
|
451
|
|
-// //userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
452
|
|
-// //userJSONBytes, _ := json.Marshal(userJSON)
|
453
|
|
-// //var res ResultTwo
|
454
|
|
-// //if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
455
|
|
-// // utils.ErrorLog("解析失败:%v", err)
|
456
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
457
|
|
-// // return
|
458
|
|
-// //}
|
459
|
|
-// //Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
460
|
|
-// //Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
461
|
|
-// //infoStr := string(Iinfos)
|
462
|
|
-// //idetinfoStr := string(Idetinfos)
|
463
|
|
-// //
|
464
|
|
-// //if res.Infcode == 0 {
|
465
|
|
-// // his := models.VMHisPatient{
|
466
|
|
-// // Status: 1,
|
467
|
|
-// // Ctime: time.Now().Unix(),
|
468
|
|
-// // Mtime: time.Now().Unix(),
|
469
|
|
-// // PsnNo: res.Output.Baseinfo.PsnNo,
|
470
|
|
-// // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
471
|
|
-// // Certno: res.Output.Baseinfo.Certno,
|
472
|
|
-// // PsnName: res.Output.Baseinfo.PsnName,
|
473
|
|
-// // Gend: res.Output.Baseinfo.Gend,
|
474
|
|
-// // Naty: res.Output.Baseinfo.Naty,
|
475
|
|
-// // Brdy: res.Output.Baseinfo.Brdy,
|
476
|
|
-// // Age: res.Output.Baseinfo.Age,
|
477
|
|
-// // Iinfo: infoStr,
|
478
|
|
-// // Idetinfo: idetinfoStr,
|
479
|
|
-// // UserOrgId: adminUser.CurrentOrgId,
|
480
|
|
-// // IsReturn: 1,
|
481
|
|
-// // IdCardType: id_card_type,
|
482
|
|
-// // }
|
483
|
|
-//
|
484
|
|
-// // patient, err := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
|
485
|
|
-// // if err == gorm.ErrRecordNotFound {
|
486
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
487
|
|
-// // return
|
488
|
|
-// //
|
489
|
|
-// // } else if err != nil {
|
490
|
|
-// // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
491
|
|
-// // return
|
492
|
|
-// //
|
493
|
|
-// // } else {
|
494
|
|
-// // c.ServeSuccessJSON(map[string]interface{}{
|
495
|
|
-// // "patient": patient,
|
496
|
|
-// // "number": id_card_number,
|
497
|
|
-// // })
|
498
|
|
-// // }
|
499
|
|
-// //}
|
500
|
|
-// break
|
501
|
|
-// case 3:
|
502
|
|
-//
|
503
|
|
-// break
|
504
|
|
-//
|
505
|
|
-// }
|
506
|
|
-//}
|
|
312
|
+func (c *HisApiController) Sscard() {
|
|
313
|
+ //id_card_type, _ := c.GetInt64("id_card_type")
|
|
314
|
+ //adminUser := c.GetAdminUserInfo()
|
|
315
|
+ //miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
|
|
316
|
+ id_card_type := 1
|
|
317
|
+ r := CardInit()
|
|
318
|
+ fmt.Println(r)
|
|
319
|
+ //if r == 0 {
|
|
320
|
+ switch id_card_type {
|
|
321
|
+ case 1:
|
|
322
|
+ //defer GetBasBaseInfo()
|
|
323
|
+
|
|
324
|
+ //if err != nil {
|
|
325
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
326
|
+ // return
|
|
327
|
+ //
|
|
328
|
+ //} else {
|
|
329
|
+ // fmt.Println(basStr)
|
|
330
|
+ //
|
|
331
|
+ // bas := strings.Split(basStr, "|")
|
|
332
|
+ //
|
|
333
|
+ // basNumber := bas[1]
|
|
334
|
+ //
|
|
335
|
+ // //basNumber := bas[2]
|
|
336
|
+ // card_sn := bas[3]
|
|
337
|
+ //
|
|
338
|
+ // appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
|
339
|
+ //
|
|
340
|
+ // api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + basNumber + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10) + "&card_sn=" + card_sn
|
|
341
|
+ // resp, requestErr := http.Get(api)
|
|
342
|
+ // if requestErr != nil {
|
|
343
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
344
|
+ // return
|
|
345
|
+ // }
|
|
346
|
+ // defer resp.Body.Close()
|
|
347
|
+ // body, ioErr := ioutil.ReadAll(resp.Body)
|
|
348
|
+ // if ioErr != nil {
|
|
349
|
+ // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
350
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
351
|
+ // return
|
|
352
|
+ // }
|
|
353
|
+ // var respJSON map[string]interface{}
|
|
354
|
+ //
|
|
355
|
+ // if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
356
|
+ // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
357
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
358
|
+ // return
|
|
359
|
+ // }
|
|
360
|
+ //
|
|
361
|
+ // userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
362
|
+ // userJSONBytes, _ := json.Marshal(userJSON)
|
|
363
|
+ // var res ResultTwo
|
|
364
|
+ // if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
365
|
+ // utils.ErrorLog("解析失败:%v", err)
|
|
366
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
367
|
+ // return
|
|
368
|
+ // }
|
|
369
|
+ // Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
370
|
+ // Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
371
|
+ // infoStr := string(Iinfos)
|
|
372
|
+ // idetinfoStr := string(Idetinfos)
|
|
373
|
+ //
|
|
374
|
+ // if res.Infcode == 0 {
|
|
375
|
+ // his := models.VMHisPatient{
|
|
376
|
+ // Status: 1,
|
|
377
|
+ // Ctime: time.Now().Unix(),
|
|
378
|
+ // Mtime: time.Now().Unix(),
|
|
379
|
+ // PsnNo: res.Output.Baseinfo.PsnNo,
|
|
380
|
+ // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
|
381
|
+ // Certno: res.Output.Baseinfo.Certno,
|
|
382
|
+ // PsnName: res.Output.Baseinfo.PsnName,
|
|
383
|
+ // Gend: res.Output.Baseinfo.Gend,
|
|
384
|
+ // Naty: res.Output.Baseinfo.Naty,
|
|
385
|
+ // Brdy: res.Output.Baseinfo.Brdy,
|
|
386
|
+ // Age: res.Output.Baseinfo.Age,
|
|
387
|
+ // Iinfo: infoStr,
|
|
388
|
+ // Idetinfo: idetinfoStr,
|
|
389
|
+ // UserOrgId: adminUser.CurrentOrgId,
|
|
390
|
+ // IsReturn: 1,
|
|
391
|
+ // IdCardType: id_card_type,
|
|
392
|
+ // }
|
|
393
|
+ //
|
|
394
|
+ // patient, err := service.GetPatientByNumber(basNumber, adminUser.CurrentOrgId)
|
|
395
|
+ // if err == gorm.ErrRecordNotFound {
|
|
396
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
|
397
|
+ // return
|
|
398
|
+ //
|
|
399
|
+ // } else if err != nil {
|
|
400
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
401
|
+ // return
|
|
402
|
+ //
|
|
403
|
+ // } else {
|
|
404
|
+ // c.ServeSuccessJSON(map[string]interface{}{
|
|
405
|
+ // "patient": patient,
|
|
406
|
+ // "his": his,
|
|
407
|
+ // "number": basNumber,
|
|
408
|
+ // })
|
|
409
|
+ // }
|
|
410
|
+ // } else {
|
|
411
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeHisFailedException)
|
|
412
|
+ // return
|
|
413
|
+ // }
|
|
414
|
+ //
|
|
415
|
+ //}
|
|
416
|
+
|
|
417
|
+ break
|
|
418
|
+ case 2:
|
|
419
|
+ ////SFZStr, err := GetSFZBaseInfo()
|
|
420
|
+ //if err != nil {
|
|
421
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeReadCardException)
|
|
422
|
+ // return
|
|
423
|
+ //
|
|
424
|
+ //} else {
|
|
425
|
+ //
|
|
426
|
+ // id_card_str := strings.Split(SFZStr, "^")
|
|
427
|
+ // id_card_number := id_card_str[0]
|
|
428
|
+ //appRole, _ := service.GetAppRole(adminUser.CurrentOrgId)
|
|
429
|
+ //
|
|
430
|
+ //api := "http://127.0.0.1:9532/" + "gdyb/one?cert_no=" + id_card_number + "&org_name=" + miConfig.OrgName + "&doctor=" + appRole.UserName + "&fixmedins_code=" + miConfig.Code + "&insuplc_admdvs=" + miConfig.InsuplcAdmdvs + "&mdtrtarea_admvs=" + miConfig.MdtrtareaAdmvs + "&secret_key=" + miConfig.SecretKey + "&id_card_type=" + strconv.FormatInt(int64(id_card_type), 10)
|
|
431
|
+ //resp, requestErr := http.Get(api)
|
|
432
|
+ //if requestErr != nil {
|
|
433
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
434
|
+ // return
|
|
435
|
+ //}
|
|
436
|
+ //defer resp.Body.Close()
|
|
437
|
+ //body, ioErr := ioutil.ReadAll(resp.Body)
|
|
438
|
+ //if ioErr != nil {
|
|
439
|
+ // utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
|
|
440
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
441
|
+ // return
|
|
442
|
+ //}
|
|
443
|
+ //var respJSON map[string]interface{}
|
|
444
|
+ //
|
|
445
|
+ //if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
|
|
446
|
+ // utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
|
|
447
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
448
|
+ // return
|
|
449
|
+ //}
|
|
450
|
+ //
|
|
451
|
+ //userJSON := respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
|
|
452
|
+ //userJSONBytes, _ := json.Marshal(userJSON)
|
|
453
|
+ //var res ResultTwo
|
|
454
|
+ //if err := json.Unmarshal(userJSONBytes, &res); err != nil {
|
|
455
|
+ // utils.ErrorLog("解析失败:%v", err)
|
|
456
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
|
|
457
|
+ // return
|
|
458
|
+ //}
|
|
459
|
+ //Iinfos, _ := json.Marshal(res.Output.Iinfo)
|
|
460
|
+ //Idetinfos, _ := json.Marshal(res.Output.Idetinfo)
|
|
461
|
+ //infoStr := string(Iinfos)
|
|
462
|
+ //idetinfoStr := string(Idetinfos)
|
|
463
|
+ //
|
|
464
|
+ //if res.Infcode == 0 {
|
|
465
|
+ // his := models.VMHisPatient{
|
|
466
|
+ // Status: 1,
|
|
467
|
+ // Ctime: time.Now().Unix(),
|
|
468
|
+ // Mtime: time.Now().Unix(),
|
|
469
|
+ // PsnNo: res.Output.Baseinfo.PsnNo,
|
|
470
|
+ // PsnCertType: res.Output.Baseinfo.PsnCertType,
|
|
471
|
+ // Certno: res.Output.Baseinfo.Certno,
|
|
472
|
+ // PsnName: res.Output.Baseinfo.PsnName,
|
|
473
|
+ // Gend: res.Output.Baseinfo.Gend,
|
|
474
|
+ // Naty: res.Output.Baseinfo.Naty,
|
|
475
|
+ // Brdy: res.Output.Baseinfo.Brdy,
|
|
476
|
+ // Age: res.Output.Baseinfo.Age,
|
|
477
|
+ // Iinfo: infoStr,
|
|
478
|
+ // Idetinfo: idetinfoStr,
|
|
479
|
+ // UserOrgId: adminUser.CurrentOrgId,
|
|
480
|
+ // IsReturn: 1,
|
|
481
|
+ // IdCardType: id_card_type,
|
|
482
|
+ // }
|
|
483
|
+
|
|
484
|
+ // patient, err := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
|
|
485
|
+ // if err == gorm.ErrRecordNotFound {
|
|
486
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeNoPateintException)
|
|
487
|
+ // return
|
|
488
|
+ //
|
|
489
|
+ // } else if err != nil {
|
|
490
|
+ // c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
|
491
|
+ // return
|
|
492
|
+ //
|
|
493
|
+ // } else {
|
|
494
|
+ // c.ServeSuccessJSON(map[string]interface{}{
|
|
495
|
+ // "patient": patient,
|
|
496
|
+ // "number": id_card_number,
|
|
497
|
+ // })
|
|
498
|
+ // }
|
|
499
|
+ //}
|
|
500
|
+ break
|
|
501
|
+ case 3:
|
|
502
|
+
|
|
503
|
+ break
|
|
504
|
+
|
|
505
|
+ }
|
|
506
|
+}
|
507
|
507
|
|
508
|
508
|
//func GetBasBaseInfo() (jsonStr string, err error) {
|
509
|
509
|
//
|
|
@@ -547,16 +547,16 @@ func (c *HisApiController) GetHisPatientInfo() {
|
547
|
547
|
// return string(str), nil
|
548
|
548
|
//}
|
549
|
549
|
|
550
|
|
-//func CardInit() int {
|
551
|
|
-// DllTestDef := syscall.MustLoadDLL("SSCard.dll")
|
552
|
|
-// add := DllTestDef.MustFindProc("Init")
|
553
|
|
-// ret, _, err := add.Call(StrPtr("http://igb.hsa.gdgov.cn/gdyb_inf/poc/api/card/initDll"), StrPtr("440200"))
|
554
|
|
-// if err != nil {
|
555
|
|
-// fmt.Println("SSCard的运算结果为:", ret)
|
556
|
|
-// }
|
557
|
|
-// result := int(ret)
|
558
|
|
-// return result
|
559
|
|
-//}
|
|
550
|
+func CardInit() int {
|
|
551
|
+ DllTestDef := syscall.MustLoadDLL("SSCard.dll")
|
|
552
|
+ add := DllTestDef.MustFindProc("Init")
|
|
553
|
+ ret, _, err := add.Call(StrPtr("http://igb.hsa.gdgov.cn/gdyb_inf/poc/api/card/initDll"), StrPtr("440200"))
|
|
554
|
+ if err != nil {
|
|
555
|
+ fmt.Println("SSCard的运算结果为:", ret)
|
|
556
|
+ }
|
|
557
|
+ result := int(ret)
|
|
558
|
+ return result
|
|
559
|
+}
|
560
|
560
|
|
561
|
561
|
//func CardInit() int {
|
562
|
562
|
// ret, _, err := add.Call(StrPtr("http://igb.hsa.gdgov.cn/gdyb_inf/poc/api/card/initDll"), StrPtr("440200"))
|