123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- using Newtonsoft.Json.Linq;
- using PTMedicalInsurance.Helper;
- using Sunny.UI;
- 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.Variables;
- using static System.Windows.Forms.VisualStyles.VisualStyleElement;
- using PTMedicalInsurance.Business;
- using FastReport.Utils;
- using PTMedicalInsurance.FormSetter;
- using FastReport.DevComponents.Editors;
- namespace HuBeiMI.Forms
- {
- public partial class SpecialPsn : Form
- {
- HisMainBusiness hBus = new HisMainBusiness();
- private InvokeHelper invoker = new InvokeHelper();
- InsuServices rIS = new InsuServices();
- GridViewSetter grdSetter = new GridViewSetter();
- public SpecialPsn()
- {
- InitializeComponent();
- }
- private void SpecialPsn_Load(object sender, EventArgs e)
- {
- uiTextBox7.Text = Global.inf.hospitalNO;
- uiTextBox8.Text = Global.inf.hospitalName;
- }
- private void uiLabel12_Click(object sender, EventArgs e)
- {
- }
- private void uiButton1_Click(object sender, EventArgs e)
- {
- dynamic jyjo = new JObject();
- jyjo.page_num = "1";//分页默认1 必填
- jyjo.page_size = "200";//页大小默认200 必填
- jyjo.ipt_psn_sp_flag_detl_id = uiTextBox1.Text;//住院人员特殊标识明细id 字符型 40
- jyjo.mdtrt_id = uiTextBox2.Text;//就诊ID 字符型 30
- jyjo.psn_no = uiTextBox3.Text;//人员编号 字符型 30
- jyjo.psn_cert_type = uiTextBox4.Text;//人员证件类型 字符型 6
- jyjo.certno = uiTextBox5.Text;//证件号码 字符型 50
- jyjo.psn_name = uiTextBox6.Text;//人员姓名 字符型 50
- jyjo.fixmedins_code = uiTextBox7.Text;//定点医药机构编号 字符型 30
- jyjo.fixmedins_name = uiTextBox8.Text;//定点医药机构名称 字符型 200
- jyjo.ipt_otp_no = uiTextBox9.Text;//住院/ 门诊号 字符型 30
- jyjo.ipt_psn_sp_flag_type = uiTextBox10.Text;//住院人员特殊标识类型 字符型 6
- jyjo.ipt_psn_sp_flag = uiTextBox11.Text;//住院人员特殊标识 字符型 6
- jyjo.admdvs = uiTextBox12.Text;//医保区划 字符型 6
-
- JObject data1= new JObject();
- data1.Add("data",jyjo);
- InvokeHelper invoker = new InvokeHelper();
- JObject joRtn = invoker.invokeCenterService("2407", JsonHelper.setCenterInpar("2407", data1.ToString()));
- if (JsonHelper.parseCenterRtnValue(joRtn, out string errMsg) != 0)
- {
- MessageBox.Show("查询出错:" + joRtn["err_msg"].ToString());
- }
- }
- private void uiPanel1_Click(object sender, EventArgs e)
- {
- }
- private void uiButton2_Click(object sender, EventArgs e)
- {
- HisMainBusiness hBus = new HisMainBusiness();
- string outParam = "";
- string errMsg = "";
- Global.pat.admType = 1;
- string patInfo = "";
- //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
- if (hBus.readCard(out outParam) != 0)
- {
- MessageBox.Show("读卡失败!" + outParam.ToString());
- }
- else
- {
- patInfo = outParam;
- //展示患者信息界面
- if (hBus.showPatInfo(patInfo, out outParam) != 0)
- {
-
- }
- }
- //患者信息赋值给全局变量
- patInfo = outParam;
- if (hBus.setGlobalPatAfaterShowPatInfo(patInfo, out errMsg) != 0)
- {
- MessageBox.Show("赋值患者参保信息失败:"+ errMsg.ToString());
- }
- uiTextBox3.Text = Global.pat.psn_no;
- uiTextBox4.Text = "01";
- uiTextBox5.Text = Global.pat.certNO;
- uiTextBox6.Text = Global.pat.name;
- uiTextBox12.Text = Global.pat.insuplc_admdvs;
- }
- private void uiButton4_Click(object sender, EventArgs e)
- {
- HisMainBusiness hBus = new HisMainBusiness();
- string outParam = "";
- string errMsg = "";
- Global.pat.admType = 1;
- string patInfo = "";
- //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
- if (hBus.readCard(out outParam) != 0)
- {
- MessageBox.Show("读卡失败!" + outParam.ToString());
- }
- else
- {
- patInfo = outParam;
- //展示患者信息界面
- if (hBus.showPatInfo(patInfo, out outParam) != 0)
- {
- }
- }
- //患者信息赋值给全局变量
- patInfo = outParam;
- if (hBus.setGlobalPatAfaterShowPatInfo(patInfo, out errMsg) != 0)
- {
- MessageBox.Show("赋值患者参保信息失败:" + errMsg.ToString());
- }
- uiTextBox14.Text = Global.pat.psn_no;
- uiTextBox15.Text = "01";
- uiTextBox16.Text = Global.pat.certNO;
- uiTextBox17.Text = Global.pat.name;
- uiTextBox21.Text = Global.pat.insuplc_admdvs;
- }
- private void uiButton3_Click(object sender, EventArgs e)
- {
- dynamic jysc = new JObject();
- jysc.mdtrt_id = uiTextBox13.Text;//就诊ID 字符型 30
- jysc.psn_no = uiTextBox14.Text;//人员编号 字符型 30
- jysc.psn_cert_type = uiTextBox15.Text;//人员证件类型 字符型 6
- jysc.certno = uiTextBox16.Text;//证件号码 字符型 50
- jysc.psn_name = uiTextBox17.Text;//人员姓名 字符型 50
- jysc.ipt_otp_no = uiTextBox18.Text;//住院/ 门诊号 字符型 30
- jysc.ipt_psn_sp_flag_type = uiTextBox19.Text;//住院人员特殊标识类型 字符型 6
- jysc.ipt_psn_sp_flag = uiTextBox20.Text;//住院人员特殊标识 字符型 6
- jysc.memo=uiTextBox22.Text;//备注
- jysc.admdvs = uiTextBox21.Text;//医保区划 字符型 6
- JObject data2 = new JObject();
- data2.Add("data", jysc);
- InvokeHelper invoker = new InvokeHelper();
- JObject joRtn = invoker.invokeCenterService("2406", JsonHelper.setCenterInpar("2406", data2.ToString()));
- if (JsonHelper.parseCenterRtnValue(joRtn, out string errMsg) != 0)
- {
- MessageBox.Show("查询出错:" + joRtn["err_msg"].ToString());
- }
- else
- {
- MessageBox.Show("上传成功!");
- }
- }
- private void uiTextBox23_TextChanged(object sender, EventArgs e)
- {
- }
- private void uiDatetimePicker1_ValueChanged(object sender, DateTime value)
- {
- }
- private void uiLabel31_Click(object sender, EventArgs e)
- {
- }
- private void uiButton5_Click(object sender, EventArgs e)
- {
- //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
- if (hBus.readCard(out string outParam) != 0)
- {
- MessageBox.Show("读卡失败!" + outParam);
- }
- else
- {
- //展示患者信息界面
- if (hBus.showPatInfo(outParam, out outParam) != 0)
- {
- MessageBox.Show(outParam);
- }
- else
- {
-
- }
-
- if (hBus.setGlobalPatAfaterShowPatInfo(outParam, out string errMsg) != 0)
- {
-
- }
- uiTextBox23.Text = Global.pat.psn_no;
- uiTextBox24.Text = Global.pat.insuType;
- }
- }
- private void uiButton6_Click(object sender, EventArgs e)
- {
- string Yllb = "";
- if (uiComboBox1.SelectedIndex == 0)
- {
- Yllb = "11";
- }
- else if (uiComboBox1.SelectedIndex == 1)
- {
- Yllb = "110104";
- }
- else if (uiComboBox1.SelectedIndex == 2)
- {
- Yllb = "21";
- }
- //人员待遇享受检查
- string errMsg = "";
- JObject joData2001 = new JObject();
- joData2001.Add("psn_no", uiTextBox23.Text);
- joData2001.Add("insutype", uiTextBox24.Text);
- joData2001.Add("fixmedins_code", Global.inf.hospitalNO);
- joData2001.Add("med_type", Yllb);
- joData2001.Add("begntime", uiDatetimePicker1.Text);
- joData2001.Add("endtime", uiDatetimePicker2.Text);
- joData2001.Add("dise_codg", "");
- joData2001.Add("dise_name", "");
- joData2001.Add("oprn_oprt_code", "");
- joData2001.Add("oprn_oprt_name", "");
- joData2001.Add("matn_type", "");
- joData2001.Add("birctrl_type", "");
- joData2001.Add("exp_content", "");
- JObject joInput = new JObject();
- joInput.Add("data", joData2001);
- InvokeHelper invoker = new InvokeHelper();
- JObject joRtn2001 = invoker.invokeCenterService("2001", JsonHelper.setCenterInpar("2001", joInput));
- JObject OutIDInfo = new JObject();
- JArray joDic;
- if (JsonHelper.parseCenterRtnValue(joRtn2001, out errMsg) != 0)
- {
- MessageBox.Show("人员待遇享受检查调用失败,中心返回错误信息:" + errMsg);
- }
- else
- {
- JArray joTrtinfo = JArray.Parse(JsonHelper.getDestValue(joRtn2001, "output.trtinfo"));
- // MessageBox.Show("获取到返回值数组" + joTrtinfo.ToString());
- // MessageBox.Show("数组数量" + joTrtinfo.Count);
- if (joTrtinfo.Count > 0)
- {
- for (int i = 0; i < joTrtinfo.Count; i++)
- {
- OutIDInfo = rIS.getSpecDictionaryValue(Global.inf.interfaceDr.ToString(), "fund_pay_type", joRtn2001["output"]["trtinfo"][i]["fund_pay_type"].ToString());
- joDic = JArray.Parse(JsonHelper.getDestValue(OutIDInfo, "result.data"));
- if (joDic.Count > 1)
- {
- joRtn2001["output"]["trtinfo"][i]["fund_pay_type"] = joDic[1]["name"].ToString();
- }
- }
- }
- //MessageBox.Show("转换后数据" + joRtn2001["output"]["trtinfo"].ToString());
- DataTable dt = (DataTable)joRtn2001["output"]["trtinfo"].ToObject(typeof(DataTable));
- grdSetter.SetTreatmentEnjoyVerify(DGV2001);
- DGV2001.DataSource = dt;
- }
- }
- }
- }
|