| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580 |
- using Newtonsoft.Json;
- using Newtonsoft.Json.Linq;
- 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 PTMedicalInsurance.Common;
- using PTMedicalInsurance.Helper;
- using PTMedicalInsurance.Variables;
- namespace PTMedicalInsurance.Forms
- {
- public partial class OutpatientRegistrationRegisterOP : Form
- {
- public OutpatientRegistrationRegisterOP(JObject joPatInfo, int iOtherProvLocal)
- {
- InitializeComponent();
- this.StartPosition = FormStartPosition.CenterParent;
- string sqlCondition = " and A.Interface_Dr = '" + Global.inf.interfaceDr.ToString() + "'";
- if (Global.pat.RYorCY == "2")
- {
- string sqlStr = " SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr "
- + " WHERE B.Code='" + Global.pat.insuType + "' and A.InsuCode = 'BAE059'" + sqlCondition;
- SetDBLKCombox(ref dblkcbxInsuranceType, sqlStr);
- sqlStr = " SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr"
- + " WHERE B.Code='" + Global.pat.medType + "' and A.InsuCode = 'AKA130'" + sqlCondition;
- SetDBLKCombox(ref dblkcbxMedicalType, sqlStr);
- }
- else
- {
- string sqlStr = " SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr "
- + " WHERE A.InsuCode = 'BAE059'" + sqlCondition;
- SetDBLKCombox(ref dblkcbxInsuranceType, sqlStr);
- sqlStr = " SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr "
- + " WHERE A.InsuCode = 'AKA130'" + sqlCondition;
- SetDBLKCombox(ref dblkcbxMedicalType, sqlStr);
- }
- cbxAccountPay.Checked = true;
- personAccountUsedFlag = "1";
- #region【赋值医保人员参保信息】
- 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 = "否";
- #endregion
- }
- private DataTable dtDisease;
- private DataTable dtDiseaseType;
- private DataTable dtInsuranceType;
- private DataTable dtMedicalType;
- private DataTable dtOperation;
- private DataTable dtSettelmentType;
- //险种
- public string insuType { get; set; }
- public string insuTypeName { get; set; }
- //医疗类别
- public string med_type { get; set; }
- public string med_type_name { get; set; }
- //诊断
- public string diseCodg { get; set; }
- public string diseName { get; set; }
- //手术
- public string oprn_oprt_code { get; set; }
- public string oprn_oprt_name { get; set; }
- //病种
- public string dise_type_code { get; set; }
- public string dise_type_name { get; set; }
- //结算方式
- public string psn_setlway { get; set; }
- public string psn_setlway_name { get; set; }
- public DataTable DtDiagnose { get; set; }
- public string personAccountUsedFlag = "0";
- private DataTable GetDBLKComboxTable(string sqlStr)
- {
- InvokeHelper invoker = new InvokeHelper();
- dynamic joInparm = new JObject();
- dynamic joTmp = new JObject();
- joTmp.sqlStr = sqlStr;
- JArray jaParams = new JArray();
- jaParams.Add(joTmp);
- joInparm.Add("params", JArray.FromObject(jaParams));
- joInparm.code = "09010014";
- string inParam = joInparm.ToString();
- JObject joRtn = invoker.invokeInsuService(inParam, "获取下拉框消息");
- //dynamic jsonRtn = JsonConvert.DeserializeObject(strRtn);
- DataTable dt = (DataTable)joRtn["result"].ToObject(typeof(DataTable));
- //dt.Columns[0].ColumnName = "编码";
- //dt.Columns[1].ColumnName = "名称";
- //dt.Columns[2].ColumnName = "拼音查找码";
- return dt;
- }
- private void SetDBLKCombox(ref PTControl.DBLookupCombox dblcbx, string sqlStr)
- {
- dblcbx.sDisplayField = "Code,Name,SearchCode";
- dblcbx.sDisplayMember = "名称";
- dblcbx.sKeyWords = "Code,SearchCode";
- dblcbx.DataSource = GetDBLKComboxTable(sqlStr);
- dblcbx.RowFilterVisible = true;
- dblcbx.TextBox.Width = 400;
- dblcbx.DataGridView.Width = 400;
- dblcbx.DataGridView.Columns[0].Name = "编码";
- dblcbx.DataGridView.Columns[1].Name = "名称";
- dblcbx.DataGridView.Columns[2].Name = "查找码";
- dblcbx.DataGridView.Columns[0].Width = 100;
- dblcbx.DataGridView.Columns[1].Width = 200;
- }
- private void OutpatientRegistrationRegisterOP_Load(object sender, EventArgs e)
- {
- dgvDiagnose.AutoGenerateColumns = false;
- dgvDiagnose.DataSource = DtDiagnose;
- //DtDiagnose.AcceptChanges();
- dgvDiagnose.ReadOnly = true;
- }
- private void btnOK_Click(object sender, EventArgs e)
- {
- if (cbxAccountPay.Checked)
- {
- personAccountUsedFlag = "1";
- Global.pat.personAccountUsedFlag = 1;
- }
- else
- {
- personAccountUsedFlag = "0";
- Global.pat.personAccountUsedFlag = 0;
- }
- if (chk_SJDSFBZ.Checked)
- Global.pat.relttpflag = 1;
- else
- Global.pat.relttpflag = 0;
- if (chk_WSBZ.Checked)
- Global.pat.trumflag = 1;
- else
- Global.pat.trumflag = 0;
- if (cbb_JZRQLX.SelectedIndex >= 0)
- Global.pat.mdtrtgrptype = cbb_JZRQLX.Text.Trim().Substring(0, 1);
- this.DialogResult = DialogResult.OK;
- }
- private void dblkcbxInsuranceType_AfterSelector(object sender, PTControl.AfterSelectorEventArgs e)
- {
- DataGridViewRow row = e.Value as DataGridViewRow;
- DataRowView dataRow = row.DataBoundItem as DataRowView;
- insuType = dataRow["Code"].ToString().Trim();
- insuTypeName = dataRow["Name"].ToString().Trim();
- Global.pat.insuType = insuType;
- }
- private void dblkcbxMedicalType_AfterSelector(object sender, PTControl.AfterSelectorEventArgs e)
- {
- DataGridViewRow row = e.Value as DataGridViewRow;
- DataRowView dataRow = row.DataBoundItem as DataRowView;
- med_type = dataRow["Code"].ToString().Trim();
- med_type_name = dataRow["Name"].ToString().Trim();
- Global.pat.medType = med_type;
- Global.pat.medTypeName = med_type_name;
- }
- private void btnCancel_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- }
- }
- }
|