瀏覽代碼

医保对接

csx 3 年之前
父節點
當前提交
9ed88eaf5f
共有 2 個文件被更改,包括 162 次插入16 次删除
  1. 158 8
      controllers/his_api_controller.go
  2. 4 8
      controllers/patient_api_controller.go

+ 158 - 8
controllers/his_api_controller.go 查看文件

5227
 	//var zhenChaCostPartSelfTotal float64 = 0 //其他费用
5227
 	//var zhenChaCostPartSelfTotal float64 = 0 //其他费用
5228
 
5228
 
5229
 	decimal.DivisionPrecision = 2
5229
 	decimal.DivisionPrecision = 2
5230
-
5231
-	if his.BalanceAccountsType != 2 {
5230
+	var BalanceAccountsType int64
5231
+	if his.ID > 0 {
5232
+		BalanceAccountsType = his.BalanceAccountsType
5233
+	} else {
5234
+		BalanceAccountsType = record.BalanceAccountsType
5235
+	}
5236
+	if BalanceAccountsType != 2 {
5232
 		for _, item := range order_info {
5237
 		for _, item := range order_info {
5233
 			if org_id == 10215 {
5238
 			if org_id == 10215 {
5234
 				if item.MedChrgitmType == "01" { //床位费
5239
 				if item.MedChrgitmType == "01" { //床位费
5383
 			"treatCostTotal":                      treatCostTotal,
5388
 			"treatCostTotal":                      treatCostTotal,
5384
 		})
5389
 		})
5385
 	} else {
5390
 	} else {
5386
-
5387
 		for _, item := range order_info {
5391
 		for _, item := range order_info {
5388
 			item.FulamtOwnpayAmt = item.DetItemFeeSumamt
5392
 			item.FulamtOwnpayAmt = item.DetItemFeeSumamt
5389
 			if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
5393
 			if item.HisDoctorAdviceInfo.ID > 0 && item.HisPrescriptionProject.ID == 0 { //药品
5390
 				item.MedChrgitmType = "09"
5394
 				item.MedChrgitmType = "09"
5391
-
5392
 			}
5395
 			}
5393
 			if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
5396
 			if item.HisPrescriptionProject.ID > 0 && item.HisDoctorAdviceInfo.ID == 0 {
5394
 				if item.HisPrescriptionProject.Type == 2 {
5397
 				if item.HisPrescriptionProject.Type == 2 {
5495
 			}
5498
 			}
5496
 		}
5499
 		}
5497
 
5500
 
5501
+		for _, item := range order_info {
5502
+			if org_id == 10215 {
5503
+				if item.MedChrgitmType == "01" { //床位费
5504
+					bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5505
+					//bedCostSelfTotal, _ = decimal.NewFromFloat(bedCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5506
+					//bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5507
+				}
5508
+				if item.MedChrgitmType == "02" { //诊察费
5509
+					zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5510
+					//zhenChaCostSelfTotal = zhenChaCostTotal
5511
+				}
5512
+
5513
+				if item.MedChrgitmType == "03" { //检查费
5514
+					checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5515
+					//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5516
+					//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5517
+				}
5518
+
5519
+				//if item.MedChrgitmType == "02" { //检查费
5520
+				//	checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5521
+				//	//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5522
+				//	//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5523
+				//}
5524
+
5525
+				if item.MedChrgitmType == "04" { //化验费
5526
+					laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5527
+					//laboratoryCostSelfTotal, _ = decimal.NewFromFloat(laboratoryCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5528
+					//laboratoryCostPartSelfTotal, _ = decimal.NewFromFloat(laboratoryCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5529
+				}
5530
+
5531
+				if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
5532
+					treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5533
+					//treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5534
+					//treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5535
+				}
5536
+
5537
+				if item.MedChrgitmType == "06" { //手术费
5538
+					operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5539
+					//operationCostSelfTotal, _ = decimal.NewFromFloat(operationCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5540
+					//operationCostPartSelfTotal, _ = decimal.NewFromFloat(operationCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5541
+				}
5542
+
5543
+				if item.MedChrgitmType == "08" { //材料费
5544
+					materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5545
+					//materialCostSelfTotal, _ = decimal.NewFromFloat(materialCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5546
+					//materialCostPartSelfTotal, _ = decimal.NewFromFloat(materialCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5547
+				}
5548
+
5549
+				if item.MedChrgitmType == "09" { //西药费
5550
+					westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5551
+					//westernMedicineCostSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5552
+					//westernMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5553
+				}
5554
+
5555
+				if item.MedChrgitmType == "11" { //中成费
5556
+					chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5557
+					//chineseTraditionalMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5558
+					//chineseTraditionalMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5559
+				}
5560
+
5561
+				if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" { //其他费
5562
+					otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5563
+					//otherCostSelfTotal, _ = decimal.NewFromFloat(otherCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5564
+					//otherCostPartSelfTotal, _ = decimal.NewFromFloat(otherCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5565
+				}
5566
+
5567
+			} else {
5568
+
5569
+				if item.MedChrgitmType == "01" { //床位费
5570
+					bedCostTotal, _ = decimal.NewFromFloat(bedCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5571
+					//bedCostSelfTotal, _ = decimal.NewFromFloat(bedCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5572
+					//bedCostPartSelfTotal, _ = decimal.NewFromFloat(bedCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5573
+				}
5574
+				//if item.MedChrgitmType == "02" { //诊察费
5575
+				//	zhenChaCostTotal, _ = decimal.NewFromFloat(zhenChaCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5576
+				//	//zhenChaCostSelfTotal = zhenChaCostTotal
5577
+				//}
5578
+
5579
+				if item.MedChrgitmType == "03" { //检查费
5580
+					checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5581
+					//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5582
+					//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5583
+				}
5584
+
5585
+				//if item.MedChrgitmType == "02" { //检查费
5586
+				//	checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5587
+				//	//checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5588
+				//	//checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5589
+				//}
5590
+
5591
+				if item.MedChrgitmType == "04" { //化验费
5592
+					laboratoryCostTotal, _ = decimal.NewFromFloat(laboratoryCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5593
+					//laboratoryCostSelfTotal, _ = decimal.NewFromFloat(laboratoryCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5594
+					//laboratoryCostPartSelfTotal, _ = decimal.NewFromFloat(laboratoryCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5595
+				}
5596
+
5597
+				if item.MedChrgitmType == "05" || item.MedChrgitmType == "1402" || item.MedChrgitmType == "1403" { //治疗费
5598
+					treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5599
+					//treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5600
+					//treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5601
+				}
5602
+
5603
+				if item.MedChrgitmType == "06" { //手术费
5604
+					operationCostTotal, _ = decimal.NewFromFloat(operationCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5605
+					//operationCostSelfTotal, _ = decimal.NewFromFloat(operationCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5606
+					//operationCostPartSelfTotal, _ = decimal.NewFromFloat(operationCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5607
+				}
5608
+
5609
+				if item.MedChrgitmType == "08" { //材料费
5610
+					materialCostTotal, _ = decimal.NewFromFloat(materialCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5611
+					//materialCostSelfTotal, _ = decimal.NewFromFloat(materialCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5612
+					//materialCostPartSelfTotal, _ = decimal.NewFromFloat(materialCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5613
+				}
5614
+
5615
+				if item.MedChrgitmType == "09" { //西药费
5616
+					westernMedicineCostTotal, _ = decimal.NewFromFloat(westernMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5617
+					//westernMedicineCostSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5618
+					//westernMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(westernMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5619
+				}
5620
+
5621
+				if item.MedChrgitmType == "11" { //中成费
5622
+					chineseTraditionalMedicineCostTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5623
+					//chineseTraditionalMedicineCostSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5624
+					//chineseTraditionalMedicineCostPartSelfTotal, _ = decimal.NewFromFloat(chineseTraditionalMedicineCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5625
+				}
5626
+
5627
+				if item.MedChrgitmType == "14" || item.MedChrgitmType == "0" || item.MedChrgitmType == "12" || item.MedChrgitmType == "02" { //其他费
5628
+					otherCostTotal, _ = decimal.NewFromFloat(otherCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5629
+					//otherCostSelfTotal, _ = decimal.NewFromFloat(otherCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5630
+					//otherCostPartSelfTotal, _ = decimal.NewFromFloat(otherCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5631
+				}
5632
+
5633
+			}
5634
+
5635
+		}
5636
+
5498
 		c.ServeSuccessJSON(map[string]interface{}{
5637
 		c.ServeSuccessJSON(map[string]interface{}{
5499
 			"order":                               order,
5638
 			"order":                               order,
5500
 			"order_info":                          order_info,
5639
 			"order_info":                          order_info,
5869
 				zhenChaCostPartSelfTotal, _ = decimal.NewFromFloat(zhenChaCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6008
 				zhenChaCostPartSelfTotal, _ = decimal.NewFromFloat(zhenChaCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
5870
 			}
6009
 			}
5871
 
6010
 
5872
-			if item.MedChrgitmType == "03" { //检查费
5873
-				checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5874
-				checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5875
-				checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6011
+			if c.GetAdminUserInfo().CurrentOrgId == 10188 {
6012
+				if item.MedChrgitmType == "03" { //检查费
6013
+					treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
6014
+					treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
6015
+					treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6016
+
6017
+				}
6018
+			} else {
6019
+				if item.MedChrgitmType == "03" { //检查费
6020
+					checkCostTotal, _ = decimal.NewFromFloat(checkCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
6021
+					checkCostSelfTotal, _ = decimal.NewFromFloat(checkCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
6022
+					checkCostPartSelfTotal, _ = decimal.NewFromFloat(checkCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6023
+				}
6024
+
5876
 			}
6025
 			}
5877
 
6026
 
5878
 			if item.MedChrgitmType == "04" { //化验费
6027
 			if item.MedChrgitmType == "04" { //化验费
5885
 				treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
6034
 				treatCostTotal, _ = decimal.NewFromFloat(treatCostTotal).Add(decimal.NewFromFloat(item.DetItemFeeSumamt)).Float64()
5886
 				treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
6035
 				treatCostSelfTotal, _ = decimal.NewFromFloat(treatCostSelfTotal).Add(decimal.NewFromFloat(item.OverlmtAmt)).Float64()
5887
 				treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6036
 				treatCostPartSelfTotal, _ = decimal.NewFromFloat(treatCostPartSelfTotal).Add(decimal.NewFromFloat(item.PreselfpayAmt)).Float64()
6037
+
5888
 			}
6038
 			}
5889
 
6039
 
5890
 			if item.MedChrgitmType == "06" { //手术费
6040
 			if item.MedChrgitmType == "06" { //手术费

+ 4 - 8
controllers/patient_api_controller.go 查看文件

3623
 				fmt.Println(item_id)
3623
 				fmt.Println(item_id)
3624
 
3624
 
3625
 				item, _ := items["item"].(string)
3625
 				item, _ := items["item"].(string)
3626
+
3626
 				fmt.Println(items["item"].(string))
3627
 				fmt.Println(items["item"].(string))
3627
 
3628
 
3628
 				item_name, _ := items["item_name"].(string)
3629
 				item_name, _ := items["item_name"].(string)
3881
 	}
3882
 	}
3882
 	patient.Source = source
3883
 	patient.Source = source
3883
 
3884
 
3885
+	zb_patient_id := patientBody["zb_patient_id"].(string)
3886
+	patient.ZbPatientId = zb_patient_id
3887
+
3884
 	if patientBody["is_hospital_first_dialysis"] != nil && reflect.TypeOf(patientBody["is_hospital_first_dialysis"]).String() == "float64" {
3888
 	if patientBody["is_hospital_first_dialysis"] != nil && reflect.TypeOf(patientBody["is_hospital_first_dialysis"]).String() == "float64" {
3885
 		isHospitalFirstDialysis := int64(patientBody["is_hospital_first_dialysis"].(float64))
3889
 		isHospitalFirstDialysis := int64(patientBody["is_hospital_first_dialysis"].(float64))
3886
 		patient.IsHospitalFirstDialysis = isHospitalFirstDialysis
3890
 		patient.IsHospitalFirstDialysis = isHospitalFirstDialysis
4096
 		patient.DialysisAge = dialysis_age
4100
 		patient.DialysisAge = dialysis_age
4097
 	}
4101
 	}
4098
 	fmt.Println(patient.DialysisAge)
4102
 	fmt.Println(patient.DialysisAge)
4099
-
4100
 	if patientBody["first_treatment_date"] != nil && reflect.TypeOf(patientBody["first_treatment_date"]).String() == "string" {
4103
 	if patientBody["first_treatment_date"] != nil && reflect.TypeOf(patientBody["first_treatment_date"]).String() == "string" {
4101
 		first_treatment_date := patientBody["first_treatment_date"].(string)
4104
 		first_treatment_date := patientBody["first_treatment_date"].(string)
4102
 		first_treatment_time, err := time.ParseInLocation(timeLayout, first_treatment_date, loc)
4105
 		first_treatment_time, err := time.ParseInLocation(timeLayout, first_treatment_date, loc)
4104
 			patient.FirstTreatmentDate = first_treatment_time.Unix()
4107
 			patient.FirstTreatmentDate = first_treatment_time.Unix()
4105
 		}
4108
 		}
4106
 	}
4109
 	}
4107
-
4108
 	if patientBody["expense_kind"] != nil && reflect.TypeOf(patientBody["expense_kind"]).String() == "float64" {
4110
 	if patientBody["expense_kind"] != nil && reflect.TypeOf(patientBody["expense_kind"]).String() == "float64" {
4109
 		expense_kind := int64(patientBody["expense_kind"].(float64))
4111
 		expense_kind := int64(patientBody["expense_kind"].(float64))
4110
 		patient.ExpenseKind = expense_kind
4112
 		patient.ExpenseKind = expense_kind
4111
 	}
4113
 	}
4112
-
4113
 	fmt.Println(patient.ExpenseKind)
4114
 	fmt.Println(patient.ExpenseKind)
4114
-
4115
 	if patientBody["tell_phone"] != nil && reflect.TypeOf(patientBody["tell_phone"]).String() == "string" {
4115
 	if patientBody["tell_phone"] != nil && reflect.TypeOf(patientBody["tell_phone"]).String() == "string" {
4116
 		tell_phone := patientBody["tell_phone"].(string)
4116
 		tell_phone := patientBody["tell_phone"].(string)
4117
 		patient.TellPhone = tell_phone
4117
 		patient.TellPhone = tell_phone
4118
 	}
4118
 	}
4119
-
4120
 	if patientBody["contact_name"] != nil && reflect.TypeOf(patientBody["contact_name"]).String() == "string" {
4119
 	if patientBody["contact_name"] != nil && reflect.TypeOf(patientBody["contact_name"]).String() == "string" {
4121
 		contact_name := patientBody["contact_name"].(string)
4120
 		contact_name := patientBody["contact_name"].(string)
4122
 		patient.ContactName = contact_name
4121
 		patient.ContactName = contact_name
4123
 	}
4122
 	}
4124
-
4125
 	if patientBody["troble_shoot"] != nil && reflect.TypeOf(patientBody["troble_shoot"]).String() == "float64" {
4123
 	if patientBody["troble_shoot"] != nil && reflect.TypeOf(patientBody["troble_shoot"]).String() == "float64" {
4126
 		troble_shoot := int64(patientBody["troble_shoot"].(float64))
4124
 		troble_shoot := int64(patientBody["troble_shoot"].(float64))
4127
 		patient.TrobleShoot = troble_shoot
4125
 		patient.TrobleShoot = troble_shoot
4128
 	}
4126
 	}
4129
-
4130
 	return
4127
 	return
4131
-
4132
 }
4128
 }
4133
 
4129
 
4134
 func (c *PatientApiController) GetPatientsByKeyWord() {
4130
 func (c *PatientApiController) GetPatientsByKeyWord() {