using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Xml; using PTMedicalInsurance.Variables; using Newtonsoft.Json.Linq; using PTMedicalInsurance.Common; using PTMedicalInsurance.Helper; namespace PTMedicalInsurance { public partial class ReadCardInfo : Form { AnalysisXML AnXML = new AnalysisXML(); public ReadCardInfo() { InitializeComponent(); this.StartPosition = FormStartPosition.CenterParent; } public ReadCardInfo(string patInfo,int iOtherProvLocal) { InitializeComponent(); string OutMsg; string persontype = "", isspecifiedhosp = "", ischronichosp = "", isinredlist = ""; string sex = "", hospflag = "", isyt = "", jclevel = "", fundtype = ""; string ServantFlag = "", PoorFlag = "", InHospitalNumber = "", AreaCode = ""; //解析返回值 XmlDocument xmlDoc = AnXML.GetXmlDoc(patInfo); if (iOtherProvLocal == 0) //本地 { XmlNode dataNodeIC = AnXML.GetNodeFromPath(xmlDoc.DocumentElement, "output/ic"); XmlNode dataNodeNet = AnXML.GetNodeFromPath(xmlDoc.DocumentElement, "output/net"); this.edt_YBBH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "ic_no", 0); persontype = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "persontype", 0); //人员类别 isspecifiedhosp = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "isspecifiedhosp", 0); ischronichosp = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "ischronichosp", 0); isinredlist = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "isinredlist", 0); sex = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "sex", 0); hospflag = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "hospflag", 0); isyt = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "isyt", 0); jclevel = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "jclevel", 0); fundtype = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fundtype", 0); this.edt_XM.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "personname", 0); this.edt_KH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "card_no", 0); this.edt_SFZH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "id_no", 0); this.edt_CSRQ.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "birthday", 0); this.edt_ZZSX.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fromhospdate", 0); this.edt_ZZYYBM.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fromhosp", 0); this.edt_MBBM.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "chroniccode", 0); //慢病编码 this.edt_ZHYE.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeNet, "personcount", 0); } else { XmlNode dataNodeIC = AnXML.GetNodeFromPath(xmlDoc.DocumentElement, "output/ic"); this.edt_YBBH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "Person_manage", 0); persontype = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "persontype", 0); //人员类别 sex = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "sex", 0); hospflag = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "hospflag", 0); isyt = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "isyt", 0); jclevel = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "jclevel", 0); fundtype = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fundtype", 0); ServantFlag= AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "ServantFlag", 0); PoorFlag = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "PoorFlag", 0); InHospitalNumber = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "InHospitalNumber", 0); AreaCode = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "AreaCode", 0); this.edt_XM.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "personname", 0); this.edt_KH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "card_no", 0); this.edt_SFZH.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "id_no", 0); this.edt_CSRQ.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "birthday", 0); this.edt_ZZSX.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fromhospdate", 0); this.edt_ZZYYBM.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "fromhosp", 0); this.edt_ZHYE.Text = AnXML.FormatXMLElement(xmlDoc, dataNodeIC, "personcount", 0); Global.pat.insuplc_admdvs = AreaCode; //参保地行政区划 this.edt_AreaCode.Text = AreaCode; } Global.pat.psn_no = this.edt_YBBH.Text; switch (persontype) { case "10": { this.edt_RYLB.Text = "本市复读的学生"; break; } case "11": { this.edt_RYLB.Text = "在职职工"; break; } case "12": { this.edt_RYLB.Text = "在职长期驻外"; break; } case "21": { this.edt_RYLB.Text = "退休"; break; } case "22": { this.edt_RYLB.Text = "退休异地安置"; break; } case "31": { this.edt_RYLB.Text = "离休"; break; } case "32": { this.edt_RYLB.Text = "二等乙级伤残军人"; break; } case "33": { this.edt_RYLB.Text = "离休异地安置"; break; } case "41": { this.edt_RYLB.Text = "遗孀"; break; } case "91": { this.edt_RYLB.Text = "其他人员"; break; } } if (sex == "1") this.edt_XB.Text = "男"; else this.edt_XB.Text = "女"; if (isinredlist == "true") this.edt_SFHMD.Text = "是"; else this.edt_SFHMD.Text = "不在红名单"; if (isspecifiedhosp == "0") { this.edt_BRDDYY.Text = "本地红名单,默认为定点医院"; } else if (isspecifiedhosp == "1") { this.edt_BRDDYY.Text = "是本人定点医院"; } else if (isspecifiedhosp == "2") { this.edt_BRDDYY.Text = "不是本人定点医院"; } else if (isspecifiedhosp == "3") { this.edt_BRDDYY.Text = "转诊医院"; } switch (fundtype) { case "1": { this.edt_XZLX.Text = "基本养老保险"; break; } case "2": { this.edt_XZLX.Text = "失业保险"; break; } case "3": { this.edt_XZLX.Text = "基本医疗保险"; break; } case "4": { this.edt_XZLX.Text = "工伤保险"; break; } case "5": { this.edt_XZLX.Text = "生育保险"; break; } case "6": { this.edt_XZLX.Text = "企业补充养老保险"; break; } case "7": { this.edt_XZLX.Text = "个人储蓄性养老保险"; break; } case "8": { this.edt_XZLX.Text = "预提补充医疗保险"; break; } case "81": { this.edt_XZLX.Text = "退休人员统一补充医疗保险"; break; } case "20": { this.edt_XZLX.Text = "大额医疗互助"; break; } case "30": { this.edt_XZLX.Text = "公务员医疗补助"; break; } case "31": { this.edt_XZLX.Text = "离休医疗费统筹"; break; } case "32": { this.edt_XZLX.Text = "公费医疗"; break; } case "33": { this.edt_XZLX.Text = "征地超转人员医疗保险"; break; } case "91": { this.edt_XZLX.Text = "学生儿童大病医疗保险"; break; } case "92": { this.edt_XZLX.Text = "城镇无保障老年人大病医疗保险"; break; } case "93": { this.edt_XZLX.Text = "城镇居民基本医疗保险"; break; } } Global.pat.insuTypeName = this.edt_XZLX.Text; if (isyt == "0") this.edt_YTRYBS.Text = "普通人员"; else this.edt_YTRYBS.Text = "预提人员"; switch (hospflag) { case "0": { this.edt_ZYBS.Text = "未住院状态"; break; } case "1": { this.edt_ZYBS.Text = "住院状态"; break; } case "2": { this.edt_ZYBS.Text = "急诊留观"; break; } case "3": { this.edt_ZYBS.Text = "家庭病床"; break; } case "4": { this.edt_ZYBS.Text = "住院计划生育手术"; break; } case "41": { this.edt_ZYBS.Text = "工伤保险住院状态"; break; } case "51": { this.edt_ZYBS.Text = "生育保险住院状态"; break; } } switch (jclevel) { case "0": { this.edt_JCDJ.Text = "不享受伤残待遇"; break; } case "1": { this.edt_JCDJ.Text = "享受一级伤残待遇"; break; } case "2": { this.edt_JCDJ.Text = "享受二级伤残待遇"; break; } case "3": { this.edt_JCDJ.Text = "享受三级伤残待遇"; break; } case "4": { this.edt_JCDJ.Text = "享受四级伤残待遇"; break; } case "5": { this.edt_JCDJ.Text = "享受五级伤残待遇"; break; } case "6": { this.edt_JCDJ.Text = "享受六级伤残待遇"; break; } } if (ischronichosp == "true") this.edt_MXBDDYY.Text = "是"; else this.edt_MXBDDYY.Text = "否"; } public ReadCardInfo(JObject joPatInfo, int iOtherProvLocal) { InitializeComponent(); string persontype, sex, hospflag, isyt, jclevel, fundtype, ServantFlag, PoorFlag, InHospitalNumber, AreaCode; string isspecifiedhosp = "", isinredlist = "", ischronichosp = ""; //解析返回值 if (iOtherProvLocal == 0) //本地 { this.TitleText.Text = "医保中心返回参保人员信息(本地)"; this.edt_YBBH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.ic_no"); persontype = JsonHelper.getDestValue(joPatInfo, "root.output.net.persontype"); isspecifiedhosp = JsonHelper.getDestValue(joPatInfo, "root.output.net.isspecifiedhosp"); ischronichosp = JsonHelper.getDestValue(joPatInfo, "root.output.net.ischronichosp"); isinredlist = JsonHelper.getDestValue(joPatInfo, "root.output.net.isinredlist"); sex = JsonHelper.getDestValue(joPatInfo, "root.output.ic.sex"); hospflag = JsonHelper.getDestValue(joPatInfo, "root.output.ic.hospflag"); isyt = JsonHelper.getDestValue(joPatInfo, "root.output.ic.isyt"); jclevel = JsonHelper.getDestValue(joPatInfo, "root.output.ic.jclevel"); fundtype = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fundtype"); this.edt_XM.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.personname"); this.edt_KH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.card_no"); this.edt_SFZH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.id_no"); this.edt_CSRQ.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.birthday"); this.edt_ZZSX.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fromhospdate"); this.edt_ZZYYBM.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fromhosp"); this.edt_MBBM.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.chroniccode"); //慢病编码 this.edt_ZHYE.Text = JsonHelper.getDestValue(joPatInfo, "root.output.net.personcount"); } else { this.TitleText.Text = "医保中心返回参保人员信息(异地)"; this.edt_YBBH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.Person_manage"); persontype = JsonHelper.getDestValue(joPatInfo, "root.output.ic.persontype"); sex = JsonHelper.getDestValue(joPatInfo, "root.output.ic.sex"); hospflag = JsonHelper.getDestValue(joPatInfo, "root.output.ic.hospflag"); isyt = JsonHelper.getDestValue(joPatInfo, "root.output.ic.isyt"); jclevel = JsonHelper.getDestValue(joPatInfo, "root.output.ic.jclevel"); fundtype = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fundtype"); ServantFlag = JsonHelper.getDestValue(joPatInfo, "root.output.ic.ServantFlag"); PoorFlag = JsonHelper.getDestValue(joPatInfo, "root.output.ic.PoorFlag"); InHospitalNumber = JsonHelper.getDestValue(joPatInfo, "root.output.ic.InHospitalNumber"); AreaCode = JsonHelper.getDestValue(joPatInfo, "root.output.ic.AreaCode"); this.edt_XM.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.personname"); this.edt_KH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.card_no"); this.edt_SFZH.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.id_no"); this.edt_CSRQ.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.birthday"); this.edt_ZZSX.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fromhospdate"); this.edt_ZZYYBM.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.fromhosp"); this.edt_ZHYE.Text = JsonHelper.getDestValue(joPatInfo, "root.output.ic.personcount"); this.edt_AreaCode.Text = AreaCode; Global.pat.insuplc_admdvs = AreaCode; //参保地行政区划 } Global.pat.psn_no = this.edt_YBBH.Text; switch (persontype) { case "10": { this.edt_RYLB.Text = "本市复读的学生"; break; } case "11": { this.edt_RYLB.Text = "在职职工"; break; } case "12": { this.edt_RYLB.Text = "在职长期驻外"; break; } case "21": { this.edt_RYLB.Text = "退休"; break; } case "22": { this.edt_RYLB.Text = "退休异地安置"; break; } case "31": { this.edt_RYLB.Text = "离休"; break; } case "32": { this.edt_RYLB.Text = "二等乙级伤残军人"; break; } case "33": { this.edt_RYLB.Text = "离休异地安置"; break; } case "41": { this.edt_RYLB.Text = "遗孀"; break; } case "91": { this.edt_RYLB.Text = "其他人员"; break; } } Global.pat.psnTypeName = this.edt_RYLB.Text; if (sex == "1") this.edt_XB.Text = "男"; else this.edt_XB.Text = "女"; if (isinredlist == "true") this.edt_SFHMD.Text = "是"; else this.edt_SFHMD.Text = "不在红名单"; if (isspecifiedhosp == "0") { this.edt_BRDDYY.Text = "本地红名单,默认为定点医院"; } else if (isspecifiedhosp == "1") { this.edt_BRDDYY.Text = "是本人定点医院"; } else if (isspecifiedhosp == "2") { this.edt_BRDDYY.Text = "不是本人定点医院"; } else if (isspecifiedhosp == "3") { this.edt_BRDDYY.Text = "转诊医院"; } switch (fundtype) { case "1": { this.edt_XZLX.Text = "基本养老保险"; break; } case "2": { this.edt_XZLX.Text = "失业保险"; break; } case "3": { this.edt_XZLX.Text = "基本医疗保险"; break; } case "4": { this.edt_XZLX.Text = "工伤保险"; break; } case "5": { this.edt_XZLX.Text = "生育保险"; break; } case "6": { this.edt_XZLX.Text = "企业补充养老保险"; break; } case "7": { this.edt_XZLX.Text = "个人储蓄性养老保险"; break; } case "8": { this.edt_XZLX.Text = "预提补充医疗保险"; break; } case "81": { this.edt_XZLX.Text = "退休人员统一补充医疗保险"; break; } case "20": { this.edt_XZLX.Text = "大额医疗互助"; break; } case "30": { this.edt_XZLX.Text = "公务员医疗补助"; break; } case "31": { this.edt_XZLX.Text = "离休医疗费统筹"; break; } case "32": { this.edt_XZLX.Text = "公费医疗"; break; } case "33": { this.edt_XZLX.Text = "征地超转人员医疗保险"; break; } case "91": { this.edt_XZLX.Text = "学生儿童大病医疗保险"; break; } case "92": { this.edt_XZLX.Text = "城镇无保障老年人大病医疗保险"; break; } case "93": { this.edt_XZLX.Text = "城镇居民基本医疗保险"; break; } case "310": { this.edt_XZLX.Text = "职工基本医疗保险"; break; } case "320": { this.edt_XZLX.Text = "公务员医疗补助"; break; } case "330": { this.edt_XZLX.Text = "大额医疗费用补助"; break; } case "340": { this.edt_XZLX.Text = "离休人员医疗保障"; break; } case "350": { this.edt_XZLX.Text = "一至六级残废军人医疗补助"; break; } case "360": { this.edt_XZLX.Text = "老红军医疗保障"; break; } case "370": { this.edt_XZLX.Text = "企业补充医疗保险"; break; } case "380": { this.edt_XZLX.Text = "新型农村合作医疗"; break; } case "390": { this.edt_XZLX.Text = "城乡居民基本医疗保险"; break; } case "391": { this.edt_XZLX.Text = "城镇居民基本医疗保险"; break; } case "392": { this.edt_XZLX.Text = "城乡居民大病医疗保险"; break; } case "399": { this.edt_XZLX.Text = "其他特殊人员医疗保障"; break; } case "510": { this.edt_XZLX.Text = "生育保险"; break; } case "410": { this.edt_XZLX.Text = "长期照护保险"; break; } case "39906": { this.edt_XZLX.Text = "意外伤害保险"; break; } } Global.pat.insuTypeName = this.edt_XZLX.Text; if (isyt == "0") this.edt_YTRYBS.Text = "普通人员"; else this.edt_YTRYBS.Text = "预提人员"; switch (hospflag) { case "0": { this.edt_ZYBS.Text = "未住院状态"; break; } case "1": { this.edt_ZYBS.Text = "住院状态"; break; } case "2": { this.edt_ZYBS.Text = "急诊留观"; break; } case "3": { this.edt_ZYBS.Text = "家庭病床"; break; } case "4": { this.edt_ZYBS.Text = "住院计划生育手术"; break; } case "41": { this.edt_ZYBS.Text = "工伤保险住院状态"; break; } case "51": { this.edt_ZYBS.Text = "生育保险住院状态"; break; } } switch (jclevel) { case "0": { this.edt_JCDJ.Text = "不享受伤残待遇"; break; } case "1": { this.edt_JCDJ.Text = "享受一级伤残待遇"; break; } case "2": { this.edt_JCDJ.Text = "享受二级伤残待遇"; break; } case "3": { this.edt_JCDJ.Text = "享受三级伤残待遇"; break; } case "4": { this.edt_JCDJ.Text = "享受四级伤残待遇"; break; } case "5": { this.edt_JCDJ.Text = "享受五级伤残待遇"; break; } case "6": { this.edt_JCDJ.Text = "享受六级伤残待遇"; break; } } if (ischronichosp == "true") this.edt_MXBDDYY.Text = "是"; else this.edt_MXBDDYY.Text = "否"; } private void btnOK_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; } private void btnCancel_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; } } }