test_user 4 kuukautta sitten
vanhempi
commit
9d7f07c8c4

+ 9 - 1
controllers/coordinate/coordinate_controller.go Näytä tiedosto

@@ -3855,6 +3855,13 @@ func (c *CoordinateController) NMGSettleAccount() {
3855 3855
 								}
3856 3856
 								if subitem.HisProject.CostClassify == 3 {
3857 3857
 									var ie_cbm1 models.IEtwo
3858
+									if subitem.TeamId > 0{
3859
+										//ie_cbm1.BBX01 = subitem.HisProject.
3860
+										team := service.GetBbx01ByTeamID(subitem.TeamId)
3861
+										ie_cbm1.BBX01 = team.Bbx01
3862
+									}else{
3863
+										ie_cbm1.BBX01 = subitem.HisProject.ZuobiaoId
3864
+									}
3858 3865
 									ie_cbm1.CBMID = strconv.FormatInt(int64(item.ID), 10)
3859 3866
 									ie_cbm1.VAF04 = strconv.FormatInt(int64(li.Acf01), 10)
3860 3867
 									ie_cbm1.VAA01 = strconv.FormatInt(int64(li.Vaa01), 10)
@@ -3864,7 +3871,6 @@ func (c *CoordinateController) NMGSettleAccount() {
3864 3871
 									ie_cbm1.VAF10 = "1"
3865 3872
 									ie_cbm1.VAF11 = "2"
3866 3873
 									ie_cbm1.BDA01 = "L" //诊疗类型
3867
-									ie_cbm1.BBX01 = subitem.HisProject.ZuobiaoId
3868 3874
 									ie_cbm1.VAF14 =  subitem.HisProject.Vaf14                        //检验样本类型
3869 3875
 									ie_cbm1.VAF15 = ""                       //检验样本类型
3870 3876
 									ie_cbm1.BBY01 = subitem.HisProject.Bby01 //药品规格id或材料规格id
@@ -5443,6 +5449,8 @@ func (c *CoordinateController) NMGSettleAccount() {
5443 5449
 									ie_cbm1.VAF10 = "1"
5444 5450
 									ie_cbm1.VAF11 = "2"
5445 5451
 									ie_cbm1.BDA01 = "L" //诊疗类型
5452
+
5453
+
5446 5454
 									ie_cbm1.BBX01 = subitem.HisProject.ZuobiaoId
5447 5455
 									ie_cbm1.VAF14 = subitem.HisProject.Vaf14                       //检验样本类型
5448 5456
 									ie_cbm1.VAF15 = ""                       //检验样本类型

+ 23 - 2
controllers/sg/his_api_controller.go Näytä tiedosto

@@ -212,6 +212,10 @@ func (c *HisApiController) Get3508() {
212 212
 
213 213
 	var struct3508 models.Struct3508
214 214
 	struct3508.OrgName = miConfig.OrgName
215
+
216
+	struct3508.FixmedinsCode = miConfig.Code
217
+
218
+
215 219
 	struct3508.AccessKey = miConfig.AccessKey
216 220
 	struct3508.Opter = curRoles.UserName
217 221
 	struct3508.RequestUrl = miConfig.Url
@@ -265,6 +269,8 @@ func (c *HisApiController) Get3509() {
265 269
 
266 270
 	var struct3508 models.Struct3509
267 271
 	struct3508.OrgName = miConfig.OrgName
272
+	struct3508.FixmedinsCode = miConfig.Code
273
+
268 274
 	struct3508.AccessKey = miConfig.AccessKey
269 275
 	struct3508.Opter = curRoles.UserName
270 276
 	struct3508.RequestUrl = miConfig.Url
@@ -274,7 +280,7 @@ func (c *HisApiController) Get3509() {
274 280
 	struct3508.Enckey = miConfig.EncKey
275 281
 	struct3508.SignKey = miConfig.SignKey
276 282
 	struct3508.SecretKey = miConfig.SecretKey
277
-	struct3508.MedinsListCodg = drug.MedicalInsuranceNumber
283
+	struct3508.MedListCodg = drug.MedicalInsuranceNumber
278 284
 	struct3508.Begndate = start_time
279 285
 	struct3508.Enddate = end_time
280 286
 	result1, result2, _ := service.FJyb3509(struct3508)
@@ -316,6 +322,8 @@ func (c *HisApiController) Get3510() {
316 322
 	drug, _ := service.GetDrugByID(drug_id)
317 323
 
318 324
 	var struct3508 models.Struct3510
325
+	struct3508.FixmedinsCode = miConfig.Code
326
+
319 327
 	struct3508.OrgName = miConfig.OrgName
320 328
 	struct3508.AccessKey = miConfig.AccessKey
321 329
 	struct3508.Opter = curRoles.UserName
@@ -368,6 +376,8 @@ func (c *HisApiController) Get3511() {
368 376
 	drug, _ := service.GetDrugByID(drug_id)
369 377
 
370 378
 	var struct3508 models.Struct3511
379
+	struct3508.FixmedinsCode = miConfig.Code
380
+
371 381
 	struct3508.OrgName = miConfig.OrgName
372 382
 	struct3508.AccessKey = miConfig.AccessKey
373 383
 	struct3508.Opter = curRoles.UserName
@@ -420,6 +430,8 @@ func (c *HisApiController) Get3512() {
420 430
 	drug, _ := service.GetDrugByID(drug_id)
421 431
 
422 432
 	var struct3508 models.Struct3512
433
+	struct3508.FixmedinsCode = miConfig.Code
434
+
423 435
 	struct3508.OrgName = miConfig.OrgName
424 436
 	struct3508.AccessKey = miConfig.AccessKey
425 437
 	struct3508.Opter = curRoles.UserName
@@ -472,6 +484,8 @@ func (c *HisApiController) Get3513() {
472 484
 	drug, _ := service.GetDrugByID(drug_id)
473 485
 
474 486
 	var struct3508 models.Struct3513
487
+	struct3508.FixmedinsCode = miConfig.Code
488
+
475 489
 	struct3508.OrgName = miConfig.OrgName
476 490
 	struct3508.AccessKey = miConfig.AccessKey
477 491
 	struct3508.Opter = curRoles.UserName
@@ -523,6 +537,8 @@ func (c *HisApiController) Get35081() {
523 537
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
524 538
 	drug, _ := service.GetDrugByID(drug_id)
525 539
 	var struct3508 models.Struct35081
540
+	struct3508.FixmedinsCode = miConfig.Code
541
+
526 542
 	struct3508.OrgName = miConfig.OrgName
527 543
 	struct3508.AccessKey = miConfig.AccessKey
528 544
 	struct3508.Opter = curRoles.UserName
@@ -575,6 +591,8 @@ func (c *HisApiController) Get35082() {
575 591
 	miConfig, _ := service.FindMedicalInsuranceInfo(adminUser.CurrentOrgId)
576 592
 	drug, _ := service.GetDrugByID(drug_id)
577 593
 	var struct3508 models.Struct35082
594
+	struct3508.FixmedinsCode = miConfig.Code
595
+
578 596
 	struct3508.OrgName = miConfig.OrgName
579 597
 	struct3508.AccessKey = miConfig.AccessKey
580 598
 	struct3508.Opter = curRoles.UserName
@@ -633,6 +651,7 @@ func (c *HisApiController) FJ3501AND3502() {
633 651
 
634 652
 			number := strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(drug.ID, 10) + "-" + "3501"
635 653
 			var struct3501 models.Struct3501
654
+
636 655
 			struct3501.OrgName = miConfig.OrgName
637 656
 			struct3501.AccessKey = miConfig.AccessKey
638 657
 			struct3501.Opter = roles.UserName
@@ -1306,6 +1325,8 @@ func (c *HisApiController) ChangeDrug() {
1306 1325
 	for _, item := range flows {
1307 1326
 		var res3 ResultSix
1308 1327
 		if item.ConsumableType == 3 { //3为自动出库 7为自动退库
1328
+			number := strconv.FormatInt(time.Now().Unix(), 10) + "-" + strconv.FormatInt(item.ID, 10) + "-" + "3507"
1329
+
1309 1330
 			prescription := service.GetHisPrescriptionByID(item.HisDoctorAdviceInfo.PrescriptionId)
1310 1331
 			if prescription.OrderStatus == 2 {
1311 1332
 				//已经结算
@@ -25382,7 +25403,7 @@ func (c *HisApiController) GetPreUploadInfo() {
25382 25403
 
25383 25404
 			if miConfig.MdtrtareaAdmvs == "421300" {
25384 25405
 				bytesData, _ := json.Marshal(data)
25385
-				req, _ := http.NewRequest("POST", "http://192.168.124.4:9532/"+"hbyb/2204", bytes.NewReader(bytesData))
25406
+				req, _ := http.NewRequest("POST", "http://192.168.124.13:9532/"+"hbyb/2204", bytes.NewReader(bytesData))
25386 25407
 				resp, _ := client.Do(req)
25387 25408
 				defer resp.Body.Close()
25388 25409
 				body, ioErr := ioutil.ReadAll(resp.Body)

+ 9 - 1
controllers/zh/zh_his_api_controller.go Näytä tiedosto

@@ -1541,7 +1541,15 @@ func (c *ZHHisApiController) GetZHPatientInfo() {
1541 1541
 			result = string(result_byte)
1542 1542
 			saveLog(result_log, request_log, "1101", "人员基本信息获取")
1543 1543
 		} else {
1544
-			result, request_log, result_log = service.ZHGdyb1101(patient.IdCardNo, miConfig.OrgName, role.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 2, "", 1, patient.Name,admin_user_id)
1544
+
1545
+			var insuplc_admdvs string
1546
+			if len(patient.InsuplcAdmdvs) > 0 {
1547
+				insuplc_admdvs = patient.InsuplcAdmdvs
1548
+			} else {
1549
+				insuplc_admdvs = miConfig.InsuplcAdmdvs
1550
+			}
1551
+
1552
+			result, request_log, result_log = service.ZHGdyb1101(patient.IdCardNo, miConfig.OrgName, role.UserName, miConfig.Code, insuplc_admdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, 2, "", 1, patient.Name,admin_user_id)
1545 1553
 			saveLog(result_log, request_log, "1101", "人员基本信息获取")
1546 1554
 		}
1547 1555
 		//result := service.Gdyb1101A(id_card_no, miConfig.OrgName, role.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.SecretKey, patient.Name)

+ 1 - 0
models/his_models.go Näytä tiedosto

@@ -62,6 +62,7 @@ type XtHisProjectTeam struct {
62 62
 	CreatedTime int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
63 63
 	UpdatedTime int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
64 64
 	ProjectId   string  `gorm:"column:project_id" json:"project_id" form:"project_id"`
65
+	Bbx01	string  `gorm:"column:bbx01" json:"bbx01" form:"bbx01"`
65 66
 }
66 67
 
67 68
 func (XtHisProjectTeam) TableName() string {

+ 22 - 13
service/fj_service.go Näytä tiedosto

@@ -3286,13 +3286,12 @@ func FJyb3508(struct3508 models.Struct3508) (string, string, string) {
3286 3286
 	inputData := make(map[string]interface{})
3287 3287
 	inputMessage["infno"] = "3508"
3288 3288
 	inputData["fixmedins_code"] = struct3508.FixmedinsCode
3289
-	inputData["medins_list_codg"] = struct3508.MedinsListCodg
3289
+	inputData["medins_list_codg"] = struct3508.MedListCodg
3290 3290
 	inputData["fixmedins_bchno"] = ""
3291 3291
 	inputData["begndate"] = struct3508.Begndate
3292 3292
 	inputData["enddate"] = struct3508.Enddate
3293 3293
 
3294 3294
 	inputData["medins_prod_inv_no"] = ""
3295
-	inputData["med_list_codg"] = ""
3296 3295
 	inputData["medins_list_name"] = ""
3297 3296
 	inputData["rx_flag"] = ""
3298 3297
 	inputData["list_sp_item_flag"] = ""
@@ -3339,12 +3338,13 @@ func FJyb3509(struct3509 models.Struct3509) (string, string, string) {
3339 3338
 	inputData := make(map[string]interface{})
3340 3339
 	inputMessage["infno"] = "3509"
3341 3340
 	inputData["fixmedins_code"] = struct3509.FixmedinsCode
3342
-	inputData["medins_list_codg"] = struct3509.MedinsListCodg
3341
+	//inputData["med_list_codg"] = struct3509.MedinsListCodg
3342
+	inputData["medins_list_codg"] = struct3509.MedListCodg
3343
+
3343 3344
 	inputData["fixmedins_bchno"] = ""
3344 3345
 	inputData["begndate"] = struct3509.Begndate
3345 3346
 	inputData["enddate"] = struct3509.Enddate
3346 3347
 	inputData["medins_prod_inv_no"] = ""
3347
-	inputData["med_list_codg"] = ""
3348 3348
 	inputData["medins_list_name"] = ""
3349 3349
 	inputData["rx_flag"] = ""
3350 3350
 	inputData["list_sp_item_flag"] = ""
@@ -3394,12 +3394,13 @@ func FJyb3510(struct3510 models.Struct3510) (string, string, string) {
3394 3394
 	inputData := make(map[string]interface{})
3395 3395
 	inputMessage["infno"] = "3510"
3396 3396
 	inputData["fixmedins_code"] = struct3510.FixmedinsCode
3397
-	inputData["medins_list_codg"] = struct3510.MedinsListCodg
3397
+	//inputData["medins_list_codg"] = struct3510.MedinsListCodg
3398
+	inputData["medins_list_codg"] = struct3510.MedListCodg
3399
+
3398 3400
 	inputData["fixmedins_bchno"] = ""
3399 3401
 	inputData["begndate"] = struct3510.Begndate
3400 3402
 	inputData["enddate"] = struct3510.Enddate
3401 3403
 	inputData["medins_prod_inv_no"] = ""
3402
-	inputData["med_list_codg"] = ""
3403 3404
 	inputData["medins_list_name"] = ""
3404 3405
 	inputData["rx_flag"] = ""
3405 3406
 	inputData["list_sp_item_flag"] = ""
@@ -3449,12 +3450,13 @@ func FJyb3511(struct3511 models.Struct3511) (string, string, string) {
3449 3450
 	inputData := make(map[string]interface{})
3450 3451
 	inputMessage["infno"] = "3511"
3451 3452
 	inputData["fixmedins_code"] = struct3511.FixmedinsCode
3452
-	inputData["medins_list_codg"] = struct3511.MedinsListCodg
3453
+	//inputData["medins_list_codg"] = struct3511.MedinsListCodg
3454
+	inputData["medins_list_codg"] = struct3511.MedListCodg
3455
+
3453 3456
 	inputData["fixmedins_bchno"] = ""
3454 3457
 	inputData["begndate"] = struct3511.Begndate
3455 3458
 	inputData["enddate"] = struct3511.Enddate
3456 3459
 	inputData["medins_prod_inv_no"] = ""
3457
-	inputData["med_list_codg"] = ""
3458 3460
 	inputData["medins_list_name"] = ""
3459 3461
 	inputData["rx_flag"] = ""
3460 3462
 	inputData["list_sp_item_flag"] = ""
@@ -3504,12 +3506,13 @@ func FJyb3512(struct3512 models.Struct3512) (string, string, string) {
3504 3506
 	inputData := make(map[string]interface{})
3505 3507
 	inputMessage["infno"] = "3512"
3506 3508
 	inputData["fixmedins_code"] = struct3512.FixmedinsCode
3507
-	inputData["medins_list_codg"] = struct3512.MedinsListCodg
3509
+	//inputData["medins_list_codg"] = struct3512.MedinsListCodg
3510
+	inputData["medins_list_codg"] = struct3512.MedListCodg
3511
+
3508 3512
 	inputData["fixmedins_bchno"] = ""
3509 3513
 	inputData["begndate"] = struct3512.Begndate
3510 3514
 	inputData["enddate"] = struct3512.Enddate
3511 3515
 	inputData["medins_prod_inv_no"] = ""
3512
-	inputData["med_list_codg"] = ""
3513 3516
 	inputData["medins_list_name"] = ""
3514 3517
 	inputData["rx_flag"] = ""
3515 3518
 	inputData["list_sp_item_flag"] = ""
@@ -3559,7 +3562,9 @@ func FJyb3513(struct3513 models.Struct3513) (string, string, string) {
3559 3562
 	inputData := make(map[string]interface{})
3560 3563
 	inputMessage["infno"] = "3513"
3561 3564
 	inputData["fixmedins_code"] = struct3513.FixmedinsCode
3562
-	inputData["medins_list_codg"] = struct3513.MedinsListCodg
3565
+	//inputData["medins_list_codg"] = struct3513.MedinsListCodg
3566
+	inputData["medins_list_codg"] = struct3513.MedListCodg
3567
+
3563 3568
 	inputData["fixmedins_bchno"] = ""
3564 3569
 	inputData["begndate"] = struct3513.Begndate
3565 3570
 	inputData["enddate"] = struct3513.Enddate
@@ -3614,7 +3619,9 @@ func FJyb35081(struct35081 models.Struct35081) (string, string, string) {
3614 3619
 	inputData := make(map[string]interface{})
3615 3620
 	inputMessage["infno"] = "35081"
3616 3621
 	inputData["fixmedins_code"] = struct35081.FixmedinsCode
3617
-	inputData["med_list_codg"] = struct35081.MedinsListCodg
3622
+	//inputData["med_list_codg"] = struct35081.MedinsListCodg
3623
+	inputData["medins_list_codg"] = struct35081.MedListCodg
3624
+
3618 3625
 	inputData["fixmedins_bchno"] = ""
3619 3626
 	inputData["page_num"] = struct35081.PageNum
3620 3627
 	inputData["page_size "] = struct35081.PageSize
@@ -3645,7 +3652,9 @@ func FJyb35082(struct35082 models.Struct35082) (string, string, string) {
3645 3652
 	inputData := make(map[string]interface{})
3646 3653
 	inputMessage["infno"] = "3509"
3647 3654
 	inputData["fixmedins_code"] = struct35082.FixmedinsCode
3648
-	inputData["med_list_codg"] = struct35082.MedinsListCodg
3655
+	//inputData["med_list_codg"] = struct35082.MedinsListCodg
3656
+	inputData["medins_list_codg"] = struct35082.MedListCodg
3657
+
3649 3658
 	inputData["fixmedins_bchno"] = ""
3650 3659
 	inputData["page_num"] = struct35082.PageNum
3651 3660
 	inputData["page_size "] = struct35082.PageSize

+ 6 - 0
service/his_service.go Näytä tiedosto

@@ -1748,3 +1748,9 @@ func GetDrugByID(drug_id int64) (drug models.BaseDrugLib, err error) {
1748 1748
 	err = readDb.Model(&models.BaseDrugLib{}).Where("id = ?", drug_id).First(&drug).Error
1749 1749
 	return
1750 1750
 }
1751
+
1752
+
1753
+func GetBbx01ByTeamID(team_id int64)(team models.XtHisProjectTeam){
1754
+	err = readDb.Model(&models.XtHisProjectTeam{}).Where("id = ?", team_id).First(&team).Error
1755
+	return
1756
+}

+ 2 - 2
service/jx_service.go Näytä tiedosto

@@ -546,8 +546,8 @@ func Jxyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
546 546
 		feedetailInfo["bilg_dr_name"] = item.DoctorName              // 开单医师姓名
547 547
 		feedetailInfo["acord_dept_codg"] = ""                        // 受单科室编码
548 548
 		feedetailInfo["acord_dept_name"] = ""                        // 受单科室名称
549
-		feedetailInfo["orders_dr_code"] = ""                         // 受单医生编码
550
-		feedetailInfo["orders_dr_name"] = ""                         // 受单医生姓名
549
+		feedetailInfo["orders_dr_code"] = item.DoctorNumber                         // 受单医生编码
550
+		feedetailInfo["orders_dr_name"] = item.DoctorName                         // 受单医生姓名
551 551
 		if balance_accounts_type == "8" {
552 552
 			feedetailInfo["hosp_appr_flag"] = "2" // 医院审批标志
553 553
 		} else {