瀏覽代碼

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

csx 3 年之前
父節點
當前提交
b65f00305d
共有 2 個文件被更改,包括 34 次插入34 次删除
  1. 3 3
      controllers/sz/sz_his_api_controller.go
  2. 31 31
      service/gdyb_service.go

+ 3 - 3
controllers/sz/sz_his_api_controller.go 查看文件

@@ -2209,7 +2209,7 @@ func (c *SZHisApiController) GetSettleInfo() {
2209 2209
 		ids = append(ids, item.ID)
2210 2210
 	}
2211 2211
 
2212
-	patientPrescription, _ := service.FindPatientPrescriptionInfo(adminUser.CurrentOrgId, patient_id, recordDateTime)
2212
+	patientPrescription, _ := service.FindHisPatientPrescriptionInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
2213 2213
 
2214 2214
 	sick, _ := service.FindSickById(patientPrescription.SickType)
2215 2215
 
@@ -2221,7 +2221,7 @@ func (c *SZHisApiController) GetSettleInfo() {
2221 2221
 	adminRole_two, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, patientPrescription.DoctorId)
2222 2222
 
2223 2223
 	adminRole, _ := service.GetAdminUserInfoByID(adminUser.CurrentOrgId, admin_user_id)
2224
-	his, err := service.GetHisPatientInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
2224
+	his, err := service.GetNewHisPatientInfo(adminUser.CurrentOrgId, his_patient_id, recordDateTime)
2225 2225
 	mz_number := his.Number
2226 2226
 	number := miConfig.Code + year + month + day +
2227 2227
 		fmt.Sprintf("%07v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(10000000)) // 定点协议机构编码(5位)+日期(8位)+流水号(7位)
@@ -2473,7 +2473,7 @@ func (c *SZHisApiController) GetSettleInfo() {
2473 2473
 			}
2474 2474
 		}
2475 2475
 		service.UpDatePrescriptionNumber(adminUser.CurrentOrgId, ids, chrg_bchno)
2476
-		service.UpDatePrescriptionInfoNumber(adminUser.CurrentOrgId, patient_id, chrg_bchno, recordDateTime)
2476
+		service.UpDateHisPrescriptionInfoNumber(adminUser.CurrentOrgId, his_patient_id, chrg_bchno, recordDateTime)
2477 2477
 		var total float64
