Selaa lähdekoodia

feat: 工伤人员信息查询

zhengjie 1 vuosi sitten
vanhempi
commit
b1ddf77b1b

+ 9 - 28
Business/HisMainBusiness.cs

@@ -120,21 +120,11 @@ namespace PTMedicalInsurance.Business
             inf.cardURL = inf.centerURL;
             inf.ecURL = "http://ec.yn.hsip.gov.cn/localcfc/api/hsecfc/localQrCodeQuery";
 
-            //瑶海正式环境应该配置到服务器
-            //inf.BusinessID = "41a8514ba8ed429eb4dde381eda02fe0";   //商务ID码 
-            //inf.CreditID = "91530112MA6Q3GGC1E";                   //服务商统一社会信用代码
-
-            // 根据参保地固定收费员
-            //if (string.IsNullOrEmpty(inf.areaCode) || inf.areaCode.Substring(0, 4) == "3401")
-            //{
-            //    inf.areaCode = "340100";
-            //    Global.user.ID = "7571C4995A2F4290";
-            //}
-            //else
-            //{
-            //    inf.areaCode = "349900";
-            //    Global.user.ID = "48664E4455CC0F8F";
-            //}
+            // 根据接口确定是否走基线版
+            if (inf.interfaceDr == 27)
+            {
+                Global.curEvt.ext.BaseLineMode = false;
+            }
 
             inf.cainfo = "";
         }
@@ -169,19 +159,10 @@ namespace PTMedicalInsurance.Business
             inf.cardURL = inf.centerURL;
             inf.ecURL = "http://ec.yn.hsip.gov.cn/localcfc/api/hsecfc/localQrCodeQuery";
 
-            //inf.BusinessID = "41a8514ba8ed429eb4dde381eda02fe0";   //商务ID码 
-            //inf.CreditID = "91530112MA6Q3GGC1E";                   //服务商统一社会信用代码
-
-            //if (string.IsNullOrEmpty(inf.areaCode) || inf.areaCode.Substring(0, 4) == "3401")
-            //{
-            //    inf.areaCode = "340100";
-            //    Global.user.ID = "7571C4995A2F4290";
-            //}
-            //else
-            //{
-            //    inf.areaCode = "349900";
-            //    Global.user.ID = "48664E4455CC0F8F";
-            //}
+            if (inf.interfaceDr == 27)
+            {
+                Global.curEvt.ext.BaseLineMode = false;
+            }
 
             inf.cainfo = "";
 

