Explorar el Código

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx hace 4 años
padre
commit
f668fc1938
Se han modificado 2 ficheros con 4 adiciones y 13 borrados
  1. 2 11
      controllers/sz/sz_his_api_controller.go
  2. 2 2
      service/sz_his_service.go

+ 2 - 11
controllers/sz/sz_his_api_controller.go Ver fichero

@@ -809,10 +809,8 @@ func (c *SZHisApiController) GetRegisterInfo() {
809 809
 	}
810 810
 	//doctorInfo, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, doctor)
811 811
 	doctorDepartment, _ := service.GetDepartMentDetail(department)
812
-
813 812
 	adminRole, _ := service.GetAdminUserInfoByID(adminInfo.CurrentOrgId, admin_user_id)
814 813
 	his, _ := service.GetHisPatientInfo(adminInfo.CurrentOrgId, patient_id, theTime.Unix())
815
-
816 814
 	var custom_code string
817 815
 	var custom_project_name string
818 816
 	var allPrice float64
@@ -847,28 +845,21 @@ func (c *SZHisApiController) GetRegisterInfo() {
847 845
 
848 846
 		break
849 847
 	}
850
-
851 848
 	if his.ID == 0 {
852
-
853 849
 		var opera_name string
854 850
 		var opera_code string
855 851
 		if adminRole.ID == 0 {
856
-
857 852
 			opera_name = "管理员"
858 853
 			opera_code = "01"
859
-
860 854
 		} else {
861 855
 			opera_name = adminRole.UserName
862 856
 			opera_code = strconv.FormatInt(admin_user_id, 10)
863
-
864 857
 		}
865 858
 		month := time.Unix(1557042972, 0).Format("1")
866 859
 		year := time.Now().Format("2006")
867 860
 		month = time.Now().Format("01")
868 861
 		day := time.Now().Format("02")
869
-
870 862
 		//流水号
871
-		//
872 863
 		number := miConfig.Code + year + month + day +
873 864
 			fmt.Sprintf("%07v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000000)) // 定点协议机构编码(5位)+日期(8位)+流水号(7位)
874 865
 		mz_number := miConfig.Code + year + month + day +
@@ -1977,8 +1968,8 @@ func (c *SZHisApiController) GetSettleInfo() {
1977 1968
 			//根据业务的人员信息跟设备读社保卡获取的信息进行匹配,判断是否为同一个人,相同则进行挂号操作,不同则报错
1978 1969
 			tempPatient, _ := service.GetPatientByNumber(id_card_number, adminUser.CurrentOrgId)
1979 1970
 			if tempPatient.ID == patient_id {
1980
-
1981
-				result_three := service.SzybFY005(doctor_name, doctor_code, miConfig.Code, total, yiliao_number, verifyCode, number, mz_number, version_code, drug_doctor_code, drug_doctor_name, his.MedicalTreatmentType)
1971
+				sick, _ := service.FindSickById(patientPrescription.SickType)
1972
+				result_three := service.SzybFY005(doctor_name, doctor_code, miConfig.Code, total, yiliao_number, verifyCode, number, mz_number, version_code, drug_doctor_code, drug_doctor_name, his.MedicalTreatmentType, sick.CountryCode)
1982 1973
 				var dat map[string]interface{}
1983 1974
 				if err := json.Unmarshal([]byte(result_three), &dat); err == nil {
1984 1975
 					fmt.Println(dat)

+ 2 - 2
service/sz_his_service.go Ver fichero

@@ -314,7 +314,7 @@ func SzybFY004(doctor string, doctor_code string, fixmedins_code string, total f
314 314
 	str := string(respBytes)
315 315
 	return str
316 316
 }
317
-func SzybFY005(doctor string, doctor_code string, fixmedins_code string, total float64, account string, verify_code string, serial_number string, mz_number string, version_code string, drug_doctor string, drug_doctor_name string, medical_care int64) string {
317
+func SzybFY005(doctor string, doctor_code string, fixmedins_code string, total float64, account string, verify_code string, serial_number string, mz_number string, version_code string, drug_doctor string, drug_doctor_name string, medical_care int64, code string) string {
318 318
 	// 生成输入报文
319 319
 	inputMessage := SetSZInputMessage(doctor, doctor_code, fixmedins_code, verify_code, serial_number)
320 320
 	inputData := make(map[string]interface{})
@@ -326,7 +326,7 @@ func SzybFY005(doctor string, doctor_code string, fixmedins_code string, total f
326 326
 		inputData["aka130"] = "11"
327 327
 	} else if medical_care == 13 {
328 328
 		inputData["aka130"] = "13"
329
-		inputData["cka303"] = "Z99.2"
329
+		inputData["cka303"] = code
330 330
 	} else {
331 331
 		inputData["aka130"] = fmt.Sprintf("%d", medical_care)
332 332
 	}