2478 2478
 		for _, item := range prescriptions {
2479 2479
 			if item.Type == 1 { //药品

+ 31 - 31
service/gdyb_service.go 查看文件

@@ -234,17 +234,17 @@ func Gdyb2201(psnNo string, insutype string, certNo string, org_name string, doc
234 234
 	nonce := GetRandomString(32)
235 235
 	timestamp := time.Now().Unix()
236 236
 	signature := setSignature(timestamp, nonce, secret_key)
237
-	//tempTime := time.Unix(timestamp, 0)
238
-	//timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
237
+	tempTime := time.Unix(timestamp, 0)
238
+	timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
239 239
 
240 240
 	// 生成输入报文
241 241
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
242 242
 	input := make(map[string]interface{})
243 243
 	inputData := make(map[string]interface{})
244
-	inputMessage["infno"] = "2201"                // 交易编码
245
-	inputData["psn_no"] = psnNo                   // 人员编号 (来自1101接口返回)
246
-	inputData["insutype"] = insutype              // 险种类型(来自1101接口返回)
247
-	inputData["begntime"] = "2021-04-10 12:20:30" // 开始时间
244
+	inputMessage["infno"] = "2201"        // 交易编码
245
+	inputData["psn_no"] = psnNo           // 人员编号 (来自1101接口返回)
246
+	inputData["insutype"] = insutype      // 险种类型(来自1101接口返回)
247
+	inputData["begntime"] = timeFormatOne // 开始时间
248 248
 
249 249
 	//if id_card_type == 1 {
250 250
 	//	inputData["mdtrt_cert_type"] = "03" // 就诊凭证类型
@@ -376,8 +376,8 @@ func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, di
376 376
 	nonce := GetRandomString(32)
377 377
 	timestamp := time.Now().Unix()
378 378
 	signature := setSignature(timestamp, nonce, secret_key)
379
-	//tempTime := time.Unix(timestamp, 0)
380
-	//timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
379
+	tempTime := time.Unix(timestamp, 0)
380
+	timeFormatOne := tempTime.Format("2006-01-02 15:04:05")
381 381
 
382 382
 	// 生成输入报文
383 383
 	inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
@@ -385,28 +385,28 @@ func Gdyb2203(psnNo string, mdtrtId string, doctor string, department string, di
385 385
 	inputData := make(map[string]interface{})
386 386
 	diseinfo := make([]map[string]interface{}, 0)
387 387
 
388
-	inputMessage["infno"] = "2203"   // 交易编码
389
-	inputData["mdtrt_id"] = mdtrtId  // 就诊 ID(来自2201接口返回)
390
-	inputData["psn_no"] = psnNo      // 人员编号 (来自1101接口返回)
391
-	inputData["med_type"] = med_type // 医疗类别 16门诊特殊病
392
-	//inputData["begntime"] = timeFormatOne // 开始时间
393
-	inputData["begntime"] = "2021-04-10 12:20:30" // 开始时间
394
-	inputData["main_cond_dscr"] = ""              // 主要病情描述
395
-	inputData["dise_codg"] = sick_code            // 病种编码
396
-	inputData["dise_name"] = sick_name            // 病种名称
397
-	inputData["birctrl_type"] = ""                // 计划生育手术类别
398
-	inputData["birctrl_matn_date"] = ""           // 计划生育手术或生育日期
388
+	inputMessage["infno"] = "2203"        // 交易编码
389
+	inputData["mdtrt_id"] = mdtrtId       // 就诊 ID(来自2201接口返回)
390
+	inputData["psn_no"] = psnNo           // 人员编号 (来自1101接口返回)
391
+	inputData["med_type"] = med_type      // 医疗类别 16门诊特殊病
392
+	inputData["begntime"] = timeFormatOne // 开始时间
393
+	//inputData["begntime"] = "2021-04-10 12:20:30" // 开始时间
394
+	inputData["main_cond_dscr"] = ""    // 主要病情描述
395
+	inputData["dise_codg"] = sick_code  // 病种编码
396
+	inputData["dise_name"] = sick_name  // 病种名称
397
+	inputData["birctrl_type"] = ""      // 计划生育手术类别
398
+	inputData["birctrl_matn_date"] = "" // 计划生育手术或生育日期
399 399
 
400 400
 	diseinfo_sun := make(map[string]interface{})
401
-	diseinfo_sun["diag_type"] = "1"         // 诊断类别
402
-	diseinfo_sun["diag_srt_no"] = "1"       // 诊断排序号
403
-	diseinfo_sun["diag_code"] = diag_code   // 诊断代码
404
-	diseinfo_sun["diag_name"] = diag        // 诊断名称
405
-	diseinfo_sun["diag_dept"] = department  // 诊断科室
406
-	diseinfo_sun["dise_dor_no"] = doctor_id // 诊断医生编码
407
-	diseinfo_sun["dise_dor_name"] = doctor  // 诊断医生姓名
408
-	//diseinfo_sun["diag_time"] = timeFormatOne // 诊断时间
409
-	diseinfo_sun["diag_time"] = "2021-04-10 12:20:30"
401
+	diseinfo_sun["diag_type"] = "1"           // 诊断类别
402
+	diseinfo_sun["diag_srt_no"] = "1"         // 诊断排序号
403
+	diseinfo_sun["diag_code"] = diag_code     // 诊断代码
404
+	diseinfo_sun["diag_name"] = diag          // 诊断名称
405
+	diseinfo_sun["diag_dept"] = department    // 诊断科室
406
+	diseinfo_sun["dise_dor_no"] = doctor_id   // 诊断医生编码
407
+	diseinfo_sun["dise_dor_name"] = doctor    // 诊断医生姓名
408
+	diseinfo_sun["diag_time"] = timeFormatOne // 诊断时间
409
+	//diseinfo_sun["diag_time"] = "2021-04-10 12:20:30"
410 410
 	diseinfo_sun["vali_flag"] = "1" // 有效标志
411 411
 
412 412
 	diseinfo = append(diseinfo, diseinfo_sun)
@@ -478,7 +478,7 @@ func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, d
478 478
 	inputData["psn_no"] = psnNo           // 人员编号 (来自1101接口返回)
479 479
 	inputData["med_type"] = med_type      // 医疗类别 16门诊特殊病
480 480
 	inputData["begntime"] = timeFormatOne // 开始时间
481
-	inputData["begntime"] = "2021-04-10 12:20:30"
481
+	//inputData["begntime"] = "2021-04-10 12:20:30"
482 482
 
483 483
 	inputData["main_cond_dscr"] = ""    // 主要病情描述
484 484
 	inputData["dise_codg"] = sick_code  // 病种编码
@@ -498,7 +498,7 @@ func Gdyb2203A(psnNo string, mdtrtId string, doctor string, department string, d
498 498
 	diseinfo_sun["dise_dor_no"] = doctor_id   // 诊断医生编码
499 499
 	diseinfo_sun["dise_dor_name"] = doctor    // 诊断医生姓名
500 500
 	diseinfo_sun["diag_time"] = timeFormatOne // 诊断时间
501
-	diseinfo_sun["diag_time"] = "2021-04-10 12:20:30"
501
+	//diseinfo_sun["diag_time"] = "2021-04-10 12:20:30"
502 502
 
503 503
 	diseinfo_sun["vali_flag"] = "1" // 有效标志
504 504
 
@@ -691,7 +691,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
691 691
 		feedetailInfo["rxno"] = ""                     // 处方号
692 692
 		feedetailInfo["rx_circ_flag"] = "0"            // 外购处方标志
693 693
 		feedetailInfo["fee_ocur_time"] = timeFormatOne // 费用发生时间
694
-		feedetailInfo["fee_ocur_time"] = "2021-04-10 12:20:30"
694
+		//feedetailInfo["fee_ocur_time"] = "2021-04-10 12:20:30"
695 695
 
696 696
 		feedetailInfo["med_list_codg"] = item.MedListCodg            // 医疗目录编码
697 697
 		feedetailInfo["medins_list_codg"] = fixmedins_code           // 医药机构目录编码