123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- 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 OutpatientRegistration : Form
- {
- public OutpatientRegistration()
- {
- InitializeComponent();
-
- //字典类,目录类查询都用区域医保对应的接口目录DR
- string sqlCondition = " and A.Interface_Dr = '" + Global.inf.InsuRegionInterfaceDr.ToString() + "'";
- //险种
- 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 = 'ykb065'" + 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);
-
- personAccountUsedFlag = "1";
- Global.pat.payByQrCode = false;
- }
- private DataTable dtDisease;
- private DataTable dtInsuranceType;
- private DataTable dtMedicalType;
- //险种
- public string insuType { get; set; }
- public string insuTypeName { get; set; }
- //医疗类别
- public string med_type { get; set; }
- public string med_type_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 OutpatientRegistration_Load(object sender, EventArgs e)
- {
- dgvDiagnose.AutoGenerateColumns = false;
- dgvDiagnose.DataSource = DtDiagnose;
- //DtDiagnose.AcceptChanges();
- dgvDiagnose.ReadOnly = true;
- }
- private void button1_Click_1(object sender, EventArgs e)
- {
- if (cbxQrCodePay.Checked)
- {
- Global.pat.payByQrCode = true;
- }
- Global.pat.patExtend.isMutualAid = cbMutualAid.Checked;
- 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();
- }
- 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;
- }
- private void button2_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- }
- }
- }
|