|
@@ -1655,216 +1655,188 @@ func Hbyb5301(psnNo string, insutype string, org_name string, doctor string, fix
|
1655
|
1655
|
}
|
1656
|
1656
|
|
1657
|
1657
|
//
|
1658
|
|
-//func Hbyb4101(struct4101 Struct4101, secret_key string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) string {
|
1659
|
|
-// // 生成签名
|
1660
|
|
-// nonce := GetRandomString(32)
|
1661
|
|
-// timestamp := time.Now().Unix()
|
1662
|
|
-// signature := setSignature(timestamp, nonce, secret_key)
|
1663
|
|
-//
|
1664
|
|
-// // 生成输入报文
|
1665
|
|
-// inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
|
1666
|
|
-// input := make(map[string]interface{})
|
1667
|
|
-// inputData := make(map[string]interface{})
|
1668
|
|
-// inputMessage["infno"] = "4101" // 交易编码
|
1669
|
|
-//
|
1670
|
|
-// year := time.Now().Format("2006")
|
1671
|
|
-// month := time.Now().Format("01")
|
1672
|
|
-// day := time.Now().Format("02")
|
1673
|
|
-//
|
1674
|
|
-// inputData["mdtrt_id"] = struct4101.MdtrtId // 就诊 ID 必填(来自2201接口返回)
|
1675
|
|
-// inputData["setl_id"] = struct4101.SetlId // 结算 ID 必填
|
1676
|
|
-// inputData["fixmedins_name"] = org_name // 定点医药机构名称 必填
|
1677
|
|
-// inputData["fixmedins_code"] = fixmedins_code // 定点医药机构编码 必填
|
1678
|
|
-// inputData["hi_setl_lv"] = "" // 医保结算等级
|
1679
|
|
-// inputData["hi_no"] = "" // 医保编号
|
1680
|
|
-// inputData["medcasno"] = struct4101.PsnNo // 病案号 必填
|
1681
|
|
-// inputData["dcla_time"] = year + "-" + month + "-" + day // 申报时间 必填
|
1682
|
|
-// inputData["psn_name"] = struct4101.PsnName // 人员姓名 必填
|
1683
|
|
-// inputData["gend"] = struct4101.Gend // 性别 必填
|
1684
|
|
-// inputData["brdy"] = struct4101.Brdy // 出生日期 必填
|
1685
|
|
-// inputData["age"] = struct4101.Age // 年龄 必填
|
1686
|
|
-// inputData["ntly"] = struct4101.Ntly // 国籍 必填
|
1687
|
|
-// inputData["nwb_age"] = "" // 年龄 必填
|
1688
|
|
-// inputData["naty"] = struct4101.Naty // 民族 必填
|
1689
|
|
-// inputData["patn_cert_type"] = struct4101.PatnCertType // 患者证件类别 必填
|
1690
|
|
-// inputData["certno"] = struct4101.Certno // 证件号码 必填
|
1691
|
|
-// inputData["prfs"] = struct4101.Prfs // 职业 必填
|
1692
|
|
-// inputData["curr_addr"] = "" // 现住址 必填
|
1693
|
|
-// inputData["emp_name"] = "" // 单位名称 必填
|
1694
|
|
-// inputData["emp_addr"] = "" // 单位地址 必填
|
1695
|
|
-// inputData["emp_tel"] = "" // 单位电话 必填
|
1696
|
|
-// inputData["poscode"] = "" // 邮编 必填
|
1697
|
|
-// inputData["coner_name"] = struct4101.ConerName // 联系人姓名 必填
|
1698
|
|
-// inputData["patn_rlts"] = struct4101.PatnRlts // 与患者关系 必填
|
1699
|
|
-// inputData["coner_addr"] = struct4101.ConerAddr // 联系人地址 必填
|
1700
|
|
-// inputData["coner_tel"] = struct4101.ConerTel // 联系人电话 必填
|
1701
|
|
-// inputData["hi_type"] = struct4101.HiType // 医保类型 必填
|
1702
|
|
-// inputData["insuplc"] = struct4101.Insuplc // 参保地 必填
|
1703
|
|
-// inputData["sp_psn_type"] = "" // 特殊人员类型 必填
|
1704
|
|
-// inputData["nwb_adm_type"] = "" // 新生儿入院类型 必填
|
1705
|
|
-// inputData["nwb_bir_wt"] = "" // 新生儿出生体重 必填
|
1706
|
|
-// inputData["nwb_adm_wt"] = "" // 新生儿入院体重 必填
|
1707
|
|
-// inputData["opsp_diag_caty"] = "" // 门诊慢特病诊断 必填
|
1708
|
|
-// inputData["opsp_mdtrt_date"] = "" // 门诊慢特病就诊日期 必填
|
1709
|
|
-// inputData["ipt_med_type"] = struct4101.IptMedType // 住院医疗类型 必填
|
1710
|
|
-// inputData["adm_way"] = "" // 入院途径 必填
|
1711
|
|
-// inputData["trt_type"] = "" // 治疗类别 必填
|
1712
|
|
-// inputData["adm_time"] = "" // 入院时间 必填
|
1713
|
|
-// inputData["adm_caty"] = struct4101.AdmCaty // 入院科别 必填
|
1714
|
|
-// inputData["refldept_dept"] = "" // 转科科别 必填
|
1715
|
|
-// inputData["dscg_time"] = "" // 出院时间 必填
|
1716
|
|
-// inputData["dscg_caty"] = struct4101.AdmCaty // 出院科别 必填
|
1717
|
|
-// inputData["act_ipt_days"] = "" // 实际住院天数 必填
|
1718
|
|
-// inputData["otp_wm_dise"] = "" // 门(急) 诊西医诊断 必填
|
1719
|
|
-// inputData["wm_dise_code"] = "" // 门(急) 诊中医诊断 必填
|
1720
|
|
-// inputData["otp_tcm_dise"] = "" // 西医诊断疾病代码 必填
|
1721
|
|
-// inputData["tcm_dise_code"] = "" // 中医诊断代码 必填
|
1722
|
|
-// inputData["oprn_oprt_code_cnt"] = "" // 手术操作代码计数 必填
|
1723
|
|
-// inputData["vent_used_dura"] = "" // 呼吸机使用时长 必填
|
1724
|
|
-// inputData["pwcry_bfadm_coma_dura"] = "" // 颅脑损伤患者入院前昏迷时长 必填
|
1725
|
|
-// inputData["pwcry_afadm_coma_dura"] = "" // 颅脑损伤患者入院后昏迷时长 必填
|
1726
|
|
-// inputData["bld_cat"] = "" // 输血品种 必填
|
1727
|
|
-// inputData["bld_amt"] = "" // 输血量 必填
|
1728
|
|
-// inputData["bld_unt"] = "" // 输血计量单位 必填
|
1729
|
|
-// inputData["spga_nurscare_days"] = "" // 特级护理天数 必填
|
1730
|
|
-// inputData["lv1_nurscare_days"] = "" // 一级护理天数 必填
|
1731
|
|
-// inputData["scd_nurscare_days"] = "" // 二级护理天数 必填
|
1732
|
|
-// inputData["lv3_nurscare_days"] = "" // 三级护理天数 必填
|
1733
|
|
-// inputData["acp_medins_name"] = "" // 拟接收机构名称 必填
|
1734
|
|
-// inputData["acp_optins_code"] = "" // 拟接收机构代码 必填
|
1735
|
|
-// inputData["bill_code"] = struct4101.BillCode // 票据代码 必填
|
1736
|
|
-// inputData["bill_no"] = struct4101.BillNo // 票据号码 必填
|
1737
|
|
-// inputData["biz_sn"] = struct4101.BizSn // 业务流水号 必填
|
1738
|
|
-// inputData["days_rinp_flag_31"] = "" // 出院 31 天内再住院计划标志 必填
|
1739
|
|
-// inputData["days_rinp_pup_31"] = "" // 出院 31 天内再住院目的 必填
|
1740
|
|
-// inputData["chfpdr_name"] = "" // 主诊医师姓名 必填
|
1741
|
|
-// inputData["chfpdr_code"] = "" // 主诊医师代码 必填
|
1742
|
|
-// inputData["setl_begn_date"] = struct4101.SetlBegnDate // 结算开始日期 必填
|
1743
|
|
-// inputData["setl_end_date"] = struct4101.SetlEndDate // 结算结束日期 必填
|
1744
|
|
-// inputData["psn_selfpay"] = struct4101.PsnSelfPay // 个人自付 必填
|
1745
|
|
-// inputData["psn_ownpay"] = struct4101.PsnOwnPay // 个人自费 必填
|
1746
|
|
-// inputData["acct_pay"] = struct4101.AcctPay // 个人账户支出 必填
|
1747
|
|
-// inputData["hi_paymtd"] = struct4101.HiPaymtd // 医保支付方式 必填
|
1748
|
|
-// inputData["hsorg"] = struct4101.Hsorg // 医保机构 必填
|
1749
|
|
-// inputData["hsorg_opter"] = struct4101.HsorgOpter // 医保机构经办人 必填
|
1750
|
|
-// inputData["medins_fill_dept"] = struct4101.MedinsFillDept // 医疗机构填报部门 必填
|
1751
|
|
-// inputData["medins_fill_psn"] = struct4101.MedinsFillPsn // 医疗机构填报人 必填
|
1752
|
|
-// inputData["psn_cashpay"] = struct4101.PsnCashpay // 医疗机构填报人 必填
|
1753
|
|
-//
|
1754
|
|
-// payinfo := make([]map[string]interface{}, 0) // 基金支付信息
|
1755
|
|
-// for _, item := range struct4101.CustomStruct {
|
1756
|
|
-// payinfotemp := make(map[string]interface{})
|
1757
|
|
-// 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" {
|
1758
|
|
-// payinfotemp["fund_pay_type"] = item.FundPayType // 基金支付类型 必填
|
1759
|
|
-// payinfotemp["fund_payamt"] = item.FundPayamt // 基金支付金额
|
1760
|
|
-// payinfo = append(payinfo, payinfotemp)
|
1761
|
|
-// }
|
1762
|
|
-// }
|
1763
|
|
-// opspdiseinfo := make([]map[string]interface{}, 0) // 门诊慢特病诊断信息
|
1764
|
|
-// for _, item := range struct4101.OpspdiseinfoStruct {
|
1765
|
|
-// opspdiseinfotemp := make(map[string]interface{})
|
1766
|
|
-// opspdiseinfotemp["diag_name"] = item.DiagName // 诊断名称 必填
|
1767
|
|
-// opspdiseinfotemp["diag_code"] = item.DiagCode // 诊断代码 必填
|
1768
|
|
-// opspdiseinfotemp["oprn_oprt_name"] = "" // 手术操作名称 必填
|
1769
|
|
-// opspdiseinfotemp["oprn_oprt_code"] = "" // 手术操作代码 必填
|
1770
|
|
-//
|
1771
|
|
-// opspdiseinfo = append(opspdiseinfo, opspdiseinfotemp)
|
1772
|
|
-// }
|
1773
|
|
-//
|
1774
|
|
-// diseinfo := make([]map[string]interface{}, 0) // 住院诊断信息
|
1775
|
|
-// for _, item := range struct4101.OpspdiseinfoStruct {
|
1776
|
|
-// fmt.Println(item.DiagName)
|
1777
|
|
-// diseinfotemp := make(map[string]interface{})
|
1778
|
|
-// diseinfotemp["maindiag_flag"] = item.MaindiagFlag // 手术操作代码 必填
|
1779
|
|
-// diseinfotemp["diag_type"] = item.MaindiagFlag // 诊断类别 必填
|
1780
|
|
-// diseinfotemp["diag_code"] = item.DiagCode // 诊断代码 必填
|
1781
|
|
-// diseinfotemp["diag_name"] = item.DiagName // 诊断名称 必填
|
1782
|
|
-// diseinfotemp["adm_cond_type"] = "3" // 入院病情类型 必填
|
1783
|
|
-// diseinfo = append(diseinfo, diseinfotemp)
|
1784
|
|
-// }
|
1785
|
|
-//
|
1786
|
|
-// iteminfo := make([]map[string]interface{}, 0) // 住院诊断信息
|
1787
|
|
-// for _, item := range struct4101.IteminfoStruct {
|
1788
|
|
-// iteminfotemp := make(map[string]interface{})
|
1789
|
|
-// iteminfotemp["med_chrgitm"] = item.MedChrgitm // 医疗收费项目 必填
|
1790
|
|
-// iteminfotemp["amt"] = item.Amt // 金额 必填
|
1791
|
|
-// iteminfotemp["claa_sumfee"] = item.ClaaSumfee // 甲类费用合计 必填
|
1792
|
|
-// iteminfotemp["clab_amt"] = item.ClabAmt // 乙类金额 必填
|
1793
|
|
-// iteminfotemp["fulamt_ownpay_amt"] = item.FulamtOwnpayAmt // 全自费金额 必填
|
1794
|
|
-// iteminfotemp["oth_amt"] = item.OthAmt // 其他金额 必填
|
1795
|
|
-// iteminfo = append(iteminfo, iteminfotemp)
|
1796
|
|
-// }
|
1797
|
|
-//
|
1798
|
|
-// oprninfo := make([]map[string]interface{}, 0) // 手术操作信息
|
1799
|
|
-// oprninfotemp := make(map[string]interface{})
|
1800
|
|
-// oprninfotemp["oprn_oprt_type"] = "" // 手术操作类别 必填
|
1801
|
|
-// oprninfotemp["oprn_oprt_name"] = "" // 手术操作名称 必填
|
1802
|
|
-// oprninfotemp["oprn_oprt_code"] = "" // 手术操作代码 必填
|
1803
|
|
-// oprninfotemp["oprn_oprt_date"] = "" // 手术操作日期 必填
|
1804
|
|
-// oprninfotemp["anst_way"] = "" // 麻醉方式 必填
|
1805
|
|
-// oprninfotemp["oper_dr_name"] = "" // 术者医师姓名 必填
|
1806
|
|
-// oprninfotemp["oper_dr_code"] = "" // 术者医师代码 必填
|
1807
|
|
-// oprninfotemp["anst_dr_name"] = "" // 麻醉医师姓名 必填
|
1808
|
|
-// oprninfotemp["anst_dr_code"] = "" // 麻醉医师代码 必填
|
1809
|
|
-// oprninfo = append(oprninfo, oprninfotemp)
|
1810
|
|
-//
|
1811
|
|
-// icuinfo := make([]map[string]interface{}, 0) // 重症监护信息
|
1812
|
|
-// icuinfotemp := make(map[string]interface{})
|
1813
|
|
-// icuinfotemp["scs_cutd_ward_type"] = "" // 重症监护病房类型 必填
|
1814
|
|
-// icuinfotemp["scs_cutd_inpool_time"] = "" // 重症监护进入时间 必填
|
1815
|
|
-// icuinfotemp["scs_cutd_exit_time"] = "" // 重症监护退出时间 必填
|
1816
|
|
-// icuinfotemp["scs_cutd_sum_dura"] = "" // 重症监护合计时长 必填
|
1817
|
|
-// icuinfo = append(icuinfo, icuinfotemp)
|
1818
|
|
-//
|
1819
|
|
-// input["setlinfo"] = inputData
|
1820
|
|
-// input["payinfo"] = payinfo
|
1821
|
|
-// //input["opspdiseinfo"] = opspdiseinfo
|
1822
|
|
-// input["diseinfo"] = diseinfo
|
1823
|
|
-// input["iteminfo"] = iteminfo
|
1824
|
|
-// //input["oprninfo"] = oprninfo
|
1825
|
|
-// //input["icuinfo"] = icuinfo
|
1826
|
|
-// inputMessage["input"] = input //交易输入
|
1827
|
|
-//
|
1828
|
|
-// bytesData, err := json.Marshal(inputMessage)
|
1829
|
|
-// fmt.Println(string(bytesData))
|
1830
|
|
-// if err != nil {
|
1831
|
|
-// fmt.Println(err.Error())
|
1832
|
|
-// return err.Error()
|
1833
|
|
-// }
|
1834
|
|
-// reader := bytes.NewReader(bytesData)
|
1835
|
|
-//
|
1836
|
|
-// gdyb_url := beego.AppConfig.String("gdyb_url")
|
1837
|
|
-// gdyb_paasid := beego.AppConfig.String("gdyb_paasid")
|
1838
|
|
-// url := gdyb_url + "4101"
|
1839
|
|
-//
|
1840
|
|
-// //url := "http://igb.hsa.gdgov.cn/ebus/gdyb_inf/poc/hsa/hgs/4101"
|
1841
|
|
-// request, err := http.NewRequest("POST", url, reader)
|
1842
|
|
-// if err != nil {
|
1843
|
|
-// fmt.Println(err.Error())
|
1844
|
|
-// return err.Error()
|
1845
|
|
-// }
|
1846
|
|
-//
|
1847
|
|
-// request.Header.Set("Content-Type", "application/json;charset=UTF-8")
|
1848
|
|
-// request.Header.Set("x-tif-paasid", gdyb_paasid)
|
1849
|
|
-// request.Header.Set("x-tif-signature", signature)
|
1850
|
|
-// request.Header.Set("x-tif-timestamp", strconv.FormatInt(timestamp, 10))
|
1851
|
|
-// request.Header.Set("x-tif-nonce", nonce)
|
1852
|
|
-//
|
1853
|
|
-// client := http.Client{}
|
1854
|
|
-// resp, err := client.Do(request)
|
1855
|
|
-// if err != nil {
|
1856
|
|
-// fmt.Println(err.Error())
|
1857
|
|
-// return err.Error()
|
1858
|
|
-// }
|
1859
|
|
-// respBytes, err := ioutil.ReadAll(resp.Body)
|
1860
|
|
-// if err != nil {
|
1861
|
|
-// fmt.Println(err.Error())
|
1862
|
|
-// return err.Error()
|
1863
|
|
-// }
|
1864
|
|
-// str := string(respBytes)
|
1865
|
|
-// fmt.Println(str)
|
1866
|
|
-// return str
|
1867
|
|
-//}
|
|
1658
|
+func Hbyb4101(struct4101 Struct4101, secret_key string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) (string, string) {
|
|
1659
|
+ // 生成签名
|
|
1660
|
+ nonce := GetRandomString(32)
|
|
1661
|
+ timestamp := time.Now().Unix()
|
|
1662
|
+
|
|
1663
|
+ // 生成输入报文
|
|
1664
|
+ inputMessage := SetInputMessage(nonce, timestamp, org_name, doctor, fixmedins_code, insuplc_admdvs, mdtrtarea_admvs)
|
|
1665
|
+ input := make(map[string]interface{})
|
|
1666
|
+ inputData := make(map[string]interface{})
|
|
1667
|
+ inputMessage["infno"] = "4101A" // 交易编码
|
|
1668
|
+
|
|
1669
|
+ year := time.Now().Format("2006")
|
|
1670
|
+ month := time.Now().Format("01")
|
|
1671
|
+ day := time.Now().Format("02")
|
|
1672
|
+
|
|
1673
|
+ inputData["mdtrt_id"] = struct4101.MdtrtId // 就诊 ID 必填(来自2201接口返回)
|
|
1674
|
+ inputData["setl_id"] = struct4101.SetlId // 结算 ID 必填
|
|
1675
|
+ inputData["psn_no"] = struct4101.PsnNo // 结算 ID 必填
|
|
1676
|
+
|
|
1677
|
+ inputData["fixmedins_name"] = org_name // 定点医药机构名称 必填
|
|
1678
|
+ inputData["fixmedins_code"] = fixmedins_code // 定点医药机构编码 必填
|
|
1679
|
+ inputData["hi_setl_lv"] = "" // 医保结算等级
|
|
1680
|
+ inputData["hi_no"] = struct4101.PsnNo // 医保编号
|
|
1681
|
+ inputData["medcasno"] = struct4101.PsnNo // 病案号 必填
|
|
1682
|
+ inputData["dcla_time"] = year + "-" + month + "-" + day // 申报时间 必填
|
|
1683
|
+ inputData["psn_name"] = struct4101.PsnName // 人员姓名 必填
|
|
1684
|
+ inputData["gend"] = struct4101.Gend // 性别 必填
|
|
1685
|
+ inputData["brdy"] = struct4101.Brdy // 出生日期 必填
|
|
1686
|
+ inputData["age"] = struct4101.Age // 年龄 必填
|
|
1687
|
+ inputData["ntly"] = struct4101.Ntly // 国籍 必填
|
|
1688
|
+ inputData["nwb_age"] = "" // 年龄 必填
|
|
1689
|
+ inputData["naty"] = struct4101.Naty // 民族 必填
|
|
1690
|
+ inputData["patn_cert_type"] = struct4101.PatnCertType // 患者证件类别 必填
|
|
1691
|
+ inputData["certno"] = struct4101.Certno // 证件号码 必填
|
|
1692
|
+ inputData["prfs"] = struct4101.Prfs // 职业 必填
|
|
1693
|
+ inputData["curr_addr"] = "" // 现住址 必填
|
|
1694
|
+ inputData["emp_name"] = "" // 单位名称 必填
|
|
1695
|
+ inputData["emp_addr"] = "" // 单位地址 必填
|
|
1696
|
+ inputData["emp_tel"] = "" // 单位电话 必填
|
|
1697
|
+ inputData["poscode"] = "" // 邮编 必填
|
|
1698
|
+ inputData["coner_name"] = struct4101.ConerName // 联系人姓名 必填
|
|
1699
|
+ inputData["patn_rlts"] = struct4101.PatnRlts // 与患者关系 必填
|
|
1700
|
+ inputData["coner_addr"] = struct4101.ConerAddr // 联系人地址 必填
|
|
1701
|
+ inputData["coner_tel"] = struct4101.ConerTel // 联系人电话 必填
|
|
1702
|
+ inputData["hi_type"] = struct4101.HiType // 医保类型 必填
|
|
1703
|
+ inputData["insuplc"] = struct4101.Insuplc // 参保地 必填
|
|
1704
|
+ inputData["sp_psn_type"] = "" // 特殊人员类型 必填
|
|
1705
|
+ inputData["nwb_adm_type"] = "" // 新生儿入院类型 必填
|
|
1706
|
+ inputData["nwb_bir_wt"] = "" // 新生儿出生体重 必填
|
|
1707
|
+ inputData["nwb_adm_wt"] = "" // 新生儿入院体重 必填
|
|
1708
|
+ inputData["opsp_diag_caty"] = "" // 门诊慢特病诊断 必填
|
|
1709
|
+ inputData["opsp_mdtrt_date"] = "" // 门诊慢特病就诊日期 必填
|
|
1710
|
+ inputData["ipt_med_type"] = struct4101.IptMedType // 住院医疗类型 必填
|
|
1711
|
+ inputData["adm_way"] = "" // 入院途径 必填
|
|
1712
|
+ inputData["trt_type"] = "" // 治疗类别 必填
|
|
1713
|
+ inputData["adm_time"] = struct4101.AdmTime // 入院时间 必填
|
|
1714
|
+ inputData["adm_caty"] = struct4101.AdmCaty // 入院科别 必填
|
|
1715
|
+ inputData["refldept_dept"] = "" // 转科科别 必填
|
|
1716
|
+ inputData["dscg_time"] = struct4101.AdmEndTime // 出院时间 必填
|
|
1717
|
+ inputData["dscg_caty"] = struct4101.AdmCaty // 出院科别 必填
|
|
1718
|
+ inputData["act_ipt_days"] = "" // 实际住院天数 必填
|
|
1719
|
+ inputData["otp_wm_dise"] = "" // 门(急) 诊西医诊断 必填
|
|
1720
|
+ inputData["wm_dise_code"] = "" // 门(急) 诊中医诊断 必填
|
|
1721
|
+ inputData["otp_tcm_dise"] = "" // 西医诊断疾病代码 必填
|
|
1722
|
+ inputData["tcm_dise_code"] = "" // 中医诊断代码 必填
|
|
1723
|
+ inputData["oprn_oprt_code_cnt"] = "" // 手术操作代码计数 必填
|
|
1724
|
+ inputData["vent_used_dura"] = "" // 呼吸机使用时长 必填
|
|
1725
|
+ inputData["pwcry_bfadm_coma_dura"] = "" // 颅脑损伤患者入院前昏迷时长 必填
|
|
1726
|
+ inputData["pwcry_afadm_coma_dura"] = "" // 颅脑损伤患者入院后昏迷时长 必填
|
|
1727
|
+ inputData["bld_cat"] = "" // 输血品种 必填
|
|
1728
|
+ inputData["bld_amt"] = "" // 输血量 必填
|
|
1729
|
+ inputData["bld_unt"] = "" // 输血计量单位 必填
|
|
1730
|
+ inputData["spga_nurscare_days"] = "" // 特级护理天数 必填
|
|
1731
|
+ inputData["lv1_nurscare_days"] = "" // 一级护理天数 必填
|
|
1732
|
+ inputData["scd_nurscare_days"] = "" // 二级护理天数 必填
|
|
1733
|
+ inputData["lv3_nurscare_days"] = "" // 三级护理天数 必填
|
|
1734
|
+ inputData["acp_medins_name"] = "" // 拟接收机构名称 必填
|
|
1735
|
+ inputData["acp_optins_code"] = "" // 拟接收机构代码 必填
|
|
1736
|
+ inputData["bill_code"] = struct4101.BillCode // 票据代码 必填
|
|
1737
|
+ inputData["bill_no"] = struct4101.BillNo // 票据号码 必填
|
|
1738
|
+ inputData["biz_sn"] = struct4101.BizSn // 业务流水号 必填
|
|
1739
|
+ inputData["days_rinp_flag_31"] = "" // 出院 31 天内再住院计划标志 必填
|
|
1740
|
+ inputData["days_rinp_pup_31"] = "" // 出院 31 天内再住院目的 必填
|
|
1741
|
+ inputData["chfpdr_name"] = "" // 主诊医师姓名 必填
|
|
1742
|
+ inputData["chfpdr_code"] = "" // 主诊医师代码 必填
|
|
1743
|
+ inputData["setl_begn_date"] = struct4101.SetlBegnDate // 结算开始日期 必填
|
|
1744
|
+ inputData["setl_end_date"] = struct4101.SetlEndDate // 结算结束日期 必填
|
|
1745
|
+ inputData["psn_selfpay"] = struct4101.PsnSelfPay // 个人自付 必填
|
|
1746
|
+ inputData["psn_ownpay"] = struct4101.PsnOwnPay // 个人自费 必填
|
|
1747
|
+ inputData["acct_pay"] = struct4101.AcctPay // 个人账户支出 必填
|
|
1748
|
+ inputData["hi_paymtd"] = struct4101.HiPaymtd // 医保支付方式 必填
|
|
1749
|
+ inputData["hsorg"] = struct4101.Hsorg // 医保机构 必填
|
|
1750
|
+ inputData["hsorg_opter"] = struct4101.HsorgOpter // 医保机构经办人 必填
|
|
1751
|
+ inputData["medins_fill_dept"] = struct4101.MedinsFillDept // 医疗机构填报部门 必填
|
|
1752
|
+ inputData["medins_fill_psn"] = struct4101.MedinsFillPsn // 医疗机构填报人 必填
|
|
1753
|
+ inputData["psn_cashpay"] = struct4101.PsnCashpay // 医疗机构填报人 必填
|
|
1754
|
+
|
|
1755
|
+ payinfo := make([]map[string]interface{}, 0) // 基金支付信息
|
|
1756
|
+ for _, item := range struct4101.CustomStruct {
|
|
1757
|
+ payinfotemp := make(map[string]interface{})
|
|
1758
|
+ 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" {
|
|
1759
|
+ payinfotemp["fund_pay_type"] = item.FundPayType // 基金支付类型 必填
|
|
1760
|
+ payinfotemp["fund_payamt"] = item.FundPayamt // 基金支付金额
|
|
1761
|
+ payinfo = append(payinfo, payinfotemp)
|
|
1762
|
+ }
|
|
1763
|
+ }
|
|
1764
|
+ opspdiseinfo := make([]map[string]interface{}, 0) // 门诊慢特病诊断信息
|
|
1765
|
+
|
|
1766
|
+ opspdiseinfotemp := make(map[string]interface{})
|
|
1767
|
+ opspdiseinfotemp["diag_name"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagName // 诊断名称 必填
|
|
1768
|
+ opspdiseinfotemp["diag_code"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagCode // 诊断代码 必填
|
|
1769
|
+ opspdiseinfotemp["oprn_oprt_name"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagName // 手术操作名称 必填
|
|
1770
|
+ opspdiseinfotemp["oprn_oprt_code"] = struct4101.OpspdiseinfoStruct[len(struct4101.OpspdiseinfoStruct)-1].DiagCode // 手术操作代码 必填
|
|
1771
|
+ opspdiseinfo = append(opspdiseinfo, opspdiseinfotemp)
|
|
1772
|
+
|
|
1773
|
+ diseinfo := make([]map[string]interface{}, 0) // 住院诊断信息
|
|
1774
|
+ for _, item := range struct4101.Diseinfo {
|
|
1775
|
+ diseinfotemp := make(map[string]interface{})
|
|
1776
|
+ diseinfotemp["maindiag_flag"] = item.MaindiagFlag // 手术操作代码 必填
|
|
1777
|
+ diseinfotemp["diag_type"] = item.DiagType // 诊断类别 必填
|
|
1778
|
+ diseinfotemp["diag_code"] = item.DiagCode // 诊断代码 必填
|
|
1779
|
+ diseinfotemp["diag_name"] = item.DiagName // 诊断名称 必填
|
|
1780
|
+ diseinfotemp["adm_cond_type"] = "3" // 入院病情类型 必填
|
|
1781
|
+ diseinfo = append(diseinfo, diseinfotemp)
|
|
1782
|
+ }
|
|
1783
|
+
|
|
1784
|
+ iteminfo := make([]map[string]interface{}, 0)
|
|
1785
|
+ for _, item := range struct4101.IteminfoStruct {
|
|
1786
|
+ iteminfotemp := make(map[string]interface{})
|
|
1787
|
+ iteminfotemp["med_chrgitm"] = item.MedChrgitm // 医疗收费项目 必填
|
|
1788
|
+ iteminfotemp["amt"] = item.Amt // 金额 必填
|
|
1789
|
+ iteminfotemp["claa_sumfee"] = item.ClaaSumfee // 甲类费用合计 必填
|
|
1790
|
+ iteminfotemp["clab_amt"] = item.ClabAmt // 乙类金额 必填
|
|
1791
|
+ iteminfotemp["fulamt_ownpay_amt"] = item.FulamtOwnpayAmt // 全自费金额 必填
|
|
1792
|
+ iteminfotemp["oth_amt"] = item.OthAmt // 其他金额 必填
|
|
1793
|
+ iteminfo = append(iteminfo, iteminfotemp)
|
|
1794
|
+ }
|
|
1795
|
+
|
|
1796
|
+ oprninfo := make([]map[string]interface{}, 0) // 手术操作信息
|
|
1797
|
+ oprninfotemp := make(map[string]interface{})
|
|
1798
|
+ oprninfotemp["oprn_oprt_type"] = "" // 手术操作类别 必填
|
|
1799
|
+ oprninfotemp["oprn_oprt_name"] = "" // 手术操作名称 必填
|
|
1800
|
+ oprninfotemp["oprn_oprt_code"] = "" // 手术操作代码 必填
|
|
1801
|
+ oprninfotemp["oprn_oprt_date"] = "" // 手术操作日期 必填
|
|
1802
|
+ oprninfotemp["anst_way"] = "" // 麻醉方式 必填
|
|
1803
|
+ oprninfotemp["oper_dr_name"] = "" // 术者医师姓名 必填
|
|
1804
|
+ oprninfotemp["oper_dr_code"] = "" // 术者医师代码 必填
|
|
1805
|
+ oprninfotemp["anst_dr_name"] = "" // 麻醉医师姓名 必填
|
|
1806
|
+ oprninfotemp["anst_dr_code"] = "" // 麻醉医师代码 必填
|
|
1807
|
+ oprninfo = append(oprninfo, oprninfotemp)
|
|
1808
|
+
|
|
1809
|
+ icuinfo := make([]map[string]interface{}, 0) // 重症监护信息
|
|
1810
|
+ icuinfotemp := make(map[string]interface{})
|
|
1811
|
+ icuinfotemp["scs_cutd_ward_type"] = "" // 重症监护病房类型 必填
|
|
1812
|
+ icuinfotemp["scs_cutd_inpool_time"] = "" // 重症监护进入时间 必填
|
|
1813
|
+ icuinfotemp["scs_cutd_exit_time"] = "" // 重症监护退出时间 必填
|
|
1814
|
+ icuinfotemp["scs_cutd_sum_dura"] = "" // 重症监护合计时长 必填
|
|
1815
|
+ icuinfo = append(icuinfo, icuinfotemp)
|
|
1816
|
+
|
|
1817
|
+ input["setlinfo"] = inputData
|
|
1818
|
+ input["payinfo"] = payinfo
|
|
1819
|
+ input["opspdiseinfo"] = opspdiseinfo
|
|
1820
|
+ input["diseinfo"] = diseinfo
|
|
1821
|
+ input["iteminfo"] = iteminfo
|
|
1822
|
+ inputMessage["input"] = input //交易输入
|
|
1823
|
+
|
|
1824
|
+ bytesData, err := json.Marshal(inputMessage)
|
|
1825
|
+ fmt.Println(string(bytesData))
|
|
1826
|
+ if err != nil {
|
|
1827
|
+ fmt.Println(err.Error())
|
|
1828
|
+ return err.Error(), ""
|
|
1829
|
+ }
|
|
1830
|
+ var json2 string
|
|
1831
|
+ cmd := exec.Command("java", "-jar", "yh_hb_fat.jar", "4101A", string(bytesData), json2)
|
|
1832
|
+ out, err := cmd.Output()
|
|
1833
|
+ if err != nil {
|
|
1834
|
+ fmt.Println("error:", err.Error())
|
|
1835
|
+ }
|
|
1836
|
+
|
|
1837
|
+ fmt.Println(string(out))
|
|
1838
|
+ return ConvertToString(string(out), "gbk", "utf-8"), string(bytesData)
|
|
1839
|
+}
|
1868
|
1840
|
|
1869
|
1841
|
//func Gdyb1201(psnNo string, org_name string, doctor string) string {
|
1870
|
1842
|
// // 生成签名
|