Browse Source

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

csx 2 years ago
parent
commit
b7579e980e

+ 41 - 0
controllers/js/jsyb_controller.go View File

@@ -48,6 +48,8 @@ func JSybRegistRouters() {
48 48
 	beego.Router("/jsyb/3101", &JSybController{}, "post:Get3101")
49 49
 	beego.Router("/jsyb/3102", &JSybController{}, "post:Get3102")
50 50
 
51
+	beego.Router("/jsyb/4101", &JSybController{}, "post:Get4101")
52
+
51 53
 	//beego.Router("/jsyb/2503", &JSybController{}, "get:Get2503")
52 54
 
53 55
 	beego.Router("/jsyb/readcard", &JSybController{}, "get:ReadCard")
@@ -1172,3 +1174,42 @@ func (c *JSybController) Get3102() {
1172 1174
 		"request_log": dat2,
1173 1175
 	})
1174 1176
 }
1177
+
1178
+func (c *JSybController) Get4101() {
1179
+	body, _ := ioutil.ReadAll(c.Ctx.Request.Body)
1180
+	var respJSON map[string]interface{}
1181
+	if err := json.Unmarshal([]byte(string(body)), &respJSON); err != nil {
1182
+		utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
1183
+		return
1184
+	}
1185
+	struct4101UserJSONBytes, _ := json.Marshal(respJSON["struct4101"])
1186
+	var struct4101 service.Struct4101
1187
+	if err := json.Unmarshal(struct4101UserJSONBytes, &struct4101); err != nil {
1188
+		utils.ErrorLog("解析失败:%v", err)
1189
+		return
1190
+	}
1191
+	ppUserJSONBytes, _ := json.Marshal(respJSON["pp"])
1192
+	var pp models.PublicParams
1193
+	if err := json.Unmarshal(ppUserJSONBytes, &pp); err != nil {
1194
+		utils.ErrorLog("解析失败:%v", err)
1195
+		return
1196
+	}
1197
+	request, result := service.Jsyb4101(struct4101, pp)
1198
+	var dat map[string]interface{}
1199
+	if err := json.Unmarshal([]byte(result), &dat); err == nil {
1200
+		fmt.Println(dat)
1201
+	} else {
1202
+		fmt.Println(err)
1203
+	}
1204
+	var dat2 map[string]interface{}
1205
+	if err := json.Unmarshal([]byte(request), &dat2); err == nil {
1206
+		fmt.Println(dat2)
1207
+	} else {
1208
+		fmt.Println(err)
1209
+	}
1210
+	saveJsLog(result, request, "4101", "上传明细清单", pp.FixmedinsName)
1211
+	c.ServeSuccessJSON(map[string]interface{}{
1212
+		"pre":         dat,
1213
+		"request_log": dat2,
1214
+	})
1215
+}

+ 6 - 4
controllers/nm/nm_controller.go View File

@@ -41,12 +41,10 @@ func NmybRegistRouters() {
41 41
 	beego.Router("/nmyb/readcard", &NmController{}, "get:ReadCard")
42 42
 
43 43
 	beego.Router("/nmyb/3201", &NmController{}, "get:Get3201")
44
-	//beego.Router("/nmyb/3202", &NmController{}, "get:Get3202")
45
-
46
-	//beego.Router("/nmyb/3202", &NmController{}, "post:Get3102")
47
-
48 44
 	beego.Router("/nmyb/2202", &NmController{}, "get:Post2202")
49 45
 
46
+	beego.Router("/nmyb/4101", &NmController{}, "post:Post4101")
47
+
50 48
 }
51 49
 
52 50
 type ReadCardResult struct {
@@ -144,6 +142,10 @@ type ResultTwo10265 struct {
144 142
 	WarnInfo    interface{} `json:"warn_info"`
145 143
 }
146 144
 
145
+func (c *NmController) Post4101() {
146
+
147
+}
148
+
147 149
 func (c *NmController) Post2202() {
148 150
 
149 151
 	result, requestLog := service.Gdyb2202("150000CFSJM100000100005413", "20211227145332876188", "2021122714565410808111489", "赤峰费森血液透析中心", "李彩星", "150402", "150499", "MSDBYGxXm1Mtyi3PtOUB7n1ktcxwyW57", "H15049901371")

+ 83 - 13
controllers/sg/his_api_controller.go View File

@@ -2370,22 +2370,79 @@ func (c *HisApiController) GetSettleList() {
2370 2370
 	struct4101.IteminfoStruct = iteminfoStructs
2371 2371
 	struct4101.Ntly = "中国"
2372 2372
 	struct4101.AdmCaty = "A03.06"
2373
-	result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.UserOrgId)
2374
-	fmt.Println(result)
2375 2373
 
2376
-	var dat map[string]interface{}
2377
-	if err := json.Unmarshal([]byte(result), &dat); err == nil {
2378
-		fmt.Println(dat)
2379
-	} else {
2380
-		fmt.Println(err)
2381
-	}
2382
-	userJSONBytes, _ := json.Marshal(dat)
2383 2374
 	var res ResultSeventeen
2384
-	if err := json.Unmarshal(userJSONBytes, &res); err != nil {
2385
-		utils.ErrorLog("解析失败:%v", err)
2386
-		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2387
-		return
2375
+
2376
+	if miConfig.MdtrtareaAdmvs == "320921" || miConfig.MdtrtareaAdmvs == "320982" {
2377
+		var resOther ResultSeventeenOther
2378
+		var pp models.PublicParams
2379
+		pp.InsuplcAdmdvs = miConfig.InsuplcAdmdvs
2380
+		pp.MdtrtareaAdmvs = miConfig.MdtrtareaAdmvs
2381
+		pp.FixmedinsName = miConfig.OrgName
2382
+		pp.FixmedinsCode = miConfig.Code
2383
+		pp.RequestUrl = miConfig.Url
2384
+		pp.Cainfo = miConfig.Cainfo
2385
+		pp.SecretKey = miConfig.SecretKey
2386
+		pp.AccessKey = miConfig.AccessKey
2387
+		pp.OpterName = curRoles.UserName
2388
+
2389
+		client := &http.Client{}
2390
+		var req *http.Request
2391
+		data := make(map[string]interface{})
2392
+		data["struct4101"] = struct4101
2393
+		data["pp"] = pp
2394
+		bytesData, _ := json.Marshal(data)
2395
+		if miConfig.MdtrtareaAdmvs == "320921" {
2396
+			req, _ = http.NewRequest("POST", "http://192.168.3.111:9532/"+"jsyb/4101", bytes.NewReader(bytesData))
2397
+		} else {
2398
+			req, _ = http.NewRequest("POST", "http://192.168.5.251:9532/"+"jsyb/4101", bytes.NewReader(bytesData))
2399
+		}
2400
+		resp, _ := client.Do(req)
2401
+		defer resp.Body.Close()
2402
+		body, ioErr := ioutil.ReadAll(resp.Body)
2403
+		if ioErr != nil {
2404
+			utils.ErrorLog("接口返回数据读取失败: %v", ioErr)
2405
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2406
+			return
2407
+		}
2408
+		var respJSON map[string]interface{}
2409
+		if err := json.Unmarshal([]byte(body), &respJSON); err != nil {
2410
+			utils.ErrorLog("接口返回数据解析JSON失败: %v", err)
2411
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2412
+			return
2413
+		}
2414
+
2415
+		respJSON = respJSON["data"].(map[string]interface{})["pre"].(map[string]interface{})
2416
+		userJSONBytes, _ := json.Marshal(respJSON)
2417
+		fmt.Println("log")
2418
+		fmt.Println(string(userJSONBytes))
2419
+		if err := json.Unmarshal(userJSONBytes, &resOther); err != nil {
2420
+			utils.ErrorLog("解析失败:%v", err)
2421
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2422
+			return
2423
+		}
2424
+		res.InfRefmsgid = resOther.InfRefmsgid
2425
+		res.Output = resOther.Output
2426
+		res.ErrMsg = resOther.ErrMsg
2427
+		infocode, _ := strconv.ParseInt(resOther.Infcode, 10, 64)
2428
+		res.Infcode = infocode
2429
+	} else {
2430
+
2431
+		result := service.Gdyb4101(struct4101, miConfig.SecretKey, miConfig.OrgName, curRoles.UserName, miConfig.Code, miConfig.InsuplcAdmdvs, miConfig.MdtrtareaAdmvs, miConfig.UserOrgId)
2432
+		var dat map[string]interface{}
2433
+		if err := json.Unmarshal([]byte(result), &dat); err == nil {
2434
+			fmt.Println(dat)
2435
+		} else {
2436
+			fmt.Println(err)
2437
+		}
2438
+		userJSONBytes, _ := json.Marshal(dat)
2439
+		if err := json.Unmarshal(userJSONBytes, &res); err != nil {
2440
+			utils.ErrorLog("解析失败:%v", err)
2441
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
2442
+			return
2443
+		}
2388 2444
 	}
2445
+
2389 2446
 	if res.Infcode != 0 {
2390 2447
 
2391 2448
 		c.ServeSuccessJSON(map[string]interface{}{
@@ -4689,6 +4746,19 @@ type ResultSeventeen struct {
4689 4746
 	WarnInfo    string `json:"warn_info"`
4690 4747
 }
4691 4748
 
4749
+type ResultSeventeenOther struct {
4750
+	ErrMsg      string `json:"err_msg"`
4751
+	InfRefmsgid string `json:"inf_refmsgid"`
4752
+	Infcode     string `json:"infcode"`
4753
+	Output      struct {
4754
+		SetlListId string `json:"setl_list_id"`
4755
+	} `json:"output"`
4756
+	RefmsgTime  string `json:"refmsg_time"`
4757
+	RespondTime string `json:"respond_time"`
4758
+	Signtype    string `json:"signtype"`
4759
+	WarnInfo    string `json:"warn_info"`
4760
+}
4761
+
4692 4762
 type Result90991 struct {
4693 4763
 	ErrMsg      string `json:"err_msg"`
4694 4764
 	InfRefmsgid string `json:"inf_refmsgid"`

+ 2 - 2
controllers/zh/zh_his_api_controller.go View File

@@ -994,7 +994,7 @@ func (c *ZHHisApiController) GetZHInHospitalCheck() {
994 994
 			struct2401.MedType = strconv.FormatInt(int64(med_type), 10)
995 995
 		}
996 996
 		struct2401.IptNo = ipt_otp_no
997
-		struct2401.AtddrNo = strconv.FormatInt(int64(doctorInfo.AdminUserId), 10)
997
+		struct2401.AtddrNo = doctorInfo.DoctorNumber
998 998
 		struct2401.ChfpdrName = doctorInfo.UserName
999 999
 		struct2401.AdmDiagDscr = diagnosisConfig[0].ClassName
1000 1000
 		struct2401.AdmDeptCodg = strconv.FormatInt(int64(departmentInfo.ID), 10)
@@ -2131,7 +2131,7 @@ func (c *ZHHisApiController) GetUploadInfo() {
2131 2131
 				data["chrg_bchno"] = chrg_bchno
2132 2132
 				data["dept"] = strconv.FormatInt(department.ID, 10)
2133 2133
 				data["dept_code"] = department.Number
2134
-				data["doctor_code"] = strconv.FormatInt(doctor_info.ID, 10)
2134
+				data["doctor_code"] = doctor_info.DoctorNumber
2135 2135
 				data["doctor_name"] = doctor_info.UserName
2136 2136
 				data["org_name"] = miConfig.OrgName
2137 2137
 				data["opertor"] = roles.UserName

+ 0 - 1
main.go View File

@@ -17,7 +17,6 @@ import (
17 17
 func init() {
18 18
 	//service.ConnectDB()
19 19
 	//org_id, _ := beego.AppConfig.Int64("org_id")
20
-	//
21 20
 	//miConfig, _ := service.FindMedicalInsuranceInfo(org_id)
22 21
 	//CreateLog(miConfig)
23 22
 	//UploadLog(miConfig)

+ 6 - 2
service/gdyb_service.go View File

@@ -1853,9 +1853,13 @@ func Gdyb3201(baseParams models.BaseParams, businessParams models.BusinessParams
1853 1853
 	reader := bytes.NewReader(bytesData)
1854 1854
 	gdyb_url := beego.AppConfig.String("gdyb_url")
1855 1855
 	gdyb_paasid := beego.AppConfig.String("gdyb_paasid")
1856
-
1856
+	var url string
1857
+	if businessParams.MdtrtareaAdmvs == "150499" {
1858
+		url = gdyb_url
1859
+	} else {
1860
+		url = gdyb_url + "3201"
1861
+	}
1857 1862
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/1101"
1858
-	url := gdyb_url + "3201"
1859 1863
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_api/prd/hsa/hgs/3201"
1860 1864
 	//url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/3201"
1861 1865
 

+ 170 - 0
service/jsyb_service.go View File

@@ -1507,3 +1507,173 @@ func Jsyb3102(pd models.PatientDtos, fed models.FsiEncounterDtos, fdds []*models
1507 1507
 	return HttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData)), string(bytesData)
1508 1508
 
1509 1509
 }
1510
+
1511
+func Jsyb4101(struct4101 Struct4101, params models.PublicParams) (string, string) {
1512
+	timestamp := time.Now().Unix()
1513
+	inputMessage := SetJSInputMessage(timestamp, params.FixmedinsName, params.OpterName, params.FixmedinsCode, params.InsuplcAdmdvs, params.MdtrtareaAdmvs, params.Cainfo)
1514
+	// 生成输入报文
1515
+	input := make(map[string]interface{})
1516
+	inputData := make(map[string]interface{})
1517
+	inputMessage["infno"] = "4101A" // 交易编码
1518
+	year := time.Now().Format("2006")
1519
+	month := time.Now().Format("01")
1520
+	day := time.Now().Format("02")
1521
+
1522
+	inputData["mdtrt_id"] = struct4101.MdtrtId // 就诊 ID  必填(来自2201接口返回)
1523
+	inputData["setl_id"] = struct4101.SetlId   // 结算 ID  必填
1524
+	inputData["psn_no"] = struct4101.PsnNo     // 结算 ID  必填
1525
+
1526
+	inputData["fixmedins_name"] = params.FixmedinsName        // 定点医药机构名称  必填
1527
+	inputData["fixmedins_code"] = params.FixmedinsCode        // 定点医药机构编码  必填
1528
+	inputData["hi_setl_lv"] = ""                              // 医保结算等级
1529
+	inputData["hi_no"] = struct4101.PsnNo                     // 医保编号
1530
+	inputData["medcasno"] = struct4101.PsnNo                  // 病案号  必填
1531
+	inputData["dcla_time"] = year + "-" + month + "-" + day   // 申报时间  必填
1532
+	inputData["psn_name"] = struct4101.PsnName                // 人员姓名  必填
1533
+	inputData["gend"] = struct4101.Gend                       // 性别  必填
1534
+	inputData["brdy"] = struct4101.Brdy                       // 出生日期  必填
1535
+	inputData["age"] = struct4101.Age                         // 年龄  必填
1536
+	inputData["ntly"] = struct4101.Ntly                       // 国籍  必填
1537
+	inputData["nwb_age"] = ""                                 // 年龄  必填
1538
+	inputData["naty"] = struct4101.Naty                       // 民族  必填
1539
+	inputData["patn_cert_type"] = struct4101.PatnCertType     // 患者证件类别  必填
1540
+	inputData["certno"] = struct4101.Certno                   // 证件号码  必填
1541
+	inputData["prfs"] = struct4101.Prfs                       // 职业  必填
1542
+	inputData["curr_addr"] = ""                               // 现住址  必填
1543
+	inputData["emp_name"] = ""                                // 单位名称  必填
1544
+	inputData["emp_addr"] = ""                                // 单位地址  必填
1545
+	inputData["emp_tel"] = ""                                 // 单位电话  必填
1546
+	inputData["poscode"] = ""                                 // 邮编  必填
1547
+	inputData["coner_name"] = struct4101.ConerName            // 联系人姓名  必填
1548
+	inputData["patn_rlts"] = struct4101.PatnRlts              // 与患者关系  必填
1549
+	inputData["coner_addr"] = struct4101.ConerAddr            // 联系人地址  必填
1550
+	inputData["coner_tel"] = struct4101.ConerTel              // 联系人电话  必填
1551
+	inputData["hi_type"] = struct4101.HiType                  // 医保类型  必填
1552
+	inputData["insuplc"] = struct4101.Insuplc                 // 参保地  必填
1553
+	inputData["sp_psn_type"] = ""                             // 特殊人员类型  必填
1554
+	inputData["nwb_adm_type"] = ""                            // 新生儿入院类型  必填
1555
+	inputData["nwb_bir_wt"] = ""                              // 新生儿出生体重  必填
1556
+	inputData["nwb_adm_wt"] = ""                              // 新生儿入院体重  必填
1557
+	inputData["opsp_diag_caty"] = ""                          // 门诊慢特病诊断  必填
1558
+	inputData["opsp_mdtrt_date"] = ""                         // 门诊慢特病就诊日期  必填
1559
+	inputData["ipt_med_type"] = struct4101.IptMedType         // 住院医疗类型  必填
1560
+	inputData["adm_way"] = ""                                 // 入院途径  必填
1561
+	inputData["trt_type"] = ""                                // 治疗类别  必填
1562
+	inputData["adm_time"] = struct4101.AdmTime                // 入院时间  必填
1563
+	inputData["adm_caty"] = struct4101.AdmCaty                // 入院科别  必填
1564
+	inputData["refldept_dept"] = ""                           // 转科科别  必填
1565
+	inputData["dscg_time"] = struct4101.AdmEndTime            // 出院时间  必填
1566
+	inputData["dscg_caty"] = struct4101.AdmCaty               // 出院科别  必填
1567
+	inputData["act_ipt_days"] = ""                            // 实际住院天数  必填
1568
+	inputData["otp_wm_dise"] = ""                             // 门(急) 诊西医诊断  必填
1569
+	inputData["wm_dise_code"] = ""                            // 门(急) 诊中医诊断  必填
1570
+	inputData["otp_tcm_dise"] = ""                            // 西医诊断疾病代码  必填
1571
+	inputData["tcm_dise_code"] = ""                           // 中医诊断代码  必填
1572
+	inputData["oprn_oprt_code_cnt"] = ""                      // 手术操作代码计数  必填
1573
+	inputData["vent_used_dura"] = ""                          // 呼吸机使用时长  必填
1574
+	inputData["pwcry_bfadm_coma_dura"] = ""                   // 颅脑损伤患者入院前昏迷时长  必填
1575
+	inputData["pwcry_afadm_coma_dura"] = ""                   // 颅脑损伤患者入院后昏迷时长  必填
1576
+	inputData["bld_cat"] = ""                                 // 输血品种  必填
1577
+	inputData["bld_amt"] = ""                                 // 输血量  必填
1578
+	inputData["bld_unt"] = ""                                 // 输血计量单位  必填
1579
+	inputData["spga_nurscare_days"] = ""                      // 特级护理天数  必填
1580
+	inputData["lv1_nurscare_days"] = ""                       // 一级护理天数  必填
1581
+	inputData["scd_nurscare_days"] = ""                       // 二级护理天数  必填
1582
+	inputData["lv3_nurscare_days"] = ""                       // 三级护理天数  必填
1583
+	inputData["acp_medins_name"] = ""                         // 拟接收机构名称  必填
1584
+	inputData["acp_optins_code"] = ""                         // 拟接收机构代码  必填
1585
+	inputData["bill_code"] = struct4101.BillCode              // 票据代码  必填
1586
+	inputData["bill_no"] = struct4101.BillNo                  // 票据号码  必填
1587
+	inputData["biz_sn"] = struct4101.BizSn                    // 业务流水号  必填
1588
+	inputData["days_rinp_flag_31"] = ""                       // 出院 31 天内再住院计划标志  必填
1589
+	inputData["days_rinp_pup_31"] = ""                        // 出院 31 天内再住院目的  必填
1590
+	inputData["chfpdr_name"] = ""                             // 主诊医师姓名  必填
1591
+	inputData["chfpdr_code"] = ""                             // 主诊医师代码  必填
1592
+	inputData["setl_begn_date"] = struct4101.SetlBegnDate     // 结算开始日期  必填
1593
+	inputData["setl_end_date"] = struct4101.SetlEndDate       // 结算结束日期  必填
1594
+	inputData["psn_selfpay"] = struct4101.PsnSelfPay          // 个人自付  必填
1595
+	inputData["psn_ownpay"] = struct4101.PsnOwnPay            // 个人自费  必填
1596
+	inputData["acct_pay"] = struct4101.AcctPay                // 个人账户支出  必填
1597
+	inputData["hi_paymtd"] = struct4101.HiPaymtd              // 医保支付方式  必填
1598
+	inputData["hsorg"] = struct4101.Hsorg                     // 医保机构  必填
1599
+	inputData["hsorg_opter"] = struct4101.HsorgOpter          // 医保机构经办人  必填
1600
+	inputData["medins_fill_dept"] = struct4101.MedinsFillDept // 医疗机构填报部门  必填
1601
+	inputData["medins_fill_psn"] = struct4101.MedinsFillPsn   // 医疗机构填报人  必填
1602
+	inputData["psn_cashpay"] = struct4101.PsnCashpay          // 医疗机构填报人  必填
1603
+
1604
+	payinfo := make([]map[string]interface{}, 0) // 基金支付信息
1605
+	for _, item := range struct4101.CustomStruct {
1606
+		payinfotemp := make(map[string]interface{})
1607
+		if item.FundPayType == "310100" || item.FundPayType == "310200" || item.FundPayType == "320100" || item.FundPayType == "330100" || item.FundPayType == "340100" || item.FundPayType == "350100" || item.FundPayType == "370100" || item.FundPayType == "390100" || item.FundPayType == "610100" || item.FundPayType == "640100" || item.FundPayType == "620100" {
1608
+			payinfotemp["fund_pay_type"] = item.FundPayType // 基金支付类型  必填
1609
+			payinfotemp["fund_payamt"] = item.FundPayamt    // 基金支付金额
1610
+			payinfo = append(payinfo, payinfotemp)
1611
+		}
1612
+	}
1613
+	opspdiseinfo := make([]map[string]interface{}, 0) // 门诊慢特病诊断信息
1614
+
1615
+	opspdiseinfotemp := make(map[string]interface{})
1616
+	opspdiseinfotemp["diag_name"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagName      // 诊断名称  必填
1617
+	opspdiseinfotemp["diag_code"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagCode      // 诊断代码 必填
1618
+	opspdiseinfotemp["oprn_oprt_name"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagName // 手术操作名称 必填
1619
+	opspdiseinfotemp["oprn_oprt_code"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagCode // 手术操作代码 必填
1620
+	opspdiseinfo = append(opspdiseinfo, opspdiseinfotemp)
1621
+
1622
+	diseinfo := make([]map[string]interface{}, 0) // 住院诊断信息
1623
+	for _, item := range struct4101.Diseinfo {
1624
+		diseinfotemp := make(map[string]interface{})
1625
+		diseinfotemp["maindiag_flag"] = item.MaindiagFlag // 手术操作代码 必填
1626
+		diseinfotemp["diag_type"] = item.DiagType         // 诊断类别  必填
1627
+		diseinfotemp["diag_code"] = item.DiagCode         // 诊断代码 必填
1628
+		diseinfotemp["diag_name"] = item.DiagName         // 诊断名称 必填
1629
+		diseinfotemp["adm_cond_type"] = "3"               // 入院病情类型 必填
1630
+		diseinfo = append(diseinfo, diseinfotemp)
1631
+	}
1632
+
1633
+	iteminfo := make([]map[string]interface{}, 0)
1634
+	for _, item := range struct4101.IteminfoStruct {
1635
+		iteminfotemp := make(map[string]interface{})
1636
+		iteminfotemp["med_chrgitm"] = item.MedChrgitm            // 医疗收费项目  必填
1637
+		iteminfotemp["amt"] = item.Amt                           // 金额 必填
1638
+		iteminfotemp["claa_sumfee"] = item.ClaaSumfee            // 甲类费用合计 必填
1639
+		iteminfotemp["clab_amt"] = item.ClabAmt                  // 乙类金额 必填
1640
+		iteminfotemp["fulamt_ownpay_amt"] = item.FulamtOwnpayAmt // 全自费金额 必填
1641
+		iteminfotemp["oth_amt"] = item.OthAmt                    // 其他金额 必填
1642
+		iteminfo = append(iteminfo, iteminfotemp)
1643
+	}
1644
+
1645
+	oprninfo := make([]map[string]interface{}, 0) // 手术操作信息
1646
+	oprninfotemp := make(map[string]interface{})
1647
+	oprninfotemp["oprn_oprt_type"] = "" // 手术操作类别  必填
1648
+	oprninfotemp["oprn_oprt_name"] = "" // 手术操作名称 必填
1649
+	oprninfotemp["oprn_oprt_code"] = "" // 手术操作代码 必填
1650
+	oprninfotemp["oprn_oprt_date"] = "" // 手术操作日期 必填
1651
+	oprninfotemp["anst_way"] = ""       // 麻醉方式 必填
1652
+	oprninfotemp["oper_dr_name"] = ""   // 术者医师姓名 必填
1653
+	oprninfotemp["oper_dr_code"] = ""   // 术者医师代码 必填
1654
+	oprninfotemp["anst_dr_name"] = ""   // 麻醉医师姓名 必填
1655
+	oprninfotemp["anst_dr_code"] = ""   // 麻醉医师代码 必填
1656
+	oprninfo = append(oprninfo, oprninfotemp)
1657
+
1658
+	icuinfo := make([]map[string]interface{}, 0) // 重症监护信息
1659
+	icuinfotemp := make(map[string]interface{})
1660
+	icuinfotemp["scs_cutd_ward_type"] = ""   // 重症监护病房类型  必填
1661
+	icuinfotemp["scs_cutd_inpool_time"] = "" // 重症监护进入时间 必填
1662
+	icuinfotemp["scs_cutd_exit_time"] = ""   // 重症监护退出时间 必填
1663
+	icuinfotemp["scs_cutd_sum_dura"] = ""    // 重症监护合计时长 必填
1664
+	icuinfo = append(icuinfo, icuinfotemp)
1665
+
1666
+	input["setlinfo"] = inputData
1667
+	input["payinfo"] = payinfo
1668
+	input["opspdiseinfo"] = opspdiseinfo
1669
+	input["diseinfo"] = diseinfo
1670
+	input["iteminfo"] = iteminfo
1671
+
1672
+	inputMessage["input"] = input //交易输入
1673
+	bytesData, _ := json.Marshal(inputMessage)
1674
+	fmt.Println(string(bytesData))
1675
+
1676
+	params.RequestUrl = params.RequestUrl + "4101A"
1677
+	return HttpRequest(params.RequestUrl, params.AccessKey, params.SecretKey, timestamp, string(bytesData)), string(bytesData)
1678
+
1679
+}