+ 22 - 0
Business/Local/InjuryIPSettlementService.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PTMedicalInsurance.Business.Local
+{
+    class InjuryIPSettlementService : IChargeService
+    {
+        public string Charge(string operationType, JObject joInput)
+        {
+            throw new NotImplementedException();
+        }
+
+        public string DisCharge(JObject joParam)
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 46 - 0
Business/Local/InjuryOPSettlementService.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Variables;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PTMedicalInsurance.Business.Local
+{
+    class InjuryOPSettlementService : IChargeService
+    {
+        public string Charge(string operationType, JObject joInput)
+        {
+            Global.operationType = operationType;
+            //joInput 包括( data、mdtrtinfo、diseinfo、settlement)
+            ProcessManager pManager = new ProcessManager()
+            .Add(new InjuryQueryProcess())
+            // 门诊登记[MZ002]
+            .Add(new OPAdmUploadProcess())
+            // 费用上传[FY001] 
+            .Add(new OPFeeUploadProcess())
+            // 门诊预结算[FY004]
+            .Add(new OPPreSettlementProcess())
+            // 正式结算[FY005]
+            .Add(new OPSettlementProcess());
+            // 执行
+            return pManager.Run(joInput);
+        }
+
+        public string DisCharge(JObject joParam)
+        {
+            ProcessManager pManager = new ProcessManager()
+                // 查询结算信息
+                .Add(new OPQuerySettlementProcess())
+                // 门诊结算撤销 [JY002]
+                .Add(new OPSettlementCancelProcess())
+                // 费用明细取消[JY001]
+                .Add(new OPFeeUploadCancelProcess())
+                // 退HIS结算
+                .Add(new OPSettlementCancelHisProcess(true));
+            // 执行
+            return pManager.Run(joParam);
+        }
+    }
+}

+ 142 - 0
Business/Local/InjuryQueryProcess.cs

@@ -0,0 +1,142 @@
+using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Common;
+using PTMedicalInsurance.Forms;
+using PTMedicalInsurance.Helper;
+using PTMedicalInsurance.Variables;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace PTMedicalInsurance.Business.Local
+{
+    /// <summary>
+    /// 查询是否工伤人员及信息
+    /// </summary>
+    class InjuryQueryProcess : AbstractProcess
+    {
+        public override CallResult Process(JObject input)
+        {
+            string patInfo = "";
+            ChooseCard cc = new ChooseCard();
+            cc.NameMustBeNotNull = true;
+
+            IntPtr hWind = WinApi.GetWindowHandle("prBrowser");
+            DialogResult dialog = DialogResult.None;
+            if (hWind != IntPtr.Zero)
+            {
+                dialog = cc.ShowDialog(new WindowWrapper(hWind));
+            }
+            else
+            {
+                dialog = cc.ShowDialog();
+            }
+            if (dialog == DialogResult.OK)
+            {
+                //身份证
+                if (cc.cardType == "02")
+                {
+                    Global.pat.mdtrtcertType = "02";
+                    Global.pat.mdtrtcertNO = cc.ID;
+                    var ret = InjuryQuery();
+                    if (ret.code != 0)
+                    {
+                        return Exception("查询工伤信息失败", ret.data);
+                    }
+                    patInfo = ret.data;
+                }
+                else {
+                    return Exception(-1, "查询工伤信息只能用身份证+姓名", outParam);
+                }
+            }
+
+            // 返回:data、mdtrtinfo、diseinfo、settlement
+            if (hBus.showOutPatRegisterForm(patInfo, out outParam) != 0)
+            {
+                return Exception(-1, "显示登记面板", outParam);
+            }
+
+            //用于没有返回病人信息时增加
+            JObject joInput = JObject.Parse(outParam);
+            JObject joPatInfo = JObject.Parse(patInfo);
+            joInput["patInfo"] = joPatInfo;
+
+            outParam = joInput.ToString();
+
+            return Success();
+        }
+
+        // 查询工伤信息并展示
+        private (int code,string data) InjuryQuery()
+        {
+            string outParam = "";
+            int code = 0;
+            if (tradeGS001(out outParam) != 0)
+            {
+                string patInfo = outParam;
+                code = showPatInfo(patInfo, out outParam);
+            }
+            return (code, outParam);
+        }
+        // 查询工伤接口
+        public int tradeGS001(out string outParam)
+        {
+            outParam = "";
+            string errorMsg = "";
+            JObject joInput = new JObject();
+            joInput.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
+            joInput.Add("mdtrt_cert_no", Global.pat.mdtrtcertNO);
+
+            InvokeHelper invoker = new InvokeHelper();
+            JObject joRtn = invoker.invokeCenterService(TradeEnum.PatientInjuryInfo, joInput);
+
+            if (JsonHelper.parseCenterRtnValue(joRtn, out errorMsg) != 0)
+            {
+                outParam = "获取工伤信息失败:" + errorMsg;
+                return -1;
+            }
+            else
+            {
+                outParam = joRtn.ToString();
+                return 0;
+            }
+        }
+
+        public int showPatInfo(String patInfo, out string outparam)
+        {
+            outparam = "";
+            //展示信息界面
+            JObject joOutparam = JObject.Parse(patInfo);
+            JObject joOutput = JObject.Parse(JsonHelper.getDestValue(joOutparam, "output"));
+            PatientInjuryForm frmPatientInfo = new PatientInjuryForm();
+            //相关信息转换到登记面板
+            try
+            {
+                frmPatientInfo.SetInjuryInfo(joOutput);
+                if (frmPatientInfo.ShowDialog() == DialogResult.OK)
+                {
+
+                    //现在用转换之前的
+                    JArray jaInsuInfo = JArray.Parse(JsonHelper.getDestValue(joOutput, "insuinfo"));
+                    JObject joSelectedInsuInfo = (JObject)jaInsuInfo[frmPatientInfo.insuInfoIndex];
+
+                    joOutparam.Property("output").AddBeforeSelf(new JProperty("selectedInsuInfo", joSelectedInsuInfo));
+                    outparam = joOutparam.ToString();
+                    return 0;
+                }
+                else
+                {
+                    outparam = JsonHelper.setExceptionJson(-1, "门诊读卡", "收款员取消读卡").ToString();
+                    return -1;
+                }
+            }
+            catch (Exception e)
+            {
+                outparam = JsonHelper.setExceptionJson(-1, "患者参保信息展示", e.Message).ToString();
+                return -1;
+            }
+        }
+    }
+}

+ 2 - 11
Business/Local/ReadCardProcess.cs

@@ -43,7 +43,6 @@ namespace PTMedicalInsurance.Business
                     //电子凭证
                     if (cc.cardType == "01")
                     {
-
                         Global.pat.mdtrtcertType = "01";
                         Global.businessType = cc.businessType;
                         tradeEcToken(out outParam);
@@ -55,14 +54,8 @@ namespace PTMedicalInsurance.Business
                     if (cc.cardType == "02")
                     {
                         Global.pat.mdtrtcertType = "02";
-                        //读身份证
-                        CardReader reader = new CardReader();
-                        int rtn = reader.ReadSFZ(out outParam);
-                        if (rtn == 0)
-                        {
-                            trade1101(out outParam);
-                        }
-
+                        Global.pat.mdtrtcertNO = cc.ID;
+                        trade1101(out outParam);
                         return Success();
                     }
                     //社保卡
@@ -71,8 +64,6 @@ namespace PTMedicalInsurance.Business
                         #region 调用读卡接口信息
 
                         Global.pat.mdtrtcertType = "03";
-                        
-                        //return trade1161(out outParam);
                         int rtn = 0;
                         if (!Global.curEvt.enabledDebug)
                         {

+ 12 - 15
Forms/ChooseCard.cs

@@ -23,9 +23,13 @@ namespace PTMedicalInsurance.Forms
         public string ID,PatName;
         public int sL_CardType;
 
+        // 姓名是否必填
+        public bool NameMustBeNotNull = false;
+
         //设置业务实例
         InvokeHelper invoker = new InvokeHelper();
 
+
         public ChooseCard()
         {
             InitializeComponent();
@@ -37,32 +41,25 @@ namespace PTMedicalInsurance.Forms
         {
             cardType = "0" + (rbgCardType.SelectedIndex +1).ToString();
             businessType = "01"+cbBusinessType.Text.Substring(0,3);
-
             Global.pat.OtherProv = rbgOtherProv.SelectedIndex;
 
-            //if (rbgCardType.SelectedIndex == 0)
-            //{
-            //    if (string.IsNullOrEmpty(tbID.Text.Trim()))
-            //    {
-            //        MessageBox.Show("请先扫电子医保码!");
-            //        tbID.Focus();
-            //        return;
-            //    } else
-            //    {
-            //        Global.pat.ecCardNo = tbID.Text.Trim();
-            //    }
-            //}
-
             if ((rbgOtherProv.SelectedIndex == 1)&&(cbCBD.Text==""))
             {
                 MessageBox.Show("异地结算,请选择统筹区!");
                 return;
             }
+
             // 身份证
             if (rbgCardType.SelectedIndex == 1)
             {
                 ID = tbID.Text;
-                PatName = tbName.Text;
+            }
+            PatName = tbName.Text;
+            if (NameMustBeNotNull && string.IsNullOrEmpty(PatName))
+            {
+                MessageBox.Show("姓名不能为空,请输入!");
+                tbName.Focus();
+                return;
             }
 
             //社保卡

+ 473 - 0
Forms/PatientInjuryForm.Designer.cs

@@ -0,0 +1,473 @@
+
+namespace PTMedicalInsurance.Forms
+{
+    partial class PatientInjuryForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.tbBirthDay = new Sunny.UI.UITextBox();
+            this.tbAge = new Sunny.UI.UITextBox();
+            this.lbAge = new Sunny.UI.UILabel();
+            this.lb1 = new Sunny.UI.UILabel();
+            this.tbPsnNO = new Sunny.UI.UITextBox();
+            this.tbNaty = new Sunny.UI.UITextBox();
+            this.uiLabel27 = new Sunny.UI.UILabel();
+            this.uiLabel28 = new Sunny.UI.UILabel();
+            this.tbCertNO = new Sunny.UI.UITextBox();
+            this.tbCertType = new Sunny.UI.UITextBox();
+            this.uiLabel25 = new Sunny.UI.UILabel();
+            this.uiLabel26 = new Sunny.UI.UILabel();
+            this.tbGend = new Sunny.UI.UITextBox();
+            this.tbName = new Sunny.UI.UITextBox();
+            this.uiLabel20 = new Sunny.UI.UILabel();
+            this.uiLabel21 = new Sunny.UI.UILabel();
+            this.gbInsuInfo = new Sunny.UI.UIGroupBox();
+            this.dgvWorkInjuryInfo = new Sunny.UI.UIDataGridView();
+            this.pnlClient = new Sunny.UI.UIPanel();
+            this.gbBaseInfo = new Sunny.UI.UIGroupBox();
+            this.btnCancel = new Sunny.UI.UIButton();
+            this.btnOK = new Sunny.UI.UIButton();
+            this.pnlBottom = new Sunny.UI.UIPanel();
+            this.gbInsuInfo.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvWorkInjuryInfo)).BeginInit();
+            this.pnlClient.SuspendLayout();
+            this.gbBaseInfo.SuspendLayout();
+            this.pnlBottom.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // tbBirthDay
+            // 
+            this.tbBirthDay.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbBirthDay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbBirthDay.Location = new System.Drawing.Point(747, 32);
+            this.tbBirthDay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbBirthDay.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbBirthDay.Name = "tbBirthDay";
+            this.tbBirthDay.ShowText = false;
+            this.tbBirthDay.Size = new System.Drawing.Size(126, 25);
+            this.tbBirthDay.TabIndex = 75;
+            this.tbBirthDay.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbBirthDay.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbAge
+            // 
+            this.tbAge.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbAge.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbAge.Location = new System.Drawing.Point(747, 65);
+            this.tbAge.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbAge.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbAge.Name = "tbAge";
+            this.tbAge.ShowText = false;
+            this.tbAge.Size = new System.Drawing.Size(126, 25);
+            this.tbAge.TabIndex = 77;
+            this.tbAge.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbAge.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // lbAge
+            // 
+            this.lbAge.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lbAge.Location = new System.Drawing.Point(672, 67);
+            this.lbAge.Name = "lbAge";
+            this.lbAge.Size = new System.Drawing.Size(68, 23);
+            this.lbAge.TabIndex = 78;
+            this.lbAge.Text = "年龄";
+            this.lbAge.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.lbAge.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // lb1
+            // 
+            this.lb1.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.lb1.Location = new System.Drawing.Point(672, 34);
+            this.lb1.Name = "lb1";
+            this.lb1.Size = new System.Drawing.Size(68, 23);
+            this.lb1.TabIndex = 76;
+            this.lb1.Text = "出生日期";
+            this.lb1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.lb1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbPsnNO
+            // 
+            this.tbPsnNO.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbPsnNO.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbPsnNO.Location = new System.Drawing.Point(465, 32);
+            this.tbPsnNO.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbPsnNO.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbPsnNO.Name = "tbPsnNO";
+            this.tbPsnNO.ShowText = false;
+            this.tbPsnNO.Size = new System.Drawing.Size(200, 25);
+            this.tbPsnNO.TabIndex = 74;
+            this.tbPsnNO.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbPsnNO.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbNaty
+            // 
+            this.tbNaty.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbNaty.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbNaty.Location = new System.Drawing.Point(273, 32);
+            this.tbNaty.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbNaty.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbNaty.Name = "tbNaty";
+            this.tbNaty.ShowText = false;
+            this.tbNaty.Size = new System.Drawing.Size(100, 25);
+            this.tbNaty.TabIndex = 73;
+            this.tbNaty.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbNaty.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel27
+            // 
+            this.uiLabel27.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel27.Location = new System.Drawing.Point(380, 34);
+            this.uiLabel27.Name = "uiLabel27";
+            this.uiLabel27.Size = new System.Drawing.Size(78, 23);
+            this.uiLabel27.TabIndex = 72;
+            this.uiLabel27.Text = "人员编号";
+            this.uiLabel27.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel27.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel28
+            // 
+            this.uiLabel28.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel28.Location = new System.Drawing.Point(193, 34);
+            this.uiLabel28.Name = "uiLabel28";
+            this.uiLabel28.Size = new System.Drawing.Size(73, 23);
+            this.uiLabel28.TabIndex = 71;
+            this.uiLabel28.Text = "民族";
+            this.uiLabel28.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel28.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbCertNO
+            // 
+            this.tbCertNO.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbCertNO.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbCertNO.Location = new System.Drawing.Point(465, 65);
+            this.tbCertNO.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbCertNO.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbCertNO.Name = "tbCertNO";
+            this.tbCertNO.ShowText = false;
+            this.tbCertNO.Size = new System.Drawing.Size(200, 25);
+            this.tbCertNO.TabIndex = 70;
+            this.tbCertNO.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbCertNO.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbCertType
+            // 
+            this.tbCertType.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbCertType.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbCertType.Location = new System.Drawing.Point(273, 65);
+            this.tbCertType.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbCertType.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbCertType.Name = "tbCertType";
+            this.tbCertType.ShowText = false;
+            this.tbCertType.Size = new System.Drawing.Size(100, 25);
+            this.tbCertType.TabIndex = 69;
+            this.tbCertType.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbCertType.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel25
+            // 
+            this.uiLabel25.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel25.Location = new System.Drawing.Point(380, 67);
+            this.uiLabel25.Name = "uiLabel25";
+            this.uiLabel25.Size = new System.Drawing.Size(78, 23);
+            this.uiLabel25.TabIndex = 68;
+            this.uiLabel25.Text = "证件号码";
+            this.uiLabel25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel25.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel26
+            // 
+            this.uiLabel26.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel26.Location = new System.Drawing.Point(193, 67);
+            this.uiLabel26.Name = "uiLabel26";
+            this.uiLabel26.Size = new System.Drawing.Size(73, 23);
+            this.uiLabel26.TabIndex = 67;
+            this.uiLabel26.Text = "证件类型";
+            this.uiLabel26.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel26.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbGend
+            // 
+            this.tbGend.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbGend.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbGend.Location = new System.Drawing.Point(80, 65);
+            this.tbGend.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbGend.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbGend.Name = "tbGend";
+            this.tbGend.ShowText = false;
+            this.tbGend.Size = new System.Drawing.Size(100, 25);
+            this.tbGend.TabIndex = 66;
+            this.tbGend.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbGend.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tbName
+            // 
+            this.tbName.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbName.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbName.Location = new System.Drawing.Point(80, 32);
+            this.tbName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbName.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbName.Name = "tbName";
+            this.tbName.ShowText = false;
+            this.tbName.Size = new System.Drawing.Size(100, 25);
+            this.tbName.TabIndex = 65;
+            this.tbName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbName.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel20
+            // 
+            this.uiLabel20.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel20.Location = new System.Drawing.Point(12, 67);
+            this.uiLabel20.Name = "uiLabel20";
+            this.uiLabel20.Size = new System.Drawing.Size(61, 23);
+            this.uiLabel20.TabIndex = 64;
+            this.uiLabel20.Text = "性别";
+            this.uiLabel20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel20.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel21
+            // 
+            this.uiLabel21.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel21.Location = new System.Drawing.Point(12, 34);
+            this.uiLabel21.Name = "uiLabel21";
+            this.uiLabel21.Size = new System.Drawing.Size(61, 23);
+            this.uiLabel21.TabIndex = 63;
+            this.uiLabel21.Text = "姓名";
+            this.uiLabel21.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel21.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // gbInsuInfo
+            // 
+            this.gbInsuInfo.Controls.Add(this.dgvWorkInjuryInfo);
+            this.gbInsuInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.gbInsuInfo.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gbInsuInfo.Location = new System.Drawing.Point(0, 105);
+            this.gbInsuInfo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.gbInsuInfo.MinimumSize = new System.Drawing.Size(1, 1);
+            this.gbInsuInfo.Name = "gbInsuInfo";
+            this.gbInsuInfo.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.gbInsuInfo.Size = new System.Drawing.Size(1095, 428);
+            this.gbInsuInfo.TabIndex = 1;
+            this.gbInsuInfo.Text = "工伤认定信息列表";
+            this.gbInsuInfo.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.gbInsuInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgvWorkInjuryInfo
+            // 
+            this.dgvWorkInjuryInfo.AllowUserToAddRows = false;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvWorkInjuryInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgvWorkInjuryInfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvWorkInjuryInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvWorkInjuryInfo.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
+            this.dgvWorkInjuryInfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvWorkInjuryInfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dgvWorkInjuryInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvWorkInjuryInfo.DefaultCellStyle = dataGridViewCellStyle3;
+            this.dgvWorkInjuryInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvWorkInjuryInfo.EnableHeadersVisualStyles = false;
+            this.dgvWorkInjuryInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgvWorkInjuryInfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgvWorkInjuryInfo.Location = new System.Drawing.Point(0, 32);
+            this.dgvWorkInjuryInfo.Name = "dgvWorkInjuryInfo";
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvWorkInjuryInfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            this.dgvWorkInjuryInfo.RowHeadersWidth = 62;
+            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgvWorkInjuryInfo.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            this.dgvWorkInjuryInfo.RowTemplate.Height = 23;
+            this.dgvWorkInjuryInfo.SelectedIndex = -1;
+            this.dgvWorkInjuryInfo.ShowGridLine = false;
+            this.dgvWorkInjuryInfo.ShowRect = false;
+            this.dgvWorkInjuryInfo.Size = new System.Drawing.Size(1095, 396);
+            this.dgvWorkInjuryInfo.TabIndex = 2;
+            this.dgvWorkInjuryInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // pnlClient
+            // 
+            this.pnlClient.Controls.Add(this.gbInsuInfo);
+            this.pnlClient.Controls.Add(this.gbBaseInfo);
+            this.pnlClient.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.pnlClient.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pnlClient.Location = new System.Drawing.Point(0, 0);
+            this.pnlClient.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.pnlClient.MinimumSize = new System.Drawing.Size(1, 1);
+            this.pnlClient.Name = "pnlClient";
+            this.pnlClient.Size = new System.Drawing.Size(1095, 533);
+            this.pnlClient.TabIndex = 3;
+            this.pnlClient.Text = null;
+            this.pnlClient.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.pnlClient.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // gbBaseInfo
+            // 
+            this.gbBaseInfo.Controls.Add(this.tbBirthDay);
+            this.gbBaseInfo.Controls.Add(this.tbAge);
+            this.gbBaseInfo.Controls.Add(this.lbAge);
+            this.gbBaseInfo.Controls.Add(this.lb1);
+            this.gbBaseInfo.Controls.Add(this.tbPsnNO);
+            this.gbBaseInfo.Controls.Add(this.tbNaty);
+            this.gbBaseInfo.Controls.Add(this.uiLabel27);
+            this.gbBaseInfo.Controls.Add(this.uiLabel28);
+            this.gbBaseInfo.Controls.Add(this.tbCertNO);
+            this.gbBaseInfo.Controls.Add(this.tbCertType);
+            this.gbBaseInfo.Controls.Add(this.uiLabel25);
+            this.gbBaseInfo.Controls.Add(this.uiLabel26);
+            this.gbBaseInfo.Controls.Add(this.tbGend);
+            this.gbBaseInfo.Controls.Add(this.tbName);
+            this.gbBaseInfo.Controls.Add(this.uiLabel20);
+            this.gbBaseInfo.Controls.Add(this.uiLabel21);
+            this.gbBaseInfo.Dock = System.Windows.Forms.DockStyle.Top;
+            this.gbBaseInfo.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gbBaseInfo.Location = new System.Drawing.Point(0, 0);
+            this.gbBaseInfo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.gbBaseInfo.MinimumSize = new System.Drawing.Size(1, 1);
+            this.gbBaseInfo.Name = "gbBaseInfo";
+            this.gbBaseInfo.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.gbBaseInfo.Size = new System.Drawing.Size(1095, 105);
+            this.gbBaseInfo.TabIndex = 0;
+            this.gbBaseInfo.Text = "基本信息";
+            this.gbBaseInfo.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.gbBaseInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCancel.Location = new System.Drawing.Point(980, 6);
+            this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(90, 26);
+            this.btnCancel.TabIndex = 2;
+            this.btnCancel.Text = "放弃";
+            this.btnCancel.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCancel.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+            // 
+            // btnOK
+            // 
+            this.btnOK.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnOK.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnOK.Location = new System.Drawing.Point(861, 6);
+            this.btnOK.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(90, 26);
+            this.btnOK.TabIndex = 1;
+            this.btnOK.Text = "确定";
+            this.btnOK.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnOK.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+            // 
+            // pnlBottom
+            // 
+            this.pnlBottom.Controls.Add(this.btnCancel);
+            this.pnlBottom.Controls.Add(this.btnOK);
+            this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pnlBottom.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.pnlBottom.Location = new System.Drawing.Point(0, 533);
+            this.pnlBottom.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.pnlBottom.MinimumSize = new System.Drawing.Size(1, 1);
+            this.pnlBottom.Name = "pnlBottom";
+            this.pnlBottom.Size = new System.Drawing.Size(1095, 40);
+            this.pnlBottom.TabIndex = 2;
+            this.pnlBottom.Text = null;
+            this.pnlBottom.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.pnlBottom.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // PatientInjuryForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1095, 573);
+            this.Controls.Add(this.pnlClient);
+            this.Controls.Add(this.pnlBottom);
+            this.Name = "PatientInjuryForm";
+            this.Text = "工伤信息";
+            this.gbInsuInfo.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvWorkInjuryInfo)).EndInit();
+            this.pnlClient.ResumeLayout(false);
+            this.gbBaseInfo.ResumeLayout(false);
+            this.pnlBottom.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private Sunny.UI.UITextBox tbBirthDay;
+        private Sunny.UI.UITextBox tbAge;
+        private Sunny.UI.UILabel lbAge;
+        private Sunny.UI.UILabel lb1;
+        private Sunny.UI.UITextBox tbPsnNO;
+        private Sunny.UI.UITextBox tbNaty;
+        private Sunny.UI.UILabel uiLabel27;
+        private Sunny.UI.UILabel uiLabel28;
+        private Sunny.UI.UITextBox tbCertNO;
+        private Sunny.UI.UITextBox tbCertType;
+        private Sunny.UI.UILabel uiLabel25;
+        private Sunny.UI.UILabel uiLabel26;
+        private Sunny.UI.UITextBox tbGend;
+        private Sunny.UI.UITextBox tbName;
+        private Sunny.UI.UILabel uiLabel20;
+        private Sunny.UI.UILabel uiLabel21;
+        private Sunny.UI.UIGroupBox gbInsuInfo;
+        public Sunny.UI.UIDataGridView dgvWorkInjuryInfo;
+        private Sunny.UI.UIPanel pnlClient;
+        private Sunny.UI.UIGroupBox gbBaseInfo;
+        private Sunny.UI.UIButton btnCancel;
+        private Sunny.UI.UIButton btnOK;
+        private Sunny.UI.UIPanel pnlBottom;
+    }
+}

+ 73 - 0
Forms/PatientInjuryForm.cs

@@ -0,0 +1,73 @@
+using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Helper;
+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;
+
+namespace PTMedicalInsurance.Forms
+{
+    public partial class PatientInjuryForm : Form
+    {
+        public DataTable dtWorkInjuryInfo;
+        public JObject joSelectedInsuInfo;
+        public int insuInfoIndex = 0;
+        public int idInfoIndex = 0;
+
+        public PatientInjuryForm()
+        {
+            InitializeComponent();
+        }
+
+        public void SetInjuryInfo(JObject jo)
+        {
+            InitializeComponent();
+            dtWorkInjuryInfo = (DataTable)jo["insuinfo"].ToObject(typeof(DataTable));
+
+            this.tbName.Text = JsonHelper.getDestValue(jo,"baseinfo.psn_name");
+            this.tbCertNO.Text = JsonHelper.getDestValue(jo, "baseinfo.certno");
+            dgvWorkInjuryInfo.DataSource = dtWorkInjuryInfo;
+            //设置dgv自动换行
+            this.dgvWorkInjuryInfo.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
+            this.dgvWorkInjuryInfo.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
+        }
+
+        private void AddDGVColumn(DataGridView dgv, string headerText, string dataPropertyName, int width = 120)
+        {
+            DataGridViewColumn newColumn = new DataGridViewTextBoxColumn();
+            newColumn.HeaderText = headerText;
+            newColumn.Width = width;
+            newColumn.DataPropertyName = dataPropertyName;
+            newColumn.Name = dataPropertyName;
+            dgv.Columns.Add(newColumn);
+        }
+
+        private void setDgvWorkInjuryInfo()
+        {
+            AddDGVColumn(dgvWorkInjuryInfo, "统筹区编码", "insuplc_admdvs", 80);
+            AddDGVColumn(dgvWorkInjuryInfo, "证件号码", "certno", 200);
+            AddDGVColumn(dgvWorkInjuryInfo, "姓名", "psn_name");
+            AddDGVColumn(dgvWorkInjuryInfo, "单位名称", "emp_name", 100);
+            AddDGVColumn(dgvWorkInjuryInfo, "伤害部位", "injury_part", 400);
+            AddDGVColumn(dgvWorkInjuryInfo, "事故编号", "injury_no", 180);
+            AddDGVColumn(dgvWorkInjuryInfo, "工伤发生时间", "injury_date", 120);
+            dgvWorkInjuryInfo.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 9, FontStyle.Bold);
+            dgvWorkInjuryInfo.ColumnHeadersHeight = 40;
+        }
+
+        private void btnOK_Click(object sender, EventArgs e)
+        {
+            DialogResult = DialogResult.OK;
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            DialogResult = DialogResult.Cancel;
+        }
+    }
+}

