张保健 4 年 前
コミット
4046e8a10f
共有3 個のファイルを変更した197 個の追加197 個の削除を含む
  1. 2 2
      controllers/his_project_api_controller.go
  2. 192 192
      service/gdyb_service.go
  3. 3 3
      service/his_project_service.go

+ 2 - 2
controllers/his_project_api_controller.go ファイルの表示

@@ -155,9 +155,9 @@ func (this *HisProjectApiController) GetProjectList() {
155 155
 	limit, _ := this.GetInt64("limit")
156 156
 	page, _ := this.GetInt64("page")
157 157
 	is_charge, _ := this.GetInt64("is_charge")
158
-	fmt.Println("is_charge==================", is_charge)
158
+
159 159
 	is_start, _ := this.GetInt64("is_start")
160
-	fmt.Println("is_start--------------------", is_start)
160
+
161 161
 	keyword := this.GetString("keyword")
162 162
 	projecList, total, err := service.GetHisProjectList(orgId, limit, page, is_charge, is_start, keyword)
163 163
 	fmt.Println("err", err)

+ 192 - 192
service/gdyb_service.go ファイルの表示

@@ -718,198 +718,198 @@ func Gdyb2208(psnNo string, mdtrtId string, setlId string, org_name string, doct
718 718
 }
719 719
 
720 720
 //  门诊结算撤销
721
-func Gdyb4101(psnNo string, mdtrtId string, setlId string) string {
722
-	// 生成签名
723
-	nonce := GetRandomString(32)
724
-	timestamp := time.Now().Unix()
725
-	signature := setSignature(timestamp, nonce)
726
-
727
-	// 生成输入报文
728
-	inputMessage := SetInputMessage(nonce, timestamp)
729
-	input := make(map[string]interface{})
730
-	inputData := make(map[string]interface{})
731
-	inputMessage["infno"] = "4101" // 交易编码
732
-
733
-	inputData["mdtrt_id"] = mdtrtId // 就诊 ID  必填(来自2201接口返回)
734
-	inputData["setl_id"] = setlId   // 结算 ID  必填
735
-	inputData["fixmedins_name"] = ""   // 定点医药机构名称  必填
736
-	inputData["fixmedins_code"] = ""   // 定点医药机构编码  必填
737
-	inputData["hi_setl_lv"] = ""   // 医保结算等级
738
-	inputData["hi_no"] = ""   // 医保编号
739
-	inputData["medcasno"] = ""   // 病案号  必填
740
-	inputData["dcla_time"] = ""   // 申报时间  必填
741
-	inputData["psn_name"] = ""   // 人员姓名  必填
742
-	inputData["gend"] = ""   // 性别  必填
743
-	inputData["brdy"] = ""   // 出生日期  必填
744
-	inputData["age"] = ""   // 年龄  必填
745
-	inputData["ntly"] = ""   // 国籍  必填
746
-	inputData["nwb_age"] = ""   // 年龄  必填
747
-	inputData["naty"] = ""   // 民族  必填
748
-	inputData["patn_cert_type"] = ""   // 患者证件类别  必填
749
-	inputData["certno"] = ""   // 证件号码  必填
750
-	inputData["prfs"] = ""   // 职业  必填
751
-	inputData["curr_addr"] = ""   // 现住址  必填
752
-	inputData["emp_name"] = ""   // 单位名称  必填
753
-	inputData["emp_addr"] = ""   // 单位地址  必填
754
-	inputData["emp_tel"] = ""   // 单位电话  必填
755
-	inputData["poscode"] = ""   // 邮编  必填
756
-	inputData["coner_name"] = ""   // 联系人姓名  必填
757
-	inputData["patn_rlts"] = ""   // 与患者关系  必填
758
-	inputData["coner_addr"] = ""   // 联系人地址  必填
759
-	inputData["coner_tel"] = ""   // 联系人电话  必填
760
-	inputData["hi_type"] = ""   // 医保类型  必填
761
-	inputData["insuplc"] = ""   // 参保地  必填
762
-	inputData["sp_psn_type"] = ""   // 特殊人员类型  必填
763
-	inputData["nwb_adm_type"] = ""   // 新生儿入院类型  必填
764
-	inputData["nwb_bir_wt"] = ""   // 新生儿出生体重  必填
765
-	inputData["nwb_adm_wt"] = ""   // 新生儿入院体重  必填
766
-	inputData["opsp_diag_caty"] = ""   // 门诊慢特病诊断  必填
767
-	inputData["opsp_mdtrt_date"] = ""   // 门诊慢特病就诊日期  必填
768
-	inputData["ipt_med_type"] = ""   // 住院医疗类型  必填
769
-	inputData["adm_way"] = ""   // 入院途径  必填
770
-	inputData["trt_type"] = ""   // 治疗类别  必填
771
-	inputData["adm_time"] = ""   // 入院时间  必填
772
-	inputData["adm_caty"] = ""   // 入院科别  必填
773
-	inputData["refldept_dept"] = ""   // 转科科别  必填
774
-	inputData["dscg_time"] = ""   // 出院时间  必填
775
-	inputData["dscg_caty"] = ""   // 出院科别  必填
776
-	inputData["act_ipt_days"] = ""   // 实际住院天数  必填
777
-	inputData["otp_wm_dise"] = ""   // 门(急) 诊西医诊断  必填
778
-	inputData["wm_dise_code"] = ""   // 门(急) 诊中医诊断  必填
779
-	inputData["otp_tcm_dise"] = ""   // 西医诊断疾病代码  必填
780
-	inputData["tcm_dise_code"] = ""   // 中医诊断代码  必填
781
-	inputData["oprn_oprt_code_cnt"] = ""   // 手术操作代码计数  必填
782
-	inputData["vent_used_dura"] = ""   // 呼吸机使用时长  必填
783
-	inputData["pwcry_bfadm_coma_dura"] = ""   // 颅脑损伤患者入院前昏迷时长  必填
784
-	inputData["pwcry_afadm_coma_dura"] = ""   // 颅脑损伤患者入院后昏迷时长  必填
785
-	inputData["bld_cat"] = ""   // 输血品种  必填
786
-	inputData["bld_amt"] = ""   // 输血量  必填
787
-	inputData["bld_unt"] = ""   // 输血计量单位  必填
788
-	inputData["spga_nurscare_days"] = ""   // 特级护理天数  必填
789
-	inputData["lv1_nurscare_days"] = ""   // 一级护理天数  必填
790
-	inputData["scd_nurscare_days"] = ""   // 二级护理天数  必填
791
-	inputData["lv3_nurscare_days"] = ""   // 三级护理天数  必填
792
-	inputData["acp_medins_name"] = ""   // 拟接收机构名称  必填
793
-	inputData["acp_optins_code"] = ""   // 拟接收机构代码  必填
794
-	inputData["bill_code"] = ""   // 票据代码  必填
795
-	inputData["bill_no"] = ""   // 票据号码  必填
796
-	inputData["biz_sn"] = ""   // 业务流水号  必填
797
-	inputData["days_rinp_flag_31"] = ""   // 出院 31 天内再住院计划标志  必填
798
-	inputData["days_rinp_pup_31"] = ""   // 出院 31 天内再住院目的  必填
799
-	inputData["chfpdr_name"] = ""   // 主诊医师姓名  必填
800
-	inputData["chfpdr_code"] = ""   // 主诊医师代码  必填
801
-	inputData["setl_begn_date"] = ""   // 结算开始日期  必填
802
-	inputData["setl_end_date"] = ""   // 结算结束日期  必填
803
-	inputData["psn_selfpay"] = ""   // 个人自付  必填
804
-	inputData["psn_ownpay"] = ""   // 个人自费  必填
805
-	inputData["acct_pay"] = ""   // 个人账户支出  必填
806
-	inputData["hi_paymtd"] = ""   // 医保支付方式  必填
807
-	inputData["hsorg"] = ""   // 医保机构  必填
808
-	inputData["hsorg_opter"] = ""   // 医保机构经办人  必填
809
-	inputData["medins_fill_dept"] = ""   // 医疗机构填报部门  必填
810
-	inputData["medins_fill_psn"] = ""   // 医疗机构填报人  必填
811
-
812
-	payinfo := make([]map[string]interface{},0)  // 基金支付信息
813
-	payinfotemp := make(map[string]interface{})
814
-	payinfotemp["fund_pay_type"] =  "" // 基金支付类型  必填
815
-	payinfotemp["fund_payamt"] = ""    // 基金支付金额
816
-	payinfo = append(payinfo,payinfotemp)
817
-
818
-	opspdiseinfo := make([]map[string]interface{},0) // 门诊慢特病诊断信息
819
-	opspdiseinfotemp := make(map[string]interface{})
820
-	opspdiseinfotemp["diag_name"] =  "" // 诊断名称  必填
821
-	opspdiseinfotemp["diag_code"] = ""    // 诊断代码 必填
822
-	opspdiseinfotemp["oprn_oprt_name"] = ""    // 手术操作名称 必填
823
-	opspdiseinfotemp["oprn_oprt_code"] = ""    // 手术操作代码 必填
824
-	opspdiseinfo = append(opspdiseinfo,opspdiseinfotemp)
825
-
826
-	diseinfo := make([]map[string]interface{},0) // 住院诊断信息
827
-	diseinfotemp := make(map[string]interface{})
828
-	diseinfotemp["diag_type"] =  "" // 诊断类别  必填
829
-	diseinfotemp["diag_code"] = ""    // 诊断代码 必填
830
-	diseinfotemp["diag_name"] = ""    // 诊断名称 必填
831
-	diseinfotemp["adm_cond_type"] = ""    // 入院病情类型 必填
832
-	diseinfo = append(diseinfo,diseinfotemp)
833
-
834
-	iteminfo := make([]map[string]interface{},0) // 住院诊断信息
835
-	iteminfotemp := make(map[string]interface{})
836
-	iteminfotemp["med_chrgitm"] =  "" // 医疗收费项目  必填
837
-	iteminfotemp["amt"] = ""    // 金额 必填
838
-	iteminfotemp["claa_sumfee"] = ""    // 甲类费用合计 必填
839
-	iteminfotemp["clab_amt"] = ""    // 乙类金额 必填
840
-	iteminfotemp["fulamt_ownpay_amt"] = ""    // 全自费金额 必填
841
-	iteminfotemp["oth_amt"] = ""    // 其他金额 必填
842
-	iteminfo = append(iteminfo,iteminfotemp)
843
-
844
-	oprninfo := make([]map[string]interface{},0) // 手术操作信息
845
-	oprninfotemp := make(map[string]interface{})
846
-	oprninfotemp["oprn_oprt_type"] =  "" // 手术操作类别  必填
847
-	oprninfotemp["oprn_oprt_name"] = ""    // 手术操作名称 必填
848
-	oprninfotemp["oprn_oprt_code"] = ""    // 手术操作代码 必填
849
-	oprninfotemp["oprn_oprt_date"] = ""    // 手术操作日期 必填
850
-	oprninfotemp["anst_way"] = ""    // 麻醉方式 必填
851
-	oprninfotemp["oper_dr_name"] = ""    // 术者医师姓名 必填
852
-	oprninfotemp["oper_dr_code"] = ""    // 术者医师代码 必填
853
-	oprninfotemp["anst_dr_name"] = ""    // 麻醉医师姓名 必填
854
-	oprninfotemp["anst_dr_code"] = ""    // 麻醉医师代码 必填
855
-	oprninfo = append(oprninfo,iteminfotemp)
856
-
857
-	icuinfo := make([]map[string]interface{},0) // 重症监护信息
858
-	icuinfotemp := make(map[string]interface{})
859
-	icuinfotemp["scs_cutd_ward_type"] =  "" // 重症监护病房类型  必填
860
-	icuinfotemp["scs_cutd_inpool_time"] = ""    // 重症监护进入时间 必填
861
-	icuinfotemp["scs_cutd_exit_time"] = ""    // 重症监护退出时间 必填
862
-	icuinfotemp["scs_cutd_sum_dura"] = ""    // 重症监护合计时长 必填
863
-	icuinfo = append(icuinfo,iteminfotemp)
864
-
865
-
866
-
867
-
868
-	input["setlinfo"] = inputData
869
-	input["payinfo"] = payinfo
870
-	input["opspdiseinfo"] = opspdiseinfo
871
-	input["diseinfo"] = diseinfo
872
-	input["iteminfo"] = iteminfo
873
-	input["oprninfo"] = oprninfo
874
-	input["icuinfo"] = icuinfo
875
-	inputMessage["input"] = input //交易输入
876
-
877
-	bytesData, err := json.Marshal(inputMessage)
878
-	fmt.Println(string(bytesData))
879
-	if err != nil {
880
-		fmt.Println(err.Error())
881
-		return err.Error()
882
-	}
883
-	reader := bytes.NewReader(bytesData)
884
-
885
-	url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2208"
886
-	request, err := http.NewRequest("POST", url, reader)
887
-	if err != nil {
888
-		fmt.Println(err.Error())
889
-		return err.Error()
890
-	}
891
-
892
-	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
893
-	request.Header.Set("x-tif-paasid", "test_hosp")
894
-	request.Header.Set("x-tif-signature", signature)
895
-	request.Header.Set("x-tif-timestamp", strconv.FormatInt(timestamp, 10))
896
-	request.Header.Set("x-tif-nonce", nonce)
897
-
898
-	client := http.Client{}
899
-	resp, err := client.Do(request)
900
-	if err != nil {
901
-		fmt.Println(err.Error())
902
-		return err.Error()
903
-	}
904
-	respBytes, err := ioutil.ReadAll(resp.Body)
905
-	if err != nil {
906
-		fmt.Println(err.Error())
907
-		return err.Error()
908
-	}
909
-	str := string(respBytes)
910
-	fmt.Println(str)
911
-	return str
912
-}
721
+//func Gdyb4101(psnNo string, mdtrtId string, setlId string) string {
722
+//	// 生成签名
723
+//	nonce := GetRandomString(32)
724
+//	timestamp := time.Now().Unix()
725
+//	signature := setSignature(timestamp, nonce)
726
+//
727
+//	// 生成输入报文
728
+//	inputMessage := SetInputMessage(nonce, timestamp)
729
+//	input := make(map[string]interface{})
730
+//	inputData := make(map[string]interface{})
731
+//	inputMessage["infno"] = "4101" // 交易编码
732
+//
733
+//	inputData["mdtrt_id"] = mdtrtId // 就诊 ID  必填(来自2201接口返回)
734
+//	inputData["setl_id"] = setlId   // 结算 ID  必填
735
+//	inputData["fixmedins_name"] = ""   // 定点医药机构名称  必填
736
+//	inputData["fixmedins_code"] = ""   // 定点医药机构编码  必填
737
+//	inputData["hi_setl_lv"] = ""   // 医保结算等级
738
+//	inputData["hi_no"] = ""   // 医保编号
739
+//	inputData["medcasno"] = ""   // 病案号  必填
740
+//	inputData["dcla_time"] = ""   // 申报时间  必填
741
+//	inputData["psn_name"] = ""   // 人员姓名  必填
742
+//	inputData["gend"] = ""   // 性别  必填
743
+//	inputData["brdy"] = ""   // 出生日期  必填
744
+//	inputData["age"] = ""   // 年龄  必填
745
+//	inputData["ntly"] = ""   // 国籍  必填
746
+//	inputData["nwb_age"] = ""   // 年龄  必填
747
+//	inputData["naty"] = ""   // 民族  必填
748
+//	inputData["patn_cert_type"] = ""   // 患者证件类别  必填
749
+//	inputData["certno"] = ""   // 证件号码  必填
750
+//	inputData["prfs"] = ""   // 职业  必填
751
+//	inputData["curr_addr"] = ""   // 现住址  必填
752
+//	inputData["emp_name"] = ""   // 单位名称  必填
753
+//	inputData["emp_addr"] = ""   // 单位地址  必填
754
+//	inputData["emp_tel"] = ""   // 单位电话  必填
755
+//	inputData["poscode"] = ""   // 邮编  必填
756
+//	inputData["coner_name"] = ""   // 联系人姓名  必填
757
+//	inputData["patn_rlts"] = ""   // 与患者关系  必填
758
+//	inputData["coner_addr"] = ""   // 联系人地址  必填
759
+//	inputData["coner_tel"] = ""   // 联系人电话  必填
760
+//	inputData["hi_type"] = ""   // 医保类型  必填
761
+//	inputData["insuplc"] = ""   // 参保地  必填
762
+//	inputData["sp_psn_type"] = ""   // 特殊人员类型  必填
763
+//	inputData["nwb_adm_type"] = ""   // 新生儿入院类型  必填
764
+//	inputData["nwb_bir_wt"] = ""   // 新生儿出生体重  必填
765
+//	inputData["nwb_adm_wt"] = ""   // 新生儿入院体重  必填
766
+//	inputData["opsp_diag_caty"] = ""   // 门诊慢特病诊断  必填
767
+//	inputData["opsp_mdtrt_date"] = ""   // 门诊慢特病就诊日期  必填
768
+//	inputData["ipt_med_type"] = ""   // 住院医疗类型  必填
769
+//	inputData["adm_way"] = ""   // 入院途径  必填
770
+//	inputData["trt_type"] = ""   // 治疗类别  必填
771
+//	inputData["adm_time"] = ""   // 入院时间  必填
772
+//	inputData["adm_caty"] = ""   // 入院科别  必填
773
+//	inputData["refldept_dept"] = ""   // 转科科别  必填
774
+//	inputData["dscg_time"] = ""   // 出院时间  必填
775
+//	inputData["dscg_caty"] = ""   // 出院科别  必填
776
+//	inputData["act_ipt_days"] = ""   // 实际住院天数  必填
777
+//	inputData["otp_wm_dise"] = ""   // 门(急) 诊西医诊断  必填
778
+//	inputData["wm_dise_code"] = ""   // 门(急) 诊中医诊断  必填
779
+//	inputData["otp_tcm_dise"] = ""   // 西医诊断疾病代码  必填
780
+//	inputData["tcm_dise_code"] = ""   // 中医诊断代码  必填
781
+//	inputData["oprn_oprt_code_cnt"] = ""   // 手术操作代码计数  必填
782
+//	inputData["vent_used_dura"] = ""   // 呼吸机使用时长  必填
783
+//	inputData["pwcry_bfadm_coma_dura"] = ""   // 颅脑损伤患者入院前昏迷时长  必填
784
+//	inputData["pwcry_afadm_coma_dura"] = ""   // 颅脑损伤患者入院后昏迷时长  必填
785
+//	inputData["bld_cat"] = ""   // 输血品种  必填
786
+//	inputData["bld_amt"] = ""   // 输血量  必填
787
+//	inputData["bld_unt"] = ""   // 输血计量单位  必填
788
+//	inputData["spga_nurscare_days"] = ""   // 特级护理天数  必填
789
+//	inputData["lv1_nurscare_days"] = ""   // 一级护理天数  必填
790
+//	inputData["scd_nurscare_days"] = ""   // 二级护理天数  必填
791
+//	inputData["lv3_nurscare_days"] = ""   // 三级护理天数  必填
792
+//	inputData["acp_medins_name"] = ""   // 拟接收机构名称  必填
793
+//	inputData["acp_optins_code"] = ""   // 拟接收机构代码  必填
794
+//	inputData["bill_code"] = ""   // 票据代码  必填
795
+//	inputData["bill_no"] = ""   // 票据号码  必填
796
+//	inputData["biz_sn"] = ""   // 业务流水号  必填
797
+//	inputData["days_rinp_flag_31"] = ""   // 出院 31 天内再住院计划标志  必填
798
+//	inputData["days_rinp_pup_31"] = ""   // 出院 31 天内再住院目的  必填
799
+//	inputData["chfpdr_name"] = ""   // 主诊医师姓名  必填
800
+//	inputData["chfpdr_code"] = ""   // 主诊医师代码  必填
801
+//	inputData["setl_begn_date"] = ""   // 结算开始日期  必填
802
+//	inputData["setl_end_date"] = ""   // 结算结束日期  必填
803
+//	inputData["psn_selfpay"] = ""   // 个人自付  必填
804
+//	inputData["psn_ownpay"] = ""   // 个人自费  必填
805
+//	inputData["acct_pay"] = ""   // 个人账户支出  必填
806
+//	inputData["hi_paymtd"] = ""   // 医保支付方式  必填
807
+//	inputData["hsorg"] = ""   // 医保机构  必填
808
+//	inputData["hsorg_opter"] = ""   // 医保机构经办人  必填
809
+//	inputData["medins_fill_dept"] = ""   // 医疗机构填报部门  必填
810
+//	inputData["medins_fill_psn"] = ""   // 医疗机构填报人  必填
811
+//
812
+//	payinfo := make([]map[string]interface{},0)  // 基金支付信息
813
+//	payinfotemp := make(map[string]interface{})
814
+//	payinfotemp["fund_pay_type"] =  "" // 基金支付类型  必填
815
+//	payinfotemp["fund_payamt"] = ""    // 基金支付金额
816
+//	payinfo = append(payinfo,payinfotemp)
817
+//
818
+//	opspdiseinfo := make([]map[string]interface{},0) // 门诊慢特病诊断信息
819
+//	opspdiseinfotemp := make(map[string]interface{})
820
+//	opspdiseinfotemp["diag_name"] =  "" // 诊断名称  必填
821
+//	opspdiseinfotemp["diag_code"] = ""    // 诊断代码 必填
822
+//	opspdiseinfotemp["oprn_oprt_name"] = ""    // 手术操作名称 必填
823
+//	opspdiseinfotemp["oprn_oprt_code"] = ""    // 手术操作代码 必填
824
+//	opspdiseinfo = append(opspdiseinfo,opspdiseinfotemp)
825
+//
826
+//	diseinfo := make([]map[string]interface{},0) // 住院诊断信息
827
+//	diseinfotemp := make(map[string]interface{})
828
+//	diseinfotemp["diag_type"] =  "" // 诊断类别  必填
829
+//	diseinfotemp["diag_code"] = ""    // 诊断代码 必填
830
+//	diseinfotemp["diag_name"] = ""    // 诊断名称 必填
831
+//	diseinfotemp["adm_cond_type"] = ""    // 入院病情类型 必填
832
+//	diseinfo = append(diseinfo,diseinfotemp)
833
+//
834
+//	iteminfo := make([]map[string]interface{},0) // 住院诊断信息
835
+//	iteminfotemp := make(map[string]interface{})
836
+//	iteminfotemp["med_chrgitm"] =  "" // 医疗收费项目  必填
837
+//	iteminfotemp["amt"] = ""    // 金额 必填
838
+//	iteminfotemp["claa_sumfee"] = ""    // 甲类费用合计 必填
839
+//	iteminfotemp["clab_amt"] = ""    // 乙类金额 必填
840
+//	iteminfotemp["fulamt_ownpay_amt"] = ""    // 全自费金额 必填
841
+//	iteminfotemp["oth_amt"] = ""    // 其他金额 必填
842
+//	iteminfo = append(iteminfo,iteminfotemp)
843
+//
844
+//	oprninfo := make([]map[string]interface{},0) // 手术操作信息
845
+//	oprninfotemp := make(map[string]interface{})
846
+//	oprninfotemp["oprn_oprt_type"] =  "" // 手术操作类别  必填
847
+//	oprninfotemp["oprn_oprt_name"] = ""    // 手术操作名称 必填
848
+//	oprninfotemp["oprn_oprt_code"] = ""    // 手术操作代码 必填
849
+//	oprninfotemp["oprn_oprt_date"] = ""    // 手术操作日期 必填
850
+//	oprninfotemp["anst_way"] = ""    // 麻醉方式 必填
851
+//	oprninfotemp["oper_dr_name"] = ""    // 术者医师姓名 必填
852
+//	oprninfotemp["oper_dr_code"] = ""    // 术者医师代码 必填
853
+//	oprninfotemp["anst_dr_name"] = ""    // 麻醉医师姓名 必填
854
+//	oprninfotemp["anst_dr_code"] = ""    // 麻醉医师代码 必填
855
+//	oprninfo = append(oprninfo,iteminfotemp)
856
+//
857
+//	icuinfo := make([]map[string]interface{},0) // 重症监护信息
858
+//	icuinfotemp := make(map[string]interface{})
859
+//	icuinfotemp["scs_cutd_ward_type"] =  "" // 重症监护病房类型  必填
860
+//	icuinfotemp["scs_cutd_inpool_time"] = ""    // 重症监护进入时间 必填
861
+//	icuinfotemp["scs_cutd_exit_time"] = ""    // 重症监护退出时间 必填
862
+//	icuinfotemp["scs_cutd_sum_dura"] = ""    // 重症监护合计时长 必填
863
+//	icuinfo = append(icuinfo,iteminfotemp)
864
+//
865
+//
866
+//
867
+//
868
+//	input["setlinfo"] = inputData
869
+//	input["payinfo"] = payinfo
870
+//	input["opspdiseinfo"] = opspdiseinfo
871
+//	input["diseinfo"] = diseinfo
872
+//	input["iteminfo"] = iteminfo
873
+//	input["oprninfo"] = oprninfo
874
+//	input["icuinfo"] = icuinfo
875
+//	inputMessage["input"] = input //交易输入
876
+//
877
+//	bytesData, err := json.Marshal(inputMessage)
878
+//	fmt.Println(string(bytesData))
879
+//	if err != nil {
880
+//		fmt.Println(err.Error())
881
+//		return err.Error()
882
+//	}
883
+//	reader := bytes.NewReader(bytesData)
884
+//
885
+//	url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/2208"
886
+//	request, err := http.NewRequest("POST", url, reader)
887
+//	if err != nil {
888
+//		fmt.Println(err.Error())
889
+//		return err.Error()
890
+//	}
891
+//
892
+//	request.Header.Set("Content-Type", "application/json;charset=UTF-8")
893
+//	request.Header.Set("x-tif-paasid", "test_hosp")
894
+//	request.Header.Set("x-tif-signature", signature)
895
+//	request.Header.Set("x-tif-timestamp", strconv.FormatInt(timestamp, 10))
896
+//	request.Header.Set("x-tif-nonce", nonce)
897
+//
898
+//	client := http.Client{}
899
+//	resp, err := client.Do(request)
900
+//	if err != nil {
901
+//		fmt.Println(err.Error())
902
+//		return err.Error()
903
+//	}
904
+//	respBytes, err := ioutil.ReadAll(resp.Body)
905
+//	if err != nil {
906
+//		fmt.Println(err.Error())
907
+//		return err.Error()
908
+//	}
909
+//	str := string(respBytes)
910
+//	fmt.Println(str)
911
+//	return str
912
+//}
913 913
 
914 914
 // 生成签名
915 915
 func setSignature(timestamp int64, nonce string) string {

+ 3 - 3
service/his_project_service.go ファイルの表示

@@ -28,7 +28,7 @@ func CreateHisProject(project *models.XtHisProject) error {
28 28
 	return err
29 29
 }
30 30
 
31
-func GetHisProjectList(orgid int64, limit int64, page int64, start int64, charge int64, keyword string) (hisproject []*models.XtHisProject, total int64, err error) {
31
+func GetHisProjectList(orgid int64, limit int64, page int64, charge int64, start int64, keyword string) (hisproject []*models.XtHisProject, total int64, err error) {
32 32
 	offset := (page - 1) * limit
33 33
 	likeKey := "%" + keyword + "%"
34 34
 	db := XTReadDB().Table("xt_his_project as x").Where("x.status = 1")
@@ -36,10 +36,10 @@ func GetHisProjectList(orgid int64, limit int64, page int64, start int64, charge
36 36
 		db = db.Where("x.user_org_id = ?", orgid)
37 37
 	}
38 38
 	if start > 0 {
39
-		db = db.Where("x.medical_status = ?", charge)
39
+		db = db.Where("x.medical_status = ?", start)
40 40
 	}
41 41
 	if charge > 0 {
42
-		db = db.Where("x.is_charge = ? ", start)
42
+		db = db.Where("x.is_estimate = ? ", charge)
43 43
 	}
44 44
 	if len(keyword) > 0 {
45 45
 		db = db.Where("x.project_name like ?", likeKey)