Bläddra i källkod

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

csx 4 år sedan
förälder
incheckning
f668fc1938
2 ändrade filer med 4 tillägg och 13 borttagningar
  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 Visa fil

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

+ 2 - 2
service/sz_his_service.go Visa fil

314
 	str := string(respBytes)
314
 	str := string(respBytes)
315
 	return str
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
 	inputMessage := SetSZInputMessage(doctor, doctor_code, fixmedins_code, verify_code, serial_number)
319
 	inputMessage := SetSZInputMessage(doctor, doctor_code, fixmedins_code, verify_code, serial_number)
320
 	inputData := make(map[string]interface{})
320
 	inputData := make(map[string]interface{})
326
 		inputData["aka130"] = "11"
326
 		inputData["aka130"] = "11"
327
 	} else if medical_care == 13 {
327
 	} else if medical_care == 13 {
328
 		inputData["aka130"] = "13"
328
 		inputData["aka130"] = "13"
329
-		inputData["cka303"] = "Z99.2"
329
+		inputData["cka303"] = code
330
 	} else {
330
 	} else {
331
 		inputData["aka130"] = fmt.Sprintf("%d", medical_care)
331
 		inputData["aka130"] = fmt.Sprintf("%d", medical_care)
332
 	}
332
 	}