+ 120 - 0
Forms/PatientInjuryForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 10 - 1
Helper/InvokeHelper.cs

@@ -262,7 +262,16 @@ namespace PTMedicalInsurance.Helper
             // 统一封装请求头
             if (trade.GetMode() == ModeEnum.REST)
             {
-                data = JsonHelper.setCenterInpar(funNo, request);
+                if (Global.inf.interfaceDr == 27)
+                {
+                    //工伤
+                    data = JsonHelper.setCenterInjury(funNo, request);
+                }
+                else
+                {
+                    //医疗
+                    data = JsonHelper.setCenterInpar(funNo, request);
+                }
             }
             JObject joRtn = new JObject();
             // 调试模式

+ 19 - 0
Helper/JsonHelper.cs

@@ -302,6 +302,25 @@ namespace PTMedicalInsurance.Helper
             return Jo.ToString();
         }
 
+        /// <summary>
+        /// 工伤接口公共入参
+        /// </summary>
+        /// <param name="info"></param>
+        /// <param name="joInput"></param>
+        /// <returns></returns>
+        public static string setCenterInjury(string info, JObject joInput)
+        {
+            dynamic Jo = new JObject();
+            Jo.safeinfo = "Y1EN0";
+            Jo.ywlx = info;
+            Jo.jylsh = Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmsss");
+            Jo.ireturn = "000000";
+            Jo.msgreturn = "";
+            Jo.input = joInput;
+
+            return JsonHelper.toJsonString(Jo);
+        }
+
         public static string setCenterInpar(string infno, JObject joInput)
         {
             dynamic Jo = new JObject();

+ 1 - 1
InsuBusiness.cs

@@ -99,7 +99,7 @@ namespace PTMedicalInsurance
                 {
                     if (mIS.isSigned(ref Global.curEvt.signno) != true)
                     {
-                        if (businessType != "BasicData")//如果是打开数据对照界面不调用初始化 
+                        if ((businessType != "BasicData") && (Global.inf.interfaceDr!=27)) //如果是打开数据对照界面不调用初始化 
                         {
                             CallResult callResult = new SignInProcess().Process(joRtn);
                             rtnResult = callResult.Data;

+ 13 - 1
NanChangMI.csproj

@@ -8,7 +8,7 @@
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>PTMedicalInsurance</RootNamespace>
-    <AssemblyName>ShenYangMI</AssemblyName>
+    <AssemblyName>NanChangMI</AssemblyName>
     <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
@@ -108,6 +108,9 @@
     <Compile Include="Business\Inpatient\IPSettlementCancelProcess.cs" />
     <Compile Include="Business\InsuServices.cs" />
     <Compile Include="Business\Basic\IPSettlementService.cs" />
+    <Compile Include="Business\Local\InjuryIPSettlementService.cs" />
+    <Compile Include="Business\Local\InjuryOPSettlementService.cs" />
+    <Compile Include="Business\Local\InjuryQueryProcess.cs" />
     <Compile Include="Business\Local\OtherQueryProcess.cs" />
     <Compile Include="Business\Local\ReadCardProcess.cs" />
     <Compile Include="Business\Local\TestProcess.cs" />
@@ -198,6 +201,12 @@
     <Compile Include="Forms\OutpatientRegistration.designer.cs">
       <DependentUpon>OutpatientRegistration.cs</DependentUpon>
     </Compile>
+    <Compile Include="Forms\PatientInjuryForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\PatientInjuryForm.Designer.cs">
+      <DependentUpon>PatientInjuryForm.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\PrescriptionForm.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -399,6 +408,9 @@
     <EmbeddedResource Include="Forms\OutpatientRegistration.resx">
       <DependentUpon>OutpatientRegistration.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\PatientInjuryForm.resx">
+      <DependentUpon>PatientInjuryForm.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\PreAndInProcessAnalysisForm.resx">
       <DependentUpon>PreAndInProcessAnalysisForm.cs</DependentUpon>
     </EmbeddedResource>

+ 3 - 0
Variables/TradeEnum.cs

@@ -23,6 +23,9 @@ namespace PTMedicalInsurance
         [Trade("1101", "获取个人信息")]
         PatientInfo,
 
+        [Trade("GS001", "获取个人工伤信息")]
+        PatientInjuryInfo,
+
         /// <summary>
         /// 1161,读卡并获取个人信息
         /// </summary>