Pārlūkot izejas kodu

feat: 增加兰州的电子处方

zhengjie 1 gadu atpakaļ
vecāks
revīzija
f1df4120e5

BIN
.vs/GanSuMI/v16/.suo


+ 9 - 5
Business/HisMainBusiness.cs

@@ -32,7 +32,6 @@ using System.Data;
 using System.Reflection;
 using System.IO;
 using System.IO.Compression;
-using PTMedicalInsurance.Common;
 using PTMedicalInsurance.Entity.BaseLine.Response;
 using PTMedicalInsurance.Entity;
 
@@ -111,8 +110,8 @@ namespace PTMedicalInsurance.Business
             inf.version = "v1.0";
             inf.signatureType = "SM2";
             inf.recivedSystem = "YBXT";
-            inf.AK = "583ebd87f99f4be19a6c425d5ecb89fc";
-            inf.SK = "m9pKPKPnlfMcpJNtSjtvRCN2Rgg=";
+            inf.privateKey = "583ebd87f99f4be19a6c425d5ecb89fc";
+            inf.secretKey = "m9pKPKPnlfMcpJNtSjtvRCN2Rgg=";
             inf.dev_safe_info = "";
             inf.dev_no = Global.curEvt.mac;
 
@@ -160,8 +159,8 @@ namespace PTMedicalInsurance.Business
             inf.version = "v1.0";
             inf.signatureType = "SM2";
             inf.recivedSystem = "YBXT";
-            inf.AK = "583ebd87f99f4be19a6c425d5ecb89fc";
-            inf.SK = "m9pKPKPnlfMcpJNtSjtvRCN2Rgg=";
+            inf.privateKey = "583ebd87f99f4be19a6c425d5ecb89fc";
+            inf.secretKey = "m9pKPKPnlfMcpJNtSjtvRCN2Rgg=";
             inf.dev_safe_info = "";
             inf.dev_no = Global.curEvt.mac;
 
@@ -2281,6 +2280,8 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+        #region 事前事中
+
         /// <summary>
         /// 事前分析
         /// </summary>
@@ -2408,5 +2409,8 @@ namespace PTMedicalInsurance.Business
             }
 
         }
+
+        #endregion
+
     }
 }

+ 702 - 0
Business/IrisServices.cs

@@ -669,6 +669,29 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+        /// <summary>
+        /// 获取医院用户信息
+        /// </summary>
+        /// <param name="UserID"></param>
+        /// <returns></returns>
+        public JObject GetHosUserInfo(string UserID)
+        {
+            try
+            {
+                JObject joInput = new JObject();
+                joInput.Add("hospID", Global.inf.hisHospitalDr);
+                joInput.Add("userID", UserID);
+                string inpar = JsonHelper.setIrisInpar("01040297", joInput).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "获取医院用户信息");
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                return JsonHelper.setExceptionJson(-1, "获取医院用户信息异常:", ex.Message);
+            }
+        }
+
 
         /// <summary>
         /// 事前分析
@@ -703,6 +726,169 @@ namespace PTMedicalInsurance.Business
             }
         }
 
+
+
+        #region 处方流转
+        /// <summary>
+        /// 获取HIS就诊信息
+        /// </summary>
+        /// <param name="joParam"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public JObject GetHISRegInfo(JObject joParam)
+        {
+            //string errMsg;
+            try
+            {
+                string serviceCode = "09030048";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joParam).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "获取HIS就诊信息");
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                return JsonHelper.setExceptionJson(-1, "获取HIS就诊信息异常:", ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 获取HIS处方明细信息
+        /// </summary>
+        /// <param name="joParam"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public JObject GetHISPrescFeeInfo(JObject joParam)
+        {
+            //string errMsg;
+            try
+            {
+                string serviceCode = "09030049";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joParam).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "获取HIS处方信息");
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                return JsonHelper.setExceptionJson(-1, "获取HIS处方信息异常:", ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 获取HIS处方明细信息
+        /// </summary>
+        /// <param name="joParam"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public JObject GetPreVerificationData(JObject joParam)
+        {
+            //string errMsg;
+            try
+            {
+                string serviceCode = "09030050";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joParam).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "组织处方预核验数据");
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                return JsonHelper.setExceptionJson(-1, "组织处方预核验数据异常:", ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 电子处方PDF生成Base64Str
+        /// </summary>
+        /// <param name="PDFName">文件名</param>
+        /// <param name="PresNo">HIS处方号</param>
+        /// <param name="HospID">医院ID</param>
+        /// <param name="OutMsg">返回值</param>
+        /// <returns></returns>
+        public int GetPrescPDFBase64Str(string PDFName, string PresNo, string HospID, out string OutMsg)
+        {
+            //string errMsg;
+            try
+            {
+                JObject joTmp = new JObject();
+                joTmp.Add("pdfName", PDFName);
+                joTmp.Add("ordPrescNo", PresNo);
+                joTmp.Add("hospID", HospID);
+
+                string inpar = JsonHelper.setIrisInpar("09030055", joTmp).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "电子处方PDF生成Base64Str");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
+                {
+                    OutMsg = "获取电子处方PDF生成Base64Str失败,请联系管理员!" + errMsg;
+                    return -1;
+                }
+                else
+                {
+                    if (JsonHelper.getDestValue(joRtn, "result") == "")
+                    {
+                        OutMsg = "获取电子处方PDF生成Base64Str失败,请联系管理员" + errMsg;
+                        return -1;
+                    }
+
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "电子处方PDF生成Base64Str异常:" + ex.Message;
+                //OutMsg = JsonHelper.setExceptionJson(-1, "电子处方PDF生成Base64Str异常:", ex.Message).ToString();
+                return -1;
+            }
+        }
+
+        /// <summary>
+        /// 电子处方上传成功后更新HIS处方状态
+        /// </summary>
+        /// <param name="HISPrecNo"></param>
+        /// <param name="INSUPrecNo"></param>
+        /// <param name="status">C:撤销 上传:U</param>
+        public int updateHISPrecNoStatus(string HISPrecNo, string INSUPrecNo, string status, out string OutMsg)
+        {
+            try
+            {
+                JObject joTmp = new JObject();
+                joTmp.Add("HISPrecNo", HISPrecNo);
+                joTmp.Add("INSUPrecNo", INSUPrecNo);
+                joTmp.Add("status", status);
+                joTmp.Add("businessCode", "prescUpload");
+
+                string inpar = JsonHelper.setIrisInpar("09030033", joTmp).ToString();
+                JObject joRtn = invoker.invokeHISService(inpar, "电子处方上传成功后更新HIS处方状态");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out string errMsg) != 0)
+                {
+                    OutMsg = "医保电子处方上传成功后更新HIS处方状态失败,请联系管理员!" + errMsg;
+                    return -1;
+                }
+                else
+                {
+                    if (JsonHelper.getDestValue(joRtn, "result") == "")
+                    {
+                        OutMsg = "电子处方上传成功后更新HIS处方状态,请联系管理员" + errMsg;
+                        return -1;
+                    }
+
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "电子处方上传成功后更新HIS处方状态:" + ex.Message;
+                return -1;
+            }
+        }
+
+        #endregion
+
     }
 
     class MIIrisServices
@@ -1845,5 +2031,521 @@ namespace PTMedicalInsurance.Business
 
         }
         #endregion
+
+
+        #region【医保电子处方流转】
+
+
+        /// <summary>
+        /// 保存医保电子处方门诊登记信息
+        /// </summary>
+        /// <param name="jo2201Inpar"></param>
+        /// <param name="jo2201Rtn"></param>
+        /// <param name="jo2203Inpar"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int saveOutpatRegisterInfoPresCiru(JObject jo2201Inpar, JObject jo2201Rtn, JObject jo2203Inpar, out string outParam)
+        {
+            //插入云医保平台
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("HospitalDr", Global.inf.hospitalDr);
+                joTmp.Add("InterfaceDr", Global.inf.interfaceDr);
+                joTmp.Add("AdmDr", Global.pat.adm_Dr);
+                joTmp.Add("PatientName", Global.pat.name);
+                joTmp.Add("PersonalNO", Global.pat.psn_no);
+                joTmp.Add("InsuRegID", JsonHelper.getDestValue(jo2201Rtn, "output.data.mdtrt_id"));
+                joTmp.Add("RegDate", JsonHelper.getDestValue(jo2201Inpar, "input.data.begntime"));
+                joTmp.Add("InsuType", JsonHelper.getDestValue(jo2201Inpar, "input.data.insutype"));
+                joTmp.Add("CertificateType", JsonHelper.getDestValue(jo2201Inpar, "input.data.mdtrt_cert_type"));
+                joTmp.Add("CertificateNO", JsonHelper.getDestValue(jo2201Inpar, "input.data.mdtrt_cert_no"));
+                joTmp.Add("MedicalType", JsonHelper.getDestValue(jo2203Inpar, "input.mdtrtinfo.med_type"));
+                joTmp.Add("AttendDoctorNO", JsonHelper.getDestValue(jo2201Inpar, "input.data.atddr_no"));
+                joTmp.Add("ChiefPhyDocName", JsonHelper.getDestValue(jo2201Inpar, "input.data.dr_name"));
+                joTmp.Add("AdmInDiagDesc", JsonHelper.getDestValue(jo2203Inpar, "input.mdtrtinfo.main_cond_dscr"));
+                joTmp.Add("AdmInDepCode", JsonHelper.getDestValue(jo2201Inpar, "input.data.dept_code"));
+                joTmp.Add("AdmInDepName", JsonHelper.getDestValue(jo2201Inpar, "input.data.dept_name"));
+                joTmp.Add("AdmBed", "");
+                joTmp.Add("MainDiagCode", " ");
+                joTmp.Add("MainDiagName", " ");
+                joTmp.Add("MainConditionDesc", JsonHelper.getDestValue(jo2203Inpar, "input.mdtrtinfo.main_cond_dscr"));
+                joTmp.Add("DiseasecCode", JsonHelper.getDestValue(jo2203Inpar, "input.mdtrtinfo.dise_codg"));
+                joTmp.Add("DiseasecName", JsonHelper.getDestValue(jo2203Inpar, "input.mdtrtinfo.dise_name"));
+                joTmp.Add("OperationCode", "");
+                joTmp.Add("OperationName", "");
+                joTmp.Add("DiseasecTypeCode", "");
+                joTmp.Add("InsuranceAreaCode", Global.pat.insuplc_admdvs);
+                joTmp.Add("TreatmentAreaCode", Global.pat.mdtrtarea_admvs);
+                joTmp.Add("RegState", JsonHelper.getDestValue(jo2201Rtn, "regstate"));
+                joTmp.Add("ValidFlag", JsonHelper.getDestValue(jo2201Rtn, "validflag"));
+                joTmp.Add("Type", JsonHelper.getDestValue(jo2201Rtn, "type"));
+                joTmp.Add("updateUserID", Global.user.ID);
+                joTmp.Add("MSGID", Global.curEvt.msgid);
+                joTmp.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+
+                string serviceCode = "09010044";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joTmp).ToString();
+                JObject joRtn = invoker.invokeInsuService(inpar, "医保平台新增医保电子处方门诊登记信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = joRtn.ToString();
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "保存门诊登记信息异常:" + ex.Message;
+                return -1;
+            }
+
+        }
+
+        /// <summary>
+        /// 插入电子处方上传预核验
+        /// </summary>
+        /// <param name="joBaseInfo"></param>
+        /// <param name="joInsuInfo"></param>
+        /// <param name="joIdetInfo"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int InsertPreCheck(JObject joInput, JObject joOutput, out string outParam)
+        {
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joTmp.Add("Interface_Dr", Global.inf.interfaceDr);
+                joTmp.Add("MdtrtID", JsonHelper.getDestValue(joInput, "mdtrtID"));
+                joTmp.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joTmp.Add("HospRxno", JsonHelper.getDestValue(joInput, "hospRxno"));
+                joTmp.Add("MdtrtCertType", JsonHelper.getDestValue(joInput, "mdtrtCertType"));
+                joTmp.Add("MdtrtCertNo", JsonHelper.getDestValue(joInput, "mdtrtCertNo"));
+                joTmp.Add("InsuPlcNo", JsonHelper.getDestValue(joInput, "insuPlcNo"));
+                joTmp.Add("InitRxno", JsonHelper.getDestValue(joInput, "initRxno"));
+                joTmp.Add("RxTypeCode", JsonHelper.getDestValue(joInput, "rxTypeCode"));
+                joTmp.Add("PrscTime", JsonHelper.getDestValue(joInput, "prscTime"));
+                joTmp.Add("RxDrugCnt", JsonHelper.getDestValue(joInput, "rxDrugCnt"));
+                joTmp.Add("ValiDays", JsonHelper.getDestValue(joInput, "valiDays"));
+                joTmp.Add("ValiEndTime", JsonHelper.getDestValue(joInput, "valiEndTime"));
+                joTmp.Add("IptOtpNo", JsonHelper.getDestValue(joInput, "iptOtpNo"));
+                joTmp.Add("OtpIptFlag", JsonHelper.getDestValue(joInput, "otpIptFlag"));
+                joTmp.Add("PsnNo", JsonHelper.getDestValue(joInput, "psnNo"));
+                joTmp.Add("PatnName", JsonHelper.getDestValue(joInput, "patnName"));
+                joTmp.Add("PsnCertType", JsonHelper.getDestValue(joInput, "psnCertType"));
+                joTmp.Add("Certno", JsonHelper.getDestValue(joInput, "certno"));
+                joTmp.Add("PatnAge", JsonHelper.getDestValue(joInput, "patnAge"));
+                joTmp.Add("Gend", JsonHelper.getDestValue(joInput, "gend"));
+                joTmp.Add("PrscDeptName", JsonHelper.getDestValue(joInput, "prscDeptName"));
+                joTmp.Add("PrscDeptCode", JsonHelper.getDestValue(joInput, "prscDeptCode"));
+                joTmp.Add("DrCode", JsonHelper.getDestValue(joInput, "drCode"));
+                joTmp.Add("PrscDrName", JsonHelper.getDestValue(joInput, "prscDrName"));
+                joTmp.Add("DrProfttlCodg", JsonHelper.getDestValue(joInput, "drProfttlCodg"));
+                joTmp.Add("DrProfttlName", JsonHelper.getDestValue(joInput, "drProfttlName"));
+                joTmp.Add("MdtrtTime", JsonHelper.getDestValue(joInput, "mdtrtTime"));
+                joTmp.Add("DiseCodg", JsonHelper.getDestValue(joInput, "diseCodg"));
+                joTmp.Add("DiseName", JsonHelper.getDestValue(joInput, "diseName"));
+                joTmp.Add("SpDiseFlag", JsonHelper.getDestValue(joInput, "spDiseFlag"));
+                joTmp.Add("MaindiagCode", JsonHelper.getDestValue(joInput, "maindiagCode"));
+                joTmp.Add("MaindiagName", JsonHelper.getDestValue(joInput, "maindiagName"));
+                joTmp.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+
+                joTmp.Add("RxTraceCode", JsonHelper.getDestValue(joOutput, "rxTraceCode"));
+                joTmp.Add("HiRxno", JsonHelper.getDestValue(joOutput, "hiRxno"));
+                joTmp.Add("UpdateUserID", Global.user.name);
+
+                string serviceCode = "09010096";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joTmp).ToString();
+                JObject joRtn = invoker.invokeInsuService(inpar, "插入电子处方上传预核验信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "医保平台插入电子处方上传预核验信息:" + ex.Message;
+                return -1;
+            }
+
+        }
+
+
+        /// <summary>
+        /// 插入电子处方医保电子签名信息
+        /// </summary>
+        /// <param name="joBaseInfo"></param>
+        /// <param name="joInsuInfo"></param>
+        /// <param name="joIdetInfo"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int InsertElectronicSignature(JObject joInput, JObject joOutput, out string outParam)
+        {
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joTmp.Add("Interface_Dr", Global.inf.interfaceDr);
+                joTmp.Add("MdtrtID", JsonHelper.getDestValue(joInput, "mdtrtID"));
+                joTmp.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joTmp.Add("FixmedinsCode", JsonHelper.getDestValue(joInput, "fixmedinsCode"));
+                joTmp.Add("HospRxno", JsonHelper.getDestValue(joInput, "hospRxno"));
+                joTmp.Add("IptOtpNo", JsonHelper.getDestValue(joInput, "iptOtpNo"));
+                joTmp.Add("OriginalValue", JsonHelper.getDestValue(joInput, "originalValue"));
+                joTmp.Add("OriginalRxFile", JsonHelper.getDestValue(joInput, "originalRxFile"));
+                joTmp.Add("Extras", JsonHelper.getDestValue(joInput, "extras"));
+                joTmp.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+
+                joTmp.Add("RxFile", JsonHelper.getDestValue(joOutput, "rxFile"));
+                joTmp.Add("SignDigest", JsonHelper.getDestValue(joOutput, "signDigest"));
+                joTmp.Add("SignCertSn", JsonHelper.getDestValue(joOutput, "signCertSn"));
+                joTmp.Add("SignCertDn", JsonHelper.getDestValue(joOutput, "signCertDn"));
+                joTmp.Add("UpdateUserID", Global.user.name);
+
+                string serviceCode = "09010097";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joTmp).ToString();
+                JObject joRtn = invoker.invokeInsuService(inpar, "插入电子处方医保电子签名信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "医保平台插入电子处方医保电子签名信息:" + ex.Message;
+                return -1;
+            }
+
+        }
+
+
+        /// <summary>
+        /// 插入电子处方上传信息
+        /// </summary>
+        /// <param name="joBaseInfo"></param>
+        /// <param name="joInsuInfo"></param>
+        /// <param name="joIdetInfo"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int InsertUploadRecord(JObject joInput, JObject joOutput, out string outParam)
+        {
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joTmp.Add("Interface_Dr", Global.inf.interfaceDr);
+                joTmp.Add("MdtrtID", JsonHelper.getDestValue(joInput, "mdtrtID"));
+                joTmp.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joTmp.Add("HiRxno", JsonHelper.getDestValue(joInput, "hiRxno"));
+                joTmp.Add("RxTraceCode", JsonHelper.getDestValue(joInput, "rxTraceCode"));
+                joTmp.Add("PatnName", JsonHelper.getDestValue(joInput, "patnName"));
+                joTmp.Add("PsnCertType", JsonHelper.getDestValue(joInput, "psnCertType"));
+                joTmp.Add("Certno", JsonHelper.getDestValue(joInput, "certno"));
+                joTmp.Add("FixmedinsName", JsonHelper.getDestValue(joInput, "fixmedinsName"));
+                joTmp.Add("FixmedinsCode", JsonHelper.getDestValue(joInput, "fixmedinsCode"));
+                joTmp.Add("FrCode", JsonHelper.getDestValue(joInput, "frCode"));
+                joTmp.Add("PrscDrName", JsonHelper.getDestValue(joInput, "prscDrName"));
+                joTmp.Add("PharDeptName", JsonHelper.getDestValue(joInput, "pharDeptName"));
+                joTmp.Add("PharDeptCode", JsonHelper.getDestValue(joInput, "pharDeptCode"));
+                joTmp.Add("PharCode", JsonHelper.getDestValue(joInput, "pharCode"));
+                joTmp.Add("PharName", JsonHelper.getDestValue(joInput, "pharName"));
+                joTmp.Add("PharChkTime", JsonHelper.getDestValue(joInput, "pharChkTime"));
+                joTmp.Add("RxFile", JsonHelper.getDestValue(joInput, "rxFile"));
+                joTmp.Add("SignDigest", JsonHelper.getDestValue(joInput, "signDigest"));
+                joTmp.Add("Extras", JsonHelper.getDestValue(joInput, "extras"));
+
+                joTmp.Add("RxStasCodg", JsonHelper.getDestValue(joOutput, "rxStasCodg"));
+                joTmp.Add("RxStasName", JsonHelper.getDestValue(joOutput, "rxStasName"));
+                joTmp.Add("Upload", "Y");
+                joTmp.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                joTmp.Add("UpdateUserID", Global.user.name);
+
+                string serviceCode = "09010098";
+                string inpar = JsonHelper.setIrisInpar(serviceCode, joTmp).ToString();
+                JObject joRtn = invoker.invokeInsuService(inpar, "插入电子处方上传信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "医保平台插入电子处方上传信息:" + ex.Message;
+                return -1;
+            }
+
+        }
+
+
+        /// <summary>
+        /// 通过医保处方编号更新处方上传信息
+        /// </summary>
+        /// <param name="newSettlID"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        public int CancelUploadRecord(string mdtrtID, JObject joOutput, out string outParam)
+        {
+            JObject joTmp = new JObject();
+            string errMsg = "";
+            try
+            {
+                joTmp.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joTmp.Add("Interface_Dr", Global.inf.interfaceDr);
+                joTmp.Add("MdtrtID", mdtrtID);
+                joTmp.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joTmp.Add("HiRxno", JsonHelper.getDestValue(joOutput, "hiRxno"));
+                joTmp.Add("RxStasCodg", JsonHelper.getDestValue(joOutput, "rxStasCodg"));
+                joTmp.Add("RxStasName", JsonHelper.getDestValue(joOutput, "rxStasName"));
+                joTmp.Add("Upload", "N");
+                joTmp.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                joTmp.Add("UpdateUserID", Global.user.name);
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010099", joTmp).ToString(), "通过医保处方编号更新处方上传信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    outParam = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    outParam = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                outParam = "通过医保处方编号更新处方上传信息:" + ex.Message;
+                return -1;
+            }
+        }
+
+        /// <summary>
+        /// 查询电子处方预核验信息
+        /// </summary>
+        /// <param name="HospRxNo"></param>
+        /// <param name="joRtnInfo"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int GetPresCirPreCheckInfo(string HospRxNo, out string OutMsg)
+        {
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruUploadPreCheck ";
+            sqlStr = sqlStr + " WHERE Hospital_Dr=" + Global.inf.hospitalDr;
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;
+            sqlStr = sqlStr + " and HospRxno='" + HospRxNo + "'";
+            sqlStr = sqlStr + " and Adm_Dr=" + Global.pat.adm_Dr;
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010101");
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方上传预核验信息");
+
+            OutMsg = joRtn["result"]["dataSingle"].ToString();
+            //DataTable dd = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            return 0;
+        }
+
+        /// <summary>
+        /// 查询电子处方电子签名信息
+        /// </summary>
+        /// <param name="HospRxNo"></param>
+        /// <param name="joRtnInfo"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int GetPresCirElectronicSignatureInfo(string HospRxNo, out string OutMsg)
+        {
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruElectronicSignature ";
+            sqlStr = sqlStr + " WHERE Hospital_Dr=" + Global.inf.hospitalDr;
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;
+            sqlStr = sqlStr + " and HospRxno='" + HospRxNo + "'";
+            sqlStr = sqlStr + " and Adm_Dr=" + Global.pat.adm_Dr;
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010102");
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方电子签名信息");
+
+            OutMsg = joRtn["result"]["data"].ToString();
+            //DataTable dd = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            return 0;
+        }
+
+        /// <summary>
+        /// 查询电子处方上传信息
+        /// </summary>
+        /// <param name="HospRxNo"></param>
+        /// <param name="joRtnInfo"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int GetPresCirUploadRecordInfo(string HospRxNo, out string OutMsg)
+        {
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruUploadRecord ";
+            sqlStr = sqlStr + " WHERE Upload=Y And Hospital_Dr=" + Global.inf.hospitalDr;
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;
+            sqlStr = sqlStr + " and HospRxno='" + HospRxNo + "'";
+            sqlStr = sqlStr + " and Adm_Dr=" + Global.pat.adm_Dr;
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010100");
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方上传信息");
+
+            OutMsg = joRtn["result"]["data"].ToString();
+            //DataTable dd = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            return 0;
+        }
+
+        /// <summary>
+        /// 撤销医保电子处方上传成功后更新IRIS表
+        /// </summary>
+        /// <param name="JoInput"></param>
+        /// <param name="ID"></param>
+        /// <param name="HiRxno"></param>
+        /// <param name="FixmedinsCode"></param>
+        /// <param name="CancelReason"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int cancelPresCirUpload(JObject JoRtn, string ID, string HiRxno, string FixmedinsCode, string CancelReason, string DrInsuCode, string DrName, string DrCertNo, out string OutMsg)
+        {
+            string errMsg = "";
+
+            try
+            {
+                JObject joInParam = new JObject();
+
+                joInParam.Add("ID", ID);
+                joInParam.Add("HiRxno", HiRxno);
+                joInParam.Add("FixmedinsCode", FixmedinsCode);
+                joInParam.Add("UndoDrCode", DrInsuCode);
+                joInParam.Add("UndoDrName", DrName);
+                joInParam.Add("UndoDrCertType", "01");
+                joInParam.Add("UndoDrCertno", DrCertNo);
+                joInParam.Add("UndoRea", CancelReason);
+                joInParam.Add("UndoTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                joInParam.Add("RxStasCodg", JsonHelper.getDestValue(JoRtn, "rxStasCodg")); //医保处方状态编码
+                joInParam.Add("RxStasName", JsonHelper.getDestValue(JoRtn, "rxStasName")); //医保处方状态名称
+                joInParam.Add("Upload", "N");
+                joInParam.Add("updateUserID", Global.user.ID);
+                joInParam.Add("Type", "Cancel");
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010099", joInParam).ToString(), "撤销电子处方上传信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    OutMsg = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "撤销电子处方上传信息:" + ex.Message;
+                return -1;
+            }
+        }
+
+        /// <summary>
+        /// 撤销医保电子处方上传成功后更新IRIS表
+        /// </summary>
+        /// <param name="JoInput"></param>
+        /// <param name="ID"></param>
+        /// <param name="HiRxno"></param>
+        /// <param name="FixmedinsCode"></param>
+        /// <param name="CancelReason"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int UpdatePresCirUpload(JObject JoRtn, string ID, out string OutMsg)
+        {
+            string errMsg = "";
+
+            try
+            {
+                JObject joInParam = new JObject();
+
+                joInParam.Add("ID", ID);
+                joInParam.Add("HiRxno", JsonHelper.getDestValue(JoRtn, "hiRxno"));
+                joInParam.Add("RxChkStasCodg", JsonHelper.getDestValue(JoRtn, "rxChkStasCodg")); //处方审核状态代码
+                joInParam.Add("RxChkStasName", JsonHelper.getDestValue(JoRtn, "rxChkStasName")); //处方审核状态
+                joInParam.Add("RxChkOpnn", JsonHelper.getDestValue(JoRtn, "rxChkOpnn")); //处方审核意见
+                joInParam.Add("RxChkTime", JsonHelper.getDestValue(JoRtn, "RxChkTime")); //处方审核时间
+
+                joInParam.Add("RxStasCodg", JsonHelper.getDestValue(JoRtn, "rxStasCodg")); //处方审核时间
+                joInParam.Add("RxStasName", JsonHelper.getDestValue(JoRtn, "rxStasName")); //处方审核时间
+
+                joInParam.Add("UpdateUserID", Global.user.ID);
+                joInParam.Add("Type", "Update");
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010099", joInParam).ToString(), "更新电子处方上传信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    OutMsg = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "更新电子处方上传信息:" + ex.Message;
+                return -1;
+            }
+        }
+
+        #endregion
     }
 }

+ 15 - 5
ChongQingMI.csproj

@@ -35,12 +35,11 @@
     <Reference Include="BouncyCastle.Crypto">
       <HintPath>..\Demo\bin\Debug-yaohai\BouncyCastle.Crypto.dll</HintPath>
     </Reference>
-    <Reference Include="FastReport, Version=2020.3.7.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\FastReport\FastReport.dll</HintPath>
+    <Reference Include="FastReport">
+      <HintPath>..\Demo\bin\Debug-yaohai\FastReport.dll</HintPath>
     </Reference>
     <Reference Include="FastReportFrom">
-      <HintPath>..\..\FastReport\FastReportFrom.dll</HintPath>
+      <HintPath>..\Demo\bin\Debug-yaohai\FastReportFrom.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
       <HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
@@ -54,7 +53,7 @@
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </Reference>
     <Reference Include="PTControl">
-      <HintPath>..\..\..\..\C#练习\普天控件2\PTControl\PTControl\bin\Debug\PTControl.dll</HintPath>
+      <HintPath>..\Demo\bin\Debug-yaohai\PTControl.dll</HintPath>
     </Reference>
     <Reference Include="SunnyUI, Version=3.1.5.0, Culture=neutral, PublicKeyToken=27d7d2e821d97aeb, processorArchitecture=MSIL">
       <HintPath>packages\SunnyUI.3.1.5\lib\net40\SunnyUI.dll</HintPath>
@@ -98,6 +97,8 @@
     <Compile Include="Common\ExPortToExcel.cs" />
     <Compile Include="Common\FastReportScript.cs" />
     <Compile Include="Common\GmUtil.cs" />
+    <Compile Include="Common\HttpEncoder.cs" />
+    <Compile Include="Common\Signer.cs" />
     <Compile Include="Common\SignUtils.cs" />
     <Compile Include="Common\SMCipher.cs" />
     <Compile Include="Common\SMLib\EasyGmUtils.cs" />
@@ -157,6 +158,12 @@
     <Compile Include="Forms\PreAndInProcessAnalysisForm.Designer.cs">
       <DependentUpon>PreAndInProcessAnalysisForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Forms\PrescriptionCirculation.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\PrescriptionCirculation.Designer.cs">
+      <DependentUpon>PrescriptionCirculation.cs</DependentUpon>
+    </Compile>
     <Compile Include="Forms\SearchAdmdvs.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -296,6 +303,9 @@
     <EmbeddedResource Include="Forms\PreAndInProcessAnalysisForm.resx">
       <DependentUpon>PreAndInProcessAnalysisForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Forms\PrescriptionCirculation.resx">
+      <DependentUpon>PrescriptionCirculation.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Forms\SearchAdmdvs.resx">
       <DependentUpon>SearchAdmdvs.cs</DependentUpon>
     </EmbeddedResource>

+ 112 - 0
Common/HttpEncoder.cs

@@ -0,0 +1,112 @@
+//------------------------------------------------------------------------------
+// based on https://github.com/Microsoft/referencesource/blob/master/System.Web/Util/HttpEncoder.cs
+//   and https://github.com/Microsoft/referencesource/blob/master/System.Web/Util/HttpEncoderUtility.cs
+//
+// <copyright file="HttpEncoder.cs" company="Microsoft">
+//     Copyright (c) Microsoft Corporation.  All rights reserved.
+// </copyright>
+// <copyright file="HttpEncoderUtility.cs" company="Microsoft">
+//     Copyright (c) Microsoft Corporation.  All rights reserved.
+// </copyright>
+//------------------------------------------------------------------------------
+
+/*
+ * Copyright (c) 2009 Microsoft Corporation
+ */
+
+namespace PTMedicalInsurance.Common
+{
+    using System;
+    using System.Text;
+
+    public partial class Signer
+    {
+
+        private static char IntToHex(int n)
+        {
+            if (n <= 9)
+                return (char)(n + (int)'0');
+            else
+                return (char)(n - 10 + (int)'A');
+        }
+
+        private static bool IsUrlSafeChar(char ch)
+        {
+            if (ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z' || ch >= '0' && ch <= '9')
+                return true;
+
+            switch (ch)
+            {
+                case '-':
+                case '_':
+                case '.':
+                case '~':
+                    return true;
+            }
+
+            return false;
+        }
+
+        private static byte[] UrlEncode(byte[] bytes, int offset, int count)
+        {
+            int cUnsafe = 0;
+
+            // count them first
+            for (int i = 0; i < count; i++)
+            {
+                char ch = (char)bytes[offset + i];
+
+                if (!IsUrlSafeChar(ch))
+                    cUnsafe++;
+            }
+
+            // nothing to expand?
+            if (cUnsafe == 0)
+            {
+                // DevDiv 912606: respect "offset" and "count"
+                if (0 == offset && bytes.Length == count)
+                {
+                    return bytes;
+                }
+                else
+                {
+                    var subarray = new byte[count];
+                    Buffer.BlockCopy(bytes, offset, subarray, 0, count);
+                    return subarray;
+                }
+            }
+
+            // expand not 'safe' characters into %XX, spaces to +s
+            byte[] expandedBytes = new byte[count + cUnsafe * 2];
+            int pos = 0;
+
+            for (int i = 0; i < count; i++)
+            {
+                byte b = bytes[offset + i];
+                char ch = (char)b;
+
+                if (IsUrlSafeChar(ch))
+                {
+                    expandedBytes[pos++] = b;
+                }
+                else
+                {
+                    expandedBytes[pos++] = (byte)'%';
+                    expandedBytes[pos++] = (byte)IntToHex((b >> 4) & 0xf);
+                    expandedBytes[pos++] = (byte)IntToHex(b & 0x0f);
+                }
+            }
+
+            return expandedBytes;
+        }
+        private static string UrlEncode(string value)
+        {
+            if (value == null)
+                return null;
+
+            byte[] bytes = Encoding.UTF8.GetBytes(value);
+            return Encoding.UTF8.GetString(UrlEncode(bytes, 0, bytes.Length));
+        }
+
+    }
+}

+ 473 - 0
Common/Signer.cs

@@ -0,0 +1,473 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Net;
+using System.Net.Http;
+using System.Security.Cryptography;
+using System.Text;
+
+// HWS API Gateway Signature
+
+namespace PTMedicalInsurance.Common
+{
+    
+    public class HttpRequest
+    {
+        public string method;
+        public string host; /*   http://example.com  */
+        public string uri = "/";  /*   /request/uri      */
+        public Dictionary<string, List<string>> query = new Dictionary<string, List<string>>();
+        public WebHeaderCollection headers = new WebHeaderCollection();
+        public string body = "";
+        public string canonicalRequest;
+        public string stringToSign;
+
+        public HttpRequest(string method = "GET", Uri url = null, WebHeaderCollection headers = null, string body = null)
+        {
+
+            if (method != null)
+            {
+                this.method = method;
+            }
+            if (url != null)
+            {
+               
+                host = url.Scheme + "://" + url.Host + ":" + url.Port;
+                uri = url.GetComponents(UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.Unescaped);
+                query = new Dictionary<string, List<string>>();
+                
+                if (url.Query.Length > 1)
+                {
+                    foreach (var kv in url.Query.Substring(1).Split('&'))
+                    {
+                        string[] spl = kv.Split(new char[] { '=' }, 2);
+                        string key = Uri.UnescapeDataString(spl[0]);
+                        string value = "";
+                        if (spl.Length > 1)
+                        {
+                            value = Uri.UnescapeDataString(spl[1]);
+                        }
+                        if (query.ContainsKey(key))
+                        {
+                            query[key].Add(value);
+                        }
+                        else
+                        {
+                            query[key] = new List<string> { value };
+                        }
+                    }
+                }
+            }
+            if (headers != null)
+            {
+                this.headers = headers;
+            }
+            if (body != null)
+            {
+                this.body = body;
+
+            }
+        }
+    }
+
+    public partial class Signer
+    {
+        const string BasicDateFormat = "yyyyMMddTHHmmssZ";
+        const string Algorithm = "SDK-HMAC-SHA256";
+        const string HeaderXDate = "X-Sdk-Date";
+        const string HeaderHost = "host";
+        const string HeaderAuthorization = "Authorization";
+        const string HeaderContentSha256 = "X-Sdk-Content-Sha256";
+        readonly HashSet<string> unsignedHeaders = new HashSet<string> { "content-type" };
+
+        private string key;
+        private string secret;
+
+        public string AppKey
+        {
+            get => key;
+            set => key = value;
+        }
+        public string AppSecret
+        {
+            get => secret;
+            set => secret = value;
+        }
+        public string Key
+        {
+            get => key;
+            set => key = value;
+        }
+        public string Secret
+        {
+            get => secret;
+            set => secret = value;
+        }
+
+        byte[] hmacsha256(byte[] keyByte, string message)
+        {
+            byte[] messageBytes = Encoding.UTF8.GetBytes(message);
+            using (var hmacsha256 = new HMACSHA256(keyByte))
+            {
+                return hmacsha256.ComputeHash(messageBytes);
+            }
+        }
+
+        // Build a CanonicalRequest from a regular request string
+        //
+        // CanonicalRequest =
+        //  HTTPRequestMethod + '\n' +
+        //  CanonicalURI + '\n' +
+        //  CanonicalQueryString + '\n' +
+        //  CanonicalHeaders + '\n' +
+        //  SignedHeaders + '\n' +
+        //  HexEncode(Hash(RequestPayload))
+
+        private void WriteLogFile(string FunNO, string InParam, string OutParam)
+        {
+            string filePath = AppDomain.CurrentDomain.BaseDirectory + "GSYBLogLog";
+            if (!Directory.Exists(filePath))
+            {
+                Directory.CreateDirectory(filePath);
+            }
+
+            string logPath = AppDomain.CurrentDomain.BaseDirectory + "GSYBLog\\" + DateTime.Now.ToString("yyyy-MM-dd") + "C#.txt";
+            try
+            {
+                using (StreamWriter sw = File.AppendText(logPath))
+                {
+                    sw.WriteLine("      交易名:" + FunNO);
+                    sw.WriteLine("      时间:" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                    sw.WriteLine("      入参:" + InParam);
+                    sw.WriteLine("      出参:" + OutParam);
+                    sw.WriteLine("****************分割线**********************************");
+                    sw.WriteLine();
+                    sw.Flush();
+                    sw.Close();
+                    sw.Dispose();
+                }
+            }
+            catch (IOException e)
+            {
+                using (StreamWriter sw = File.AppendText(logPath))
+                {
+                    sw.WriteLine("      交易名:" + FunNO);
+                    sw.WriteLine("      入参:" + InParam);
+                    sw.WriteLine("      异常:" + e.Message);
+                    sw.WriteLine("      时间:" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss"));
+                    sw.WriteLine("********************分割线******************************");
+                    sw.WriteLine();
+                    sw.Flush();
+                    sw.Close();
+                    sw.Dispose();
+                }
+            }
+        }
+        string CanonicalRequest(HttpRequest r, List<string> signedHeaders)
+        {
+            string hexencode;
+            if (r.headers.Get(HeaderContentSha256) != null)
+            {
+                hexencode = r.headers.Get(HeaderContentSha256);
+            }
+            else
+            {
+                var data = Encoding.UTF8.GetBytes(r.body);
+                hexencode = HexEncodeSHA256Hash(data);
+            }
+            return string.Format("{0}\n{1}\n{2}\n{3}\n{4}\n{5}", r.method, CanonicalURI(r), CanonicalQueryString(r), CanonicalHeaders(r, signedHeaders), string.Join(";", signedHeaders), hexencode);
+        }
+        string CanonicalURI(HttpRequest r)
+        {
+            var pattens = r.uri.Split('/');
+            List<string> uri = new List<string>();
+            foreach (var v in pattens)
+            {
+                uri.Add(UrlEncode(v));
+            }
+            var urlpath = string.Join("/", uri);
+            if (urlpath[urlpath.Length - 1] != '/')
+            {
+                urlpath = urlpath + "/"; // always end with /
+            }
+            //r.uri = urlpath;
+            return urlpath;
+        }
+        string CanonicalQueryString(HttpRequest r)
+        {
+            List<string> keys = new List<string>();
+            foreach (var pair in r.query)
+            {
+                keys.Add(pair.Key);
+            }
+            keys.Sort(String.CompareOrdinal);
+            List<string> a = new List<string>();
+            foreach (var key in keys)
+            {
+                string k = UrlEncode(key);
+                List<string> values = r.query[key];
+                values.Sort(String.CompareOrdinal);
+                foreach (var value in values)
+                {
+                    string kv = k + "=" + UrlEncode(value);
+                    a.Add(kv);
+                }
+            }
+            return string.Join("&", a);
+        }
+        string CanonicalHeaders(HttpRequest r, List<string> signedHeaders)
+        {
+            List<string> a = new List<string>();
+            foreach (string key in signedHeaders)
+            {
+                var values = new List<string>(r.headers.GetValues(key));
+                values.Sort(String.CompareOrdinal);
+                foreach (var value in values)
+                {
+                    a.Add(key + ":" + value.Trim());
+                    r.headers.Set(key, Encoding.GetEncoding("iso-8859-1").GetString(Encoding.UTF8.GetBytes(value)));
+                }
+            }
+            return string.Join("\n", a) + "\n";
+        }
+        List<string> SignedHeaders(HttpRequest r)
+        {
+            List<string> a = new List<string>();
+            foreach (string key in r.headers.AllKeys)
+            {
+                string keyLower = key.ToLower();
+                if (!unsignedHeaders.Contains(keyLower))
+                {
+                    a.Add(key.ToLower());
+                }
+            }
+            a.Sort(String.CompareOrdinal);
+            return a;
+        }
+
+        static char GetHexValue(int i)
+        {
+            if (i < 10)
+            {
+                return (char)(i + '0');
+            }
+            return (char)(i - 10 + 'a');
+        }
+        public static string toHexString(byte[] value)
+        {
+            int num = value.Length * 2;
+            char[] array = new char[num];
+            int num2 = 0;
+            for (int i = 0; i < num; i += 2)
+            {
+                byte b = value[num2++];
+                array[i] = GetHexValue(b / 16);
+                array[i + 1] = GetHexValue(b % 16);
+            }
+            return new string(array, 0, num);
+        }
+        // Create a "String to Sign".
+         string StringToSign(string canonicalRequest, DateTime t)
+        {
+            SHA256 sha256 = new SHA256Managed();
+            var bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(canonicalRequest));
+            sha256.Clear();
+            return string.Format("{0}\n{1}\n{2}", Algorithm, t.ToUniversalTime().ToString(BasicDateFormat), toHexString(bytes));
+        }
+
+
+        // Create the HWS Signature.
+        string SignStringToSign(string stringToSign, byte[] signingKey)
+        {
+            byte[] hm = hmacsha256(signingKey, stringToSign);
+            return toHexString(hm);
+        }
+        // HexEncodeSHA256Hash returns hexcode of sha256
+        public static string HexEncodeSHA256Hash(byte[] body)
+        {
+            SHA256 sha256 = new SHA256Managed();
+            var bytes = sha256.ComputeHash(body);
+            sha256.Clear();
+            return toHexString(bytes);
+        }
+        public static string HexEncodeSHA256HashFile(string fname)
+        {
+            SHA256 sha256 = new SHA256Managed();
+            using (var fs = new FileStream(fname, FileMode.Open))
+            {
+                var bytes = sha256.ComputeHash(fs);
+                sha256.Clear();
+                return toHexString(bytes);
+            }
+        }
+        // Get the finalized value for the "Authorization" header. The signature parameter is the output from SignStringToSign
+        string AuthHeaderValue(string signature, List<string> signedHeaders)
+        {
+            return string.Format("{0} Access={1}, SignedHeaders={2}, Signature={3}", Algorithm, key, string.Join(";", signedHeaders), signature);
+        }
+
+        public bool Verify(HttpRequest r, string signature)
+        {
+            if (r.method != "POST" && r.method != "PATCH" && r.method != "PUT")
+            {
+                r.body = "";
+            }
+            var time = r.headers.GetValues(HeaderXDate);
+            if (time == null)
+            {
+                return false;
+            }
+            DateTime t = DateTime.ParseExact(time[0], BasicDateFormat, CultureInfo.CurrentCulture);
+            var signedHeaders = SignedHeaders(r);
+            var canonicalRequest = CanonicalRequest(r, signedHeaders);
+            var stringToSign = StringToSign(canonicalRequest, t);
+            return signature == SignStringToSign(stringToSign, Encoding.UTF8.GetBytes(secret));
+        }
+
+        // SignRequest set Authorization header
+        public HttpWebRequest Sign(HttpRequest r)
+        {
+            if (r.method != "POST" && r.method != "PATCH" && r.method != "PUT")
+            {
+                r.body = "";
+            }
+            var time = r.headers.GetValues(HeaderXDate);
+            DateTime t;
+            if (time == null)
+            {
+                t = DateTime.Now;
+                r.headers.Add(HeaderXDate, t.ToUniversalTime().ToString(BasicDateFormat));
+            }
+            else
+            {
+                t = DateTime.ParseExact(time[0], BasicDateFormat, CultureInfo.CurrentCulture);
+            }
+            var queryString = CanonicalQueryString(r);
+            if (queryString != "")
+            {
+                queryString = "?" + queryString;
+            }
+            HttpWebRequest req = (HttpWebRequest)WebRequest.Create(r.host + r.uri + queryString);
+            string host = null;
+            if (r.headers.GetValues(HeaderHost) != null)
+            {
+                host = r.headers.GetValues(HeaderHost)[0];
+                req.Host = host;
+            }
+            else
+            {
+                host = req.Host;
+            }
+
+            r.headers.Set("host", host);
+            var signedHeaders = SignedHeaders(r);
+            var canonicalRequest = CanonicalRequest(r, signedHeaders);
+            var stringToSign = StringToSign(canonicalRequest, t);
+            var signature = SignStringToSign(stringToSign, Encoding.UTF8.GetBytes(secret));
+            var authValue = AuthHeaderValue(signature, signedHeaders);
+            r.headers.Set(HeaderAuthorization, authValue);
+            req.Method = r.method;
+            r.headers.Remove("host");
+            string[] reservedHeaders = new String[]
+            {
+                "content-type","accept","date","if-modified-since","referer","user-agent",
+            };
+            Dictionary<string, string> savedHeaders = new Dictionary<string, string>();
+            foreach (string header in reservedHeaders)
+            {
+                if (r.headers.GetValues(header) != null)
+                {
+                    savedHeaders[header] = r.headers.GetValues(header)[0];
+                    r.headers.Remove(header);
+                }
+            }
+            req.Headers = r.headers;
+            if (savedHeaders.ContainsKey("content-type"))
+            {
+                req.ContentType = savedHeaders["content-type"];
+            }
+            if (savedHeaders.ContainsKey("accept"))
+            {
+                req.Accept = savedHeaders["accept"];
+            }
+            if (savedHeaders.ContainsKey("date"))
+            {
+                req.Date = Convert.ToDateTime(savedHeaders["date"]);
+            }
+            if (savedHeaders.ContainsKey("if-modified-since"))
+            {
+                req.IfModifiedSince = Convert.ToDateTime(savedHeaders["if-modified-since"]);
+            }
+            if (savedHeaders.ContainsKey("referer"))
+            {
+                req.Referer = savedHeaders["referer"];
+            }
+            if (savedHeaders.ContainsKey("user-agent"))
+            {
+                req.UserAgent = savedHeaders["user-agent"];
+            }
+            return req;
+        }
+
+        public HttpRequestMessage SignHttp(HttpRequest r)
+        {
+            var queryString = CanonicalQueryString(r);
+            if (queryString != "")
+            {
+                queryString = "?" + queryString;
+            }
+            Console.WriteLine(r.method + "--" +r.host + r.uri + queryString);
+            HttpRequestMessage req = new HttpRequestMessage(new HttpMethod(r.method), r.host + r.uri + queryString);
+            if (r.method != "POST" && r.method != "PATCH" && r.method != "PUT")
+            {
+                r.body = "";
+            }
+            else
+            {
+                req.Content = new StringContent(r.body);
+            }
+           
+            var time = r.headers.GetValues(HeaderXDate);
+            Console.WriteLine(time);
+            DateTime t;
+            if (time == null)
+            {
+                t = DateTime.Now;
+                r.headers.Add(HeaderXDate, t.ToUniversalTime().ToString(BasicDateFormat));
+            }
+            else
+            {
+                t = DateTime.ParseExact(time[0], BasicDateFormat, CultureInfo.CurrentCulture);
+            }
+            string host = null;
+            if (r.headers.GetValues(HeaderHost) != null)
+            {
+                host = r.headers.GetValues(HeaderHost)[0];
+                req.Headers.Host = host;
+            }
+            else
+            {
+                host = req.RequestUri.Host;
+            }
+           
+            r.headers.Set("host", host);
+            var signedHeaders = SignedHeaders(r);
+            var canonicalRequest = CanonicalRequest(r, signedHeaders);
+            r.canonicalRequest = canonicalRequest;
+            var stringToSign = StringToSign(canonicalRequest, t);
+            r.stringToSign = stringToSign;
+            var signature = SignStringToSign(stringToSign, Encoding.UTF8.GetBytes(secret));
+            var authValue = AuthHeaderValue(signature, signedHeaders);
+            r.headers.Set(HeaderAuthorization, authValue);
+            r.headers.Remove("host");
+            foreach (string key in r.headers.AllKeys)
+            {
+                req.Headers.TryAddWithoutValidation(key, r.headers[key]);
+            }
+
+            return req;
+        }
+
+    }
+}

+ 266 - 0
FormSetter/GridViewSetter.cs

@@ -928,6 +928,272 @@ namespace PTMedicalInsurance.FormSetter
             dgv.RowHeadersVisible = false;
         }
         #endregion
+
+        #region 处方流转
+        /// <summary>
+        /// 设置HIS就诊信息列标题
+        /// </summary>
+        public void SetHeaderTextOfHISRegister(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "ID", "id", 80);
+            AddDGVColumn(dgv, "就诊PatID", "patID", 300);
+            AddDGVColumn(dgv, "就诊AdmID", "admID", 300);
+            AddDGVColumn(dgv, "姓名", "patName", 80);
+            AddDGVColumn(dgv, "性别", "patSex", 300);
+            AddDGVColumn(dgv, "接诊科室", "loc", 250);
+            AddDGVColumn(dgv, "接诊医生", "doc", 250);
+            AddDGVColumn(dgv, "接诊时间", "dateTime", 250);
+            AddDGVColumn(dgv, "处方编号", "prescNo", 250);
+        }
+
+        /// <summary>
+        /// 设置HIS就诊信息列标题
+        /// </summary>
+        public void SetHeaderTextOfHISPrescFee(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "名称", "medDesc", 80);
+            AddDGVColumn(dgv, "药品类别", "medCat", 300);
+            AddDGVColumn(dgv, "通用名", "drugGenname", 300);
+            AddDGVColumn(dgv, "剂型名称", "drugDosform", 80);
+            AddDGVColumn(dgv, "规格", "drugSpec", 300);
+            AddDGVColumn(dgv, "用法编码", "medcWayCodg", 250);
+            AddDGVColumn(dgv, "用法名称", "medcWayDscr", 250);
+            AddDGVColumn(dgv, "数量", "drugCnt", 250);
+            AddDGVColumn(dgv, "药品剂量单位", "drugDosunt", 250);
+            AddDGVColumn(dgv, "总量", "drugTotlcnt", 250);
+            AddDGVColumn(dgv, "总量单位", "drugTotlcntEmp", 250);
+            AddDGVColumn(dgv, "剂量", "sinDoscnt", 250);
+            AddDGVColumn(dgv, "剂量单位", "sinDosunt", 250);
+            AddDGVColumn(dgv, "给药方法编码", "usedFrquCodg", 250);
+            AddDGVColumn(dgv, "给药方法名称", "usedFrquName", 250);
+            AddDGVColumn(dgv, "医院审批标志", "hospApprFlag", 250);
+        }
+
+        /// <summary>
+        /// 设置电子处方上传表信息列标题
+        /// </summary>
+        public void SetHeaderTextOfPresUploadInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "记录ID", "ID", 80);
+            AddDGVColumn(dgv, "状态", "RxStasName", 80);
+            AddDGVColumn(dgv, "医保就诊ID", "MdtrtID", 200);
+            AddDGVColumn(dgv, "HIS就诊号", "Adm_Dr", 200);
+            AddDGVColumn(dgv, "医保处方编号", "HiRxno", 180);
+            AddDGVColumn(dgv, "处方追溯码", "RxTraceCode", 300);
+            AddDGVColumn(dgv, "姓名", "PatnName", 250);
+            AddDGVColumn(dgv, "证件号码", "Certno", 250);
+            AddDGVColumn(dgv, "医疗机构编号", "FixmedinsCode", 250); //
+            AddDGVColumn(dgv, "开方医保医师代码", "DrCode", 250); //
+            AddDGVColumn(dgv, "证件类型", "PsnCertType", 250);
+            AddDGVColumn(dgv, "开方医师姓名", "PrscDrName", 250);
+            AddDGVColumn(dgv, "审方药师科室名称", "PharDeptName", 250);
+            AddDGVColumn(dgv, "审方药师姓名", "PharName", 250);
+            AddDGVColumn(dgv, "医疗机构药师审方时间", "PharChkTime", 250);
+            AddDGVColumn(dgv, "发生时间", "OccurTime", 250);
+            AddDGVColumn(dgv, "医保处方状态编码", "RxStasCodg", 250);
+            AddDGVColumn(dgv, "医保处方状态名称", "RxStasName", 250);
+
+            AddDGVColumn(dgv, "撤销医师的医保医师代码", "UndrCode", 250);
+            AddDGVColumn(dgv, "撤销医师姓名", "UndoDrName", 250);
+            AddDGVColumn(dgv, "撤销医师证件类型", "UndoDrCertType", 250);
+            AddDGVColumn(dgv, "撤销医师证件号码", "UndoDrCertno", 250);
+            AddDGVColumn(dgv, "撤销原因描述", "UndoRea", 250);
+            AddDGVColumn(dgv, "撤销时间", "UndoTime", 250);
+        }
+
+        /// <summary>
+        /// 设置电子处方上传审核信息查询列标题
+        /// </summary>
+        public void SetHeaderTextOfPresUploadProcessInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "记录ID", "ID", 80);
+            AddDGVColumn(dgv, "状态", "Upload", 80);
+            AddDGVColumn(dgv, "医保就诊ID", "MdtrtID", 200);
+            AddDGVColumn(dgv, "HIS就诊号", "Adm_Dr", 200);
+            AddDGVColumn(dgv, "医保处方编号", "HiRxno", 180);
+            AddDGVColumn(dgv, "处方追溯码", "RxTraceCode", 300);
+            AddDGVColumn(dgv, "姓名", "PatnName", 250);
+            AddDGVColumn(dgv, "证件号码", "Certno", 250);
+            AddDGVColumn(dgv, "医疗机构编号", "FixmedinsCode", 250); //
+            AddDGVColumn(dgv, "开方医保医师代码", "DrCode", 250); //
+            AddDGVColumn(dgv, "证件类型", "PsnCertType", 250);
+            AddDGVColumn(dgv, "开方医师姓名", "PrscDrName", 250);
+            AddDGVColumn(dgv, "审方药师科室名称", "PharDeptName", 250);
+            AddDGVColumn(dgv, "审方药师姓名", "PharName", 250);
+            AddDGVColumn(dgv, "医疗机构药师审方时间", "PharChkTime", 250);
+            AddDGVColumn(dgv, "发生时间", "OccurTime", 250);
+            AddDGVColumn(dgv, "医保处方状态名称", "RxStasName", 250);
+        }
+
+        /// <summary>
+        /// 设置电子处方上传审核信息返回列标题
+        /// </summary>
+        public void SetHeaderTextOfPresPresAuditResults(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "医保处方编号", "hiRxno", 100);
+            AddDGVColumn(dgv, "处方审核状态代码", "rxChkStasCodg", 100);
+            AddDGVColumn(dgv, "处方审核状态", "rxChkStasName", 200);
+            AddDGVColumn(dgv, "处方审核意见", "rxChkOpnn", 180);
+            AddDGVColumn(dgv, "处方审核时间", "rxChkTime", 300);
+            AddDGVColumn(dgv, "医保药师姓名", "pharName", 80);
+            AddDGVColumn(dgv, "医保药师代码", "pharCode", 200);
+        }
+
+        /// <summary>
+        /// 设置电子处方上传预核验信息返回列标题
+        /// </summary>
+        public void SetHeaderTextOfPresPresCheckInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "HIS处方号", "HospRxno", 80);
+            AddDGVColumn(dgv, "医保处方号", "HiRxno", 80);
+            AddDGVColumn(dgv, "医保就诊ID", "MdtrtId", 100);
+            AddDGVColumn(dgv, "人员名称", "PatnName", 200);
+            AddDGVColumn(dgv, "人员证件类型", "PsnCertType", 100);
+            AddDGVColumn(dgv, "证件号码", "Certno", 100);
+            AddDGVColumn(dgv, "医疗类别", "MedType", 70);
+            AddDGVColumn(dgv, "住院/门诊号", "IptOtpNo", 70);
+            AddDGVColumn(dgv, "开方科室名称", "PrscDeptName", 70);
+            AddDGVColumn(dgv, "开方医师姓名", "prscDrName", 70);
+            AddDGVColumn(dgv, "就诊时间", "MdtrtTime", 70);
+            AddDGVColumn(dgv, "主诊断代码", "MaindiagCode", 70);
+            AddDGVColumn(dgv, "主诊断名称", "MaindiagName", 70);
+            AddDGVColumn(dgv, "医疗费总额", "MedfeeSumamt", 70);
+        }
+
+        /// <summary>
+        /// 设置电子处方信息查询返回值列标题
+        /// </summary>
+        public void SetHeaderTextOfPresDataInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "医保处方号", "hiRxno", 80);
+            AddDGVColumn(dgv, "定点医疗机构编号", "fixmedinsCode", 100);
+            AddDGVColumn(dgv, "定点医疗机构名称", "fixmedinsName", 200);
+            AddDGVColumn(dgv, "长期处方标志", "longRxFlag", 100);
+            AddDGVColumn(dgv, "开方时间", "prscTime", 100);
+            //AddDGVColumn(dgv, "医保处方状态编码", "rxStasCodg", 70);
+            AddDGVColumn(dgv, "医保处方状态名称", "rxStasName", 70);
+            //AddDGVColumn(dgv, "处方类别编号", "rxTypeCode", 70);
+            AddDGVColumn(dgv, "处方类别名称", "rxTypeName", 70);
+            //AddDGVColumn(dgv, "医保处方使用状态编码", "rxUsedStasCodg", 70);
+            AddDGVColumn(dgv, "医保处方使用状态名称", "rxUsedStasName", 70);
+            AddDGVColumn(dgv, "处方有效天数", "valiDays", 70);
+            AddDGVColumn(dgv, "有效截止时间", "valiEndTime", 70);
+        }
+
+        /// <summary>
+        /// 设置电子处方信息查询返回值rxDetlList列标题
+        /// </summary>
+        public void SetHeaderTextOfPresDetlListInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "医保处方号", "medListCodg", 80);
+            AddDGVColumn(dgv, "定点医疗机构编号", "fixmedinsHilistId", 100);
+            AddDGVColumn(dgv, "定点医疗机构名称", "hospPrepFlag", 200);
+            AddDGVColumn(dgv, "长期处方标志", "rxItemTypeCode", 100);
+            AddDGVColumn(dgv, "开方时间", "rxItemTypeName", 100);
+            AddDGVColumn(dgv, "医保处方状态编码", "tcmdrugTypeName", 70);
+            AddDGVColumn(dgv, "医保处方状态名称", "tcmdrugTypeCode", 70);
+            AddDGVColumn(dgv, "处方类别编号", "tcmherbFoote", 70);
+            AddDGVColumn(dgv, "处方类别名称", "mednTypeCode", 70);
+            AddDGVColumn(dgv, "医保处方使用状态编码", "mednTypeName", 70);
+            AddDGVColumn(dgv, "医保处方使用状态名称", "mainMedcFlag", 70);
+            AddDGVColumn(dgv, "处方有效天数", "urgtFlag", 70);
+            AddDGVColumn(dgv, "有效截止时间", "basMednFlag", 70);
+            AddDGVColumn(dgv, "是否进口药品", "impDrugFlag", 70);
+            AddDGVColumn(dgv, "药品商品名", "drugProdname", 70);
+            AddDGVColumn(dgv, "通用名编码", "gennameCodg", 70);
+            AddDGVColumn(dgv, "药品通用名", "drugGenname", 70);
+            AddDGVColumn(dgv, "药品剂型", "drugDosform", 70);
+            AddDGVColumn(dgv, "药品规格", "drugSpec", 70);
+            AddDGVColumn(dgv, "生厂厂家", "prdrName", 70);
+            AddDGVColumn(dgv, "药品单价", "drugPric", 70);
+            AddDGVColumn(dgv, "药品总金额", "drugSumamt", 70);
+            AddDGVColumn(dgv, "用药途径代码", "medcWayCodg", 70);
+            AddDGVColumn(dgv, "用药途径描述", "medcWayDscr", 70);
+            AddDGVColumn(dgv, "用药开始时间", "medcBegntime", 70);
+            AddDGVColumn(dgv, "用药结束时间", "medcEndtime", 70);
+            AddDGVColumn(dgv, "用药天数", "medcDays", 70);
+            AddDGVColumn(dgv, "药品总用药量", "drugCnt", 70);
+            AddDGVColumn(dgv, "药品总用药剂量单位", "drugDosunt", 70);
+            AddDGVColumn(dgv, "单次用量", "sinDoscnt", 70);
+            AddDGVColumn(dgv, "单次剂量单位", "sinDosunt", 70);
+            AddDGVColumn(dgv, "使用频次编码", "usedFrquCodg", 70);
+            AddDGVColumn(dgv, "使用频次名称", "usedFrquName", 70);
+            AddDGVColumn(dgv, "所需药品库存数量", "drugTotlcnt", 70);
+            AddDGVColumn(dgv, "所需药品库存单位", "drugTotlcntEmp", 70);
+            AddDGVColumn(dgv, "医院审批标志", "hospApprFlag", 70);
+        }
+
+        /// <summary>
+        /// 设置电子处方信息查询返回值rxOtpinfo列标题
+        /// </summary>
+        public void SetHeaderTextOfPresOtpinfoInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "医疗类别", "medType", 80);
+            AddDGVColumn(dgv, "住院/门诊号", "iptOpNo", 100);
+            AddDGVColumn(dgv, "门诊住院标志", "otpIptFlag", 200);
+            AddDGVColumn(dgv, "患者姓名", "patnName", 100);
+            AddDGVColumn(dgv, "年龄", "patnAge", 100);
+            //AddDGVColumn(dgv, "患者身高", "patnHgt", 70);
+            //AddDGVColumn(dgv, "患者体重", "patnWt", 70);
+            AddDGVColumn(dgv, "性别", "gend", 70);
+            AddDGVColumn(dgv, "过敏史", "algsHis", 70);
+            AddDGVColumn(dgv, "险种类型", "insutype", 70);
+            AddDGVColumn(dgv, "开方科室名称", "prscDeptName", 70);
+            AddDGVColumn(dgv, "开方医师姓名", "prscDrName", 70);
+            AddDGVColumn(dgv, "药师姓名", "pharName", 70);
+            AddDGVColumn(dgv, "医疗机构药师审方时间", "pharChkTime", 70);
+            AddDGVColumn(dgv, "就诊时间", "mdtrtTime", 70);
+            AddDGVColumn(dgv, "病种编码", "diseCodg", 70);
+            AddDGVColumn(dgv, "病种名称", "diseName", 70);
+            AddDGVColumn(dgv, "是否特殊病种", "spDiseFlag", 70);
+            AddDGVColumn(dgv, "主诊断代码", "maindiagCode", 70);
+            AddDGVColumn(dgv, "主诊断名称", "maindiagName", 70);
+            AddDGVColumn(dgv, "疾病病情描述", "diseCondDscr", 70);
+            AddDGVColumn(dgv, "是否初诊", "fstdiagFlag", 70);
+        }
+
+        /// <summary>
+        /// 设置电子处方信息查询返回值rxDiseList列标题
+        /// </summary>
+        public void SetHeaderTextOfPresDiseListInfo(DataGridView dgv)
+        {
+            dgv.AutoGenerateColumns = false;
+            dgv.Columns.Clear();
+            AddDGVColumn(dgv, "诊断类别", "diagType", 80);
+            AddDGVColumn(dgv, "主诊断标志", "maindiagFlag", 100);
+            AddDGVColumn(dgv, "诊断排序号", "diagSrtNo", 200);
+            AddDGVColumn(dgv, "诊断代码", "diagCode", 100);
+            AddDGVColumn(dgv, "诊断名称", "diagName", 100);
+            AddDGVColumn(dgv, "诊断科室", "diagDept", 70);
+            AddDGVColumn(dgv, "诊断医生编码", "diagDrNo", 70);
+            AddDGVColumn(dgv, "诊断医生姓名", "diagDrName", 70);
+            AddDGVColumn(dgv, "诊断时间", "diagTime", 70);
+            AddDGVColumn(dgv, "中医病名代码", "tcmDiseCode", 70);
+            AddDGVColumn(dgv, "中医病名名称", "tcmDiseName", 70);
+            AddDGVColumn(dgv, "中医症候代码", "tcmsympCode", 70);
+            AddDGVColumn(dgv, "中医症候", "tcmsymp", 70);
+        }
+
+
+        #endregion
     }
 
 }

+ 1723 - 0
Forms/PrescriptionCirculation.Designer.cs

@@ -0,0 +1,1723 @@
+
+namespace PTMedicalInsurance.Forms
+{
+    partial class PrescriptionCirculation
+    {
+        /// <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();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle43 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle44 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle45 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle46 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle47 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle48 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle49 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle50 = new System.Windows.Forms.DataGridViewCellStyle();
+            this.tc_Main = new Sunny.UI.UITabControl();
+            this.tb_PresUpload = new System.Windows.Forms.TabPage();
+            this.gb_HISInsuReg = new Sunny.UI.UIGroupBox();
+            this.dgv_HISRegInfo = new Sunny.UI.UIDataGridView();
+            this.gb_Prescription = new Sunny.UI.UIGroupBox();
+            this.dgv_PrescriptionInfo = new Sunny.UI.UIDataGridView();
+            this.uiPanel1 = new Sunny.UI.UIPanel();
+            this.btnElcSign = new Sunny.UI.UIButton();
+            this.uiLabel2 = new Sunny.UI.UILabel();
+            this.uiLabel1 = new Sunny.UI.UILabel();
+            this.dtED = new Sunny.UI.UIDatetimePicker();
+            this.dtST = new Sunny.UI.UIDatetimePicker();
+            this.tb_CertNo = new Sunny.UI.UITextBox();
+            this.btnGetInfo = new Sunny.UI.UIButton();
+            this.btnUpload_Pre = new Sunny.UI.UIButton();
+            this.btnClose = new Sunny.UI.UIButton();
+            this.btnPresUpload = new Sunny.UI.UIButton();
+            this.tb_CancelPres = new System.Windows.Forms.TabPage();
+            this.uiPanel2 = new Sunny.UI.UIPanel();
+            this.cbx_DocInfo = new PTControl.DBLookupCombox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.rtb_CancelReason = new Sunny.UI.UIRichTextBox();
+            this.rg_type = new Sunny.UI.UIRadioButtonGroup();
+            this.uiLabel3 = new Sunny.UI.UILabel();
+            this.uiLabel4 = new Sunny.UI.UILabel();
+            this.dt_Et = new Sunny.UI.UIDatetimePicker();
+            this.dt_St = new Sunny.UI.UIDatetimePicker();
+            this.tb_CertnoQuery = new Sunny.UI.UITextBox();
+            this.btnQuery = new Sunny.UI.UIButton();
+            this.uiButton3 = new Sunny.UI.UIButton();
+            this.btnCancel = new Sunny.UI.UIButton();
+            this.dgv_Master = new Sunny.UI.UIDataGridView();
+            this.tb_PresToExaInfo = new System.Windows.Forms.TabPage();
+            this.uiGroupBox2 = new Sunny.UI.UIGroupBox();
+            this.dgv_PresAuditResults = new Sunny.UI.UIDataGridView();
+            this.uiGroupBox1 = new Sunny.UI.UIGroupBox();
+            this.dgv_PresUploadInfo = new Sunny.UI.UIDataGridView();
+            this.uiPanel3 = new Sunny.UI.UIPanel();
+            this.uiLabel5 = new Sunny.UI.UILabel();
+            this.uiLabel6 = new Sunny.UI.UILabel();
+            this.dt_ET_Process = new Sunny.UI.UIDatetimePicker();
+            this.dt_ST_Process = new Sunny.UI.UIDatetimePicker();
+            this.uiTextBox1 = new Sunny.UI.UITextBox();
+            this.btn_QueryUploadInfo = new Sunny.UI.UIButton();
+            this.uiButton4 = new Sunny.UI.UIButton();
+            this.uiButton5 = new Sunny.UI.UIButton();
+            this.tb_PresInfo = new System.Windows.Forms.TabPage();
+            this.uiGroupBox4 = new Sunny.UI.UIGroupBox();
+            this.uiTabControl2 = new Sunny.UI.UITabControl();
+            this.tp_PresMain = new System.Windows.Forms.TabPage();
+            this.dgv_Main_tb = new Sunny.UI.UIDataGridView();
+            this.tp_DetlList = new System.Windows.Forms.TabPage();
+            this.dgv_DetlList_tb = new Sunny.UI.UIDataGridView();
+            this.tp_Otpinfo = new System.Windows.Forms.TabPage();
+            this.dgv_Otpinfo_tb = new Sunny.UI.UIDataGridView();
+            this.tp_DiseList = new System.Windows.Forms.TabPage();
+            this.dgv_DiseList_tb = new Sunny.UI.UIDataGridView();
+            this.uiGroupBox3 = new Sunny.UI.UIGroupBox();
+            this.dgv_PresPreChekInfo = new Sunny.UI.UIDataGridView();
+            this.uiPanel4 = new Sunny.UI.UIPanel();
+            this.uiLabel7 = new Sunny.UI.UILabel();
+            this.uiLabel8 = new Sunny.UI.UILabel();
+            this.dt_ET_PPC = new Sunny.UI.UIDatetimePicker();
+            this.dt_ST_PPC = new Sunny.UI.UIDatetimePicker();
+            this.tb_PresCertNo = new Sunny.UI.UITextBox();
+            this.tb_QueryPresPreCheck = new Sunny.UI.UIButton();
+            this.uiButton6 = new Sunny.UI.UIButton();
+            this.btn_InsuQuery = new Sunny.UI.UIButton();
+            this.tc_Main.SuspendLayout();
+            this.tb_PresUpload.SuspendLayout();
+            this.gb_HISInsuReg.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_HISRegInfo)).BeginInit();
+            this.gb_Prescription.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PrescriptionInfo)).BeginInit();
+            this.uiPanel1.SuspendLayout();
+            this.tb_CancelPres.SuspendLayout();
+            this.uiPanel2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Master)).BeginInit();
+            this.tb_PresToExaInfo.SuspendLayout();
+            this.uiGroupBox2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresAuditResults)).BeginInit();
+            this.uiGroupBox1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresUploadInfo)).BeginInit();
+            this.uiPanel3.SuspendLayout();
+            this.tb_PresInfo.SuspendLayout();
+            this.uiGroupBox4.SuspendLayout();
+            this.uiTabControl2.SuspendLayout();
+            this.tp_PresMain.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Main_tb)).BeginInit();
+            this.tp_DetlList.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_DetlList_tb)).BeginInit();
+            this.tp_Otpinfo.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Otpinfo_tb)).BeginInit();
+            this.tp_DiseList.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_DiseList_tb)).BeginInit();
+            this.uiGroupBox3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresPreChekInfo)).BeginInit();
+            this.uiPanel4.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // tc_Main
+            // 
+            this.tc_Main.Controls.Add(this.tb_PresUpload);
+            this.tc_Main.Controls.Add(this.tb_CancelPres);
+            this.tc_Main.Controls.Add(this.tb_PresToExaInfo);
+            this.tc_Main.Controls.Add(this.tb_PresInfo);
+            this.tc_Main.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.tc_Main.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
+            this.tc_Main.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tc_Main.ItemSize = new System.Drawing.Size(180, 40);
+            this.tc_Main.Location = new System.Drawing.Point(0, 0);
+            this.tc_Main.MainPage = "";
+            this.tc_Main.Name = "tc_Main";
+            this.tc_Main.SelectedIndex = 0;
+            this.tc_Main.Size = new System.Drawing.Size(1434, 744);
+            this.tc_Main.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
+            this.tc_Main.TabIndex = 0;
+            this.tc_Main.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tc_Main.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_PresUpload
+            // 
+            this.tb_PresUpload.Controls.Add(this.gb_HISInsuReg);
+            this.tb_PresUpload.Controls.Add(this.gb_Prescription);
+            this.tb_PresUpload.Controls.Add(this.uiPanel1);
+            this.tb_PresUpload.Location = new System.Drawing.Point(0, 40);
+            this.tb_PresUpload.Name = "tb_PresUpload";
+            this.tb_PresUpload.Size = new System.Drawing.Size(1434, 704);
+            this.tb_PresUpload.TabIndex = 0;
+            this.tb_PresUpload.Text = "电子处方上传";
+            this.tb_PresUpload.UseVisualStyleBackColor = true;
+            // 
+            // gb_HISInsuReg
+            // 
+            this.gb_HISInsuReg.Controls.Add(this.dgv_HISRegInfo);
+            this.gb_HISInsuReg.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.gb_HISInsuReg.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gb_HISInsuReg.Location = new System.Drawing.Point(0, 0);
+            this.gb_HISInsuReg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.gb_HISInsuReg.MinimumSize = new System.Drawing.Size(1, 1);
+            this.gb_HISInsuReg.Name = "gb_HISInsuReg";
+            this.gb_HISInsuReg.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.gb_HISInsuReg.Size = new System.Drawing.Size(1434, 323);
+            this.gb_HISInsuReg.TabIndex = 9;
+            this.gb_HISInsuReg.Text = "HIS就诊信息(点击查看处方明细)";
+            this.gb_HISInsuReg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.gb_HISInsuReg.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgv_HISRegInfo
+            // 
+            this.dgv_HISRegInfo.AllowUserToAddRows = false;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_HISRegInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            this.dgv_HISRegInfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_HISRegInfo.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.dgv_HISRegInfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            this.dgv_HISRegInfo.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.dgv_HISRegInfo.DefaultCellStyle = dataGridViewCellStyle3;
+            this.dgv_HISRegInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_HISRegInfo.EnableHeadersVisualStyles = false;
+            this.dgv_HISRegInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_HISRegInfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_HISRegInfo.Location = new System.Drawing.Point(0, 32);
+            this.dgv_HISRegInfo.Name = "dgv_HISRegInfo";
+            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.dgv_HISRegInfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            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.dgv_HISRegInfo.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            this.dgv_HISRegInfo.RowTemplate.Height = 23;
+            this.dgv_HISRegInfo.SelectedIndex = -1;
+            this.dgv_HISRegInfo.Size = new System.Drawing.Size(1434, 291);
+            this.dgv_HISRegInfo.TabIndex = 4;
+            this.dgv_HISRegInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.dgv_HISRegInfo.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv_HISRegInfo_CellClick);
+            // 
+            // gb_Prescription
+            // 
+            this.gb_Prescription.Controls.Add(this.dgv_PrescriptionInfo);
+            this.gb_Prescription.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.gb_Prescription.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.gb_Prescription.Location = new System.Drawing.Point(0, 323);
+            this.gb_Prescription.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.gb_Prescription.MinimumSize = new System.Drawing.Size(1, 1);
+            this.gb_Prescription.Name = "gb_Prescription";
+            this.gb_Prescription.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.gb_Prescription.Size = new System.Drawing.Size(1434, 298);
+            this.gb_Prescription.TabIndex = 6;
+            this.gb_Prescription.Text = "处方信息";
+            this.gb_Prescription.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.gb_Prescription.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgv_PrescriptionInfo
+            // 
+            this.dgv_PrescriptionInfo.AllowUserToAddRows = false;
+            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PrescriptionInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
+            this.dgv_PrescriptionInfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PrescriptionInfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PrescriptionInfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+            this.dgv_PrescriptionInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle8.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_PrescriptionInfo.DefaultCellStyle = dataGridViewCellStyle8;
+            this.dgv_PrescriptionInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_PrescriptionInfo.EnableHeadersVisualStyles = false;
+            this.dgv_PrescriptionInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_PrescriptionInfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_PrescriptionInfo.Location = new System.Drawing.Point(0, 32);
+            this.dgv_PrescriptionInfo.Name = "dgv_PrescriptionInfo";
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PrescriptionInfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_PrescriptionInfo.RowsDefaultCellStyle = dataGridViewCellStyle10;
+            this.dgv_PrescriptionInfo.RowTemplate.Height = 23;
+            this.dgv_PrescriptionInfo.SelectedIndex = -1;
+            this.dgv_PrescriptionInfo.Size = new System.Drawing.Size(1434, 266);
+            this.dgv_PrescriptionInfo.TabIndex = 5;
+            this.dgv_PrescriptionInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.dgv_PrescriptionInfo.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv_PrescriptionInfo_CellContentClick);
+            // 
+            // uiPanel1
+            // 
+            this.uiPanel1.Controls.Add(this.btnElcSign);
+            this.uiPanel1.Controls.Add(this.uiLabel2);
+            this.uiPanel1.Controls.Add(this.uiLabel1);
+            this.uiPanel1.Controls.Add(this.dtED);
+            this.uiPanel1.Controls.Add(this.dtST);
+            this.uiPanel1.Controls.Add(this.tb_CertNo);
+            this.uiPanel1.Controls.Add(this.btnGetInfo);
+            this.uiPanel1.Controls.Add(this.btnUpload_Pre);
+            this.uiPanel1.Controls.Add(this.btnClose);
+            this.uiPanel1.Controls.Add(this.btnPresUpload);
+            this.uiPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiPanel1.Location = new System.Drawing.Point(0, 621);
+            this.uiPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel1.Name = "uiPanel1";
+            this.uiPanel1.Size = new System.Drawing.Size(1434, 83);
+            this.uiPanel1.TabIndex = 0;
+            this.uiPanel1.Text = null;
+            this.uiPanel1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // btnElcSign
+            // 
+            this.btnElcSign.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnElcSign.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnElcSign.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnElcSign.Location = new System.Drawing.Point(1101, 11);
+            this.btnElcSign.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnElcSign.Name = "btnElcSign";
+            this.btnElcSign.Size = new System.Drawing.Size(107, 62);
+            this.btnElcSign.TabIndex = 40;
+            this.btnElcSign.Text = "3.电子签名";
+            this.btnElcSign.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnElcSign.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnElcSign.Click += new System.EventHandler(this.btnElcSign_Click);
+            // 
+            // uiLabel2
+            // 
+            this.uiLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel2.Location = new System.Drawing.Point(309, 11);
+            this.uiLabel2.Name = "uiLabel2";
+            this.uiLabel2.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel2.TabIndex = 39;
+            this.uiLabel2.Text = "身份证号:";
+            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel1
+            // 
+            this.uiLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel1.Location = new System.Drawing.Point(16, 11);
+            this.uiLabel1.Name = "uiLabel1";
+            this.uiLabel1.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel1.TabIndex = 38;
+            this.uiLabel1.Text = "查询时间:";
+            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dtED
+            // 
+            this.dtED.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dtED.FillColor = System.Drawing.Color.White;
+            this.dtED.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dtED.Location = new System.Drawing.Point(109, 44);
+            this.dtED.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dtED.MaxLength = 19;
+            this.dtED.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dtED.Name = "dtED";
+            this.dtED.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dtED.Size = new System.Drawing.Size(183, 29);
+            this.dtED.SymbolDropDown = 61555;
+            this.dtED.SymbolNormal = 61555;
+            this.dtED.TabIndex = 37;
+            this.dtED.Text = "2023-06-15 00:00:00";
+            this.dtED.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dtED.Value = new System.DateTime(2023, 6, 15, 0, 0, 0, 0);
+            this.dtED.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dtST
+            // 
+            this.dtST.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dtST.FillColor = System.Drawing.Color.White;
+            this.dtST.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dtST.Location = new System.Drawing.Point(109, 9);
+            this.dtST.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dtST.MaxLength = 19;
+            this.dtST.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dtST.Name = "dtST";
+            this.dtST.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dtST.Size = new System.Drawing.Size(183, 29);
+            this.dtST.SymbolDropDown = 61555;
+            this.dtST.SymbolNormal = 61555;
+            this.dtST.TabIndex = 36;
+            this.dtST.Text = "2023-06-14 00:00:00";
+            this.dtST.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dtST.Value = new System.DateTime(2023, 6, 14, 0, 0, 0, 0);
+            this.dtST.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_CertNo
+            // 
+            this.tb_CertNo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.tb_CertNo.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tb_CertNo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tb_CertNo.Location = new System.Drawing.Point(307, 44);
+            this.tb_CertNo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tb_CertNo.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tb_CertNo.Name = "tb_CertNo";
+            this.tb_CertNo.ShowText = false;
+            this.tb_CertNo.Size = new System.Drawing.Size(175, 29);
+            this.tb_CertNo.TabIndex = 30;
+            this.tb_CertNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tb_CertNo.Watermark = "请输入身份证号";
+            this.tb_CertNo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // btnGetInfo
+            // 
+            this.btnGetInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.btnGetInfo.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnGetInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnGetInfo.Location = new System.Drawing.Point(499, 11);
+            this.btnGetInfo.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnGetInfo.Name = "btnGetInfo";
+            this.btnGetInfo.Size = new System.Drawing.Size(111, 62);
+            this.btnGetInfo.TabIndex = 29;
+            this.btnGetInfo.Text = "1.查  询";
+            this.btnGetInfo.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnGetInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnGetInfo.Click += new System.EventHandler(this.btnReadCard_Click);
+            // 
+            // btnUpload_Pre
+            // 
+            this.btnUpload_Pre.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnUpload_Pre.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnUpload_Pre.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnUpload_Pre.Location = new System.Drawing.Point(991, 11);
+            this.btnUpload_Pre.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnUpload_Pre.Name = "btnUpload_Pre";
+            this.btnUpload_Pre.Size = new System.Drawing.Size(107, 62);
+            this.btnUpload_Pre.TabIndex = 2;
+            this.btnUpload_Pre.Text = "2.预核验";
+            this.btnUpload_Pre.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnUpload_Pre.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnUpload_Pre.Click += new System.EventHandler(this.btnUpload_Pre_Click);
+            // 
+            // btnClose
+            // 
+            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnClose.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnClose.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnClose.Location = new System.Drawing.Point(1321, 11);
+            this.btnClose.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(107, 62);
+            this.btnClose.TabIndex = 1;
+            this.btnClose.Text = "退    出";
+            this.btnClose.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnClose.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // btnPresUpload
+            // 
+            this.btnPresUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnPresUpload.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnPresUpload.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnPresUpload.Location = new System.Drawing.Point(1211, 11);
+            this.btnPresUpload.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnPresUpload.Name = "btnPresUpload";
+            this.btnPresUpload.Size = new System.Drawing.Size(107, 62);
+            this.btnPresUpload.TabIndex = 0;
+            this.btnPresUpload.Text = "4.确认上传";
+            this.btnPresUpload.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnPresUpload.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnPresUpload.Click += new System.EventHandler(this.btnPresUpload_Click);
+            // 
+            // tb_CancelPres
+            // 
+            this.tb_CancelPres.Controls.Add(this.uiPanel2);
+            this.tb_CancelPres.Controls.Add(this.dgv_Master);
+            this.tb_CancelPres.Location = new System.Drawing.Point(0, 40);
+            this.tb_CancelPres.Name = "tb_CancelPres";
+            this.tb_CancelPres.Size = new System.Drawing.Size(1434, 704);
+            this.tb_CancelPres.TabIndex = 1;
+            this.tb_CancelPres.Text = "电子处方撤销";
+            this.tb_CancelPres.UseVisualStyleBackColor = true;
+            // 
+            // uiPanel2
+            // 
+            this.uiPanel2.Controls.Add(this.cbx_DocInfo);
+            this.uiPanel2.Controls.Add(this.label4);
+            this.uiPanel2.Controls.Add(this.rtb_CancelReason);
+            this.uiPanel2.Controls.Add(this.rg_type);
+            this.uiPanel2.Controls.Add(this.uiLabel3);
+            this.uiPanel2.Controls.Add(this.uiLabel4);
+            this.uiPanel2.Controls.Add(this.dt_Et);
+            this.uiPanel2.Controls.Add(this.dt_St);
+            this.uiPanel2.Controls.Add(this.tb_CertnoQuery);
+            this.uiPanel2.Controls.Add(this.btnQuery);
+            this.uiPanel2.Controls.Add(this.uiButton3);
+            this.uiPanel2.Controls.Add(this.btnCancel);
+            this.uiPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiPanel2.Location = new System.Drawing.Point(0, 603);
+            this.uiPanel2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel2.Name = "uiPanel2";
+            this.uiPanel2.Size = new System.Drawing.Size(1434, 101);
+            this.uiPanel2.TabIndex = 7;
+            this.uiPanel2.Text = null;
+            this.uiPanel2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // cbx_DocInfo
+            // 
+            this.cbx_DocInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.cbx_DocInfo.FormattingEnabled = true;
+            this.cbx_DocInfo.Location = new System.Drawing.Point(649, 7);
+            this.cbx_DocInfo.Name = "cbx_DocInfo";
+            this.cbx_DocInfo.NullValue = "";
+            this.cbx_DocInfo.PopupGridAutoSize = false;
+            this.cbx_DocInfo.RowFilterVisible = false;
+            this.cbx_DocInfo.sDisplayField = "";
+            this.cbx_DocInfo.sDisplayMember = "";
+            this.cbx_DocInfo.SeparatorChar = "|";
+            this.cbx_DocInfo.Size = new System.Drawing.Size(230, 29);
+            this.cbx_DocInfo.sKeyWords = "";
+            this.cbx_DocInfo.sValueMember = "";
+            this.cbx_DocInfo.TabIndex = 43;
+            this.cbx_DocInfo.Value = "";
+            this.cbx_DocInfo.AfterSelector += new PTControl.AfterSelectorEventHandler(this.cbx_DocInfo_AfterSelector);
+            // 
+            // label4
+            // 
+            this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.label4.AutoSize = true;
+            this.label4.ForeColor = System.Drawing.SystemColors.InfoText;
+            this.label4.Location = new System.Drawing.Point(552, 11);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(90, 21);
+            this.label4.TabIndex = 42;
+            this.label4.Text = "撤销医师:";
+            // 
+            // rtb_CancelReason
+            // 
+            this.rtb_CancelReason.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.rtb_CancelReason.FillColor = System.Drawing.Color.White;
+            this.rtb_CancelReason.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.rtb_CancelReason.Location = new System.Drawing.Point(552, 37);
+            this.rtb_CancelReason.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.rtb_CancelReason.MinimumSize = new System.Drawing.Size(1, 1);
+            this.rtb_CancelReason.Name = "rtb_CancelReason";
+            this.rtb_CancelReason.Padding = new System.Windows.Forms.Padding(2);
+            this.rtb_CancelReason.ShowText = false;
+            this.rtb_CancelReason.Size = new System.Drawing.Size(328, 58);
+            this.rtb_CancelReason.TabIndex = 41;
+            this.rtb_CancelReason.Text = "请输入撤销原因";
+            this.rtb_CancelReason.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.rtb_CancelReason.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // rg_type
+            // 
+            this.rg_type.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.rg_type.ColumnCount = 2;
+            this.rg_type.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.rg_type.Items.AddRange(new object[] {
+            "全部",
+            "已上传",
+            "已撤销"});
+            this.rg_type.ItemSize = new System.Drawing.Size(100, 35);
+            this.rg_type.Location = new System.Drawing.Point(321, 1);
+            this.rg_type.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.rg_type.MinimumSize = new System.Drawing.Size(1, 1);
+            this.rg_type.Name = "rg_type";
+            this.rg_type.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.rg_type.Size = new System.Drawing.Size(222, 95);
+            this.rg_type.TabIndex = 40;
+            this.rg_type.Text = "上传状态";
+            this.rg_type.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.rg_type.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel3
+            // 
+            this.uiLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel3.Location = new System.Drawing.Point(17, 70);
+            this.uiLabel3.Name = "uiLabel3";
+            this.uiLabel3.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel3.TabIndex = 39;
+            this.uiLabel3.Text = "身份证号:";
+            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel4
+            // 
+            this.uiLabel4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel4.Location = new System.Drawing.Point(17, 10);
+            this.uiLabel4.Name = "uiLabel4";
+            this.uiLabel4.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel4.TabIndex = 38;
+            this.uiLabel4.Text = "查询时间:";
+            this.uiLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_Et
+            // 
+            this.dt_Et.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_Et.FillColor = System.Drawing.Color.White;
+            this.dt_Et.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_Et.Location = new System.Drawing.Point(113, 37);
+            this.dt_Et.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_Et.MaxLength = 19;
+            this.dt_Et.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_Et.Name = "dt_Et";
+            this.dt_Et.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_Et.Size = new System.Drawing.Size(198, 29);
+            this.dt_Et.SymbolDropDown = 61555;
+            this.dt_Et.SymbolNormal = 61555;
+            this.dt_Et.TabIndex = 37;
+            this.dt_Et.Text = "2023-06-15 00:00:00";
+            this.dt_Et.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_Et.Value = new System.DateTime(2023, 6, 15, 0, 0, 0, 0);
+            this.dt_Et.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_St
+            // 
+            this.dt_St.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_St.FillColor = System.Drawing.Color.White;
+            this.dt_St.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_St.Location = new System.Drawing.Point(113, 7);
+            this.dt_St.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_St.MaxLength = 19;
+            this.dt_St.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_St.Name = "dt_St";
+            this.dt_St.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_St.Size = new System.Drawing.Size(198, 29);
+            this.dt_St.SymbolDropDown = 61555;
+            this.dt_St.SymbolNormal = 61555;
+            this.dt_St.TabIndex = 36;
+            this.dt_St.Text = "2023-06-14 00:00:00";
+            this.dt_St.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_St.Value = new System.DateTime(2023, 6, 14, 0, 0, 0, 0);
+            this.dt_St.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_CertnoQuery
+            // 
+            this.tb_CertnoQuery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.tb_CertnoQuery.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tb_CertnoQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tb_CertnoQuery.Location = new System.Drawing.Point(113, 67);
+            this.tb_CertnoQuery.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tb_CertnoQuery.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tb_CertnoQuery.Name = "tb_CertnoQuery";
+            this.tb_CertnoQuery.ShowText = false;
+            this.tb_CertnoQuery.Size = new System.Drawing.Size(198, 29);
+            this.tb_CertnoQuery.TabIndex = 30;
+            this.tb_CertnoQuery.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tb_CertnoQuery.Watermark = "请输入身份证号";
+            this.tb_CertnoQuery.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // btnQuery
+            // 
+            this.btnQuery.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnQuery.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnQuery.Location = new System.Drawing.Point(1093, 13);
+            this.btnQuery.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnQuery.Name = "btnQuery";
+            this.btnQuery.Size = new System.Drawing.Size(114, 75);
+            this.btnQuery.TabIndex = 29;
+            this.btnQuery.Text = "查  询";
+            this.btnQuery.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnQuery.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click);
+            // 
+            // uiButton3
+            // 
+            this.uiButton3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.uiButton3.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.Location = new System.Drawing.Point(1323, 13);
+            this.uiButton3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton3.Name = "uiButton3";
+            this.uiButton3.Size = new System.Drawing.Size(106, 75);
+            this.uiButton3.TabIndex = 1;
+            this.uiButton3.Text = "退    出";
+            this.uiButton3.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton3.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btnCancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnCancel.Location = new System.Drawing.Point(1208, 13);
+            this.btnCancel.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(114, 75);
+            this.btnCancel.TabIndex = 0;
+            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);
+            // 
+            // dgv_Master
+            // 
+            this.dgv_Master.AllowUserToAddRows = false;
+            dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Master.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
+            this.dgv_Master.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Master.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Master.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
+            this.dgv_Master.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle13.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle13.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_Master.DefaultCellStyle = dataGridViewCellStyle13;
+            this.dgv_Master.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_Master.EnableHeadersVisualStyles = false;
+            this.dgv_Master.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_Master.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_Master.Location = new System.Drawing.Point(0, 0);
+            this.dgv_Master.Name = "dgv_Master";
+            dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle14.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle14.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle14.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle14.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Master.RowHeadersDefaultCellStyle = dataGridViewCellStyle14;
+            dataGridViewCellStyle15.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle15.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle15.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle15.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_Master.RowsDefaultCellStyle = dataGridViewCellStyle15;
+            this.dgv_Master.RowTemplate.Height = 23;
+            this.dgv_Master.SelectedIndex = -1;
+            this.dgv_Master.Size = new System.Drawing.Size(1434, 704);
+            this.dgv_Master.TabIndex = 6;
+            this.dgv_Master.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_PresToExaInfo
+            // 
+            this.tb_PresToExaInfo.Controls.Add(this.uiGroupBox2);
+            this.tb_PresToExaInfo.Controls.Add(this.uiGroupBox1);
+            this.tb_PresToExaInfo.Controls.Add(this.uiPanel3);
+            this.tb_PresToExaInfo.Location = new System.Drawing.Point(0, 40);
+            this.tb_PresToExaInfo.Name = "tb_PresToExaInfo";
+            this.tb_PresToExaInfo.Size = new System.Drawing.Size(1434, 704);
+            this.tb_PresToExaInfo.TabIndex = 3;
+            this.tb_PresToExaInfo.Text = "电子处方审核结果查询";
+            this.tb_PresToExaInfo.UseVisualStyleBackColor = true;
+            // 
+            // uiGroupBox2
+            // 
+            this.uiGroupBox2.Controls.Add(this.dgv_PresAuditResults);
+            this.uiGroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.uiGroupBox2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiGroupBox2.Location = new System.Drawing.Point(0, 430);
+            this.uiGroupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiGroupBox2.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiGroupBox2.Name = "uiGroupBox2";
+            this.uiGroupBox2.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.uiGroupBox2.Size = new System.Drawing.Size(1434, 186);
+            this.uiGroupBox2.TabIndex = 11;
+            this.uiGroupBox2.Text = "电子处方审核结果";
+            this.uiGroupBox2.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiGroupBox2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgv_PresAuditResults
+            // 
+            this.dgv_PresAuditResults.AllowUserToAddRows = false;
+            dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresAuditResults.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle16;
+            this.dgv_PresAuditResults.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresAuditResults.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle17.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle17.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresAuditResults.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17;
+            this.dgv_PresAuditResults.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle18.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle18.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle18.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle18.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_PresAuditResults.DefaultCellStyle = dataGridViewCellStyle18;
+            this.dgv_PresAuditResults.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_PresAuditResults.EnableHeadersVisualStyles = false;
+            this.dgv_PresAuditResults.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_PresAuditResults.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_PresAuditResults.Location = new System.Drawing.Point(0, 32);
+            this.dgv_PresAuditResults.Name = "dgv_PresAuditResults";
+            dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle19.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle19.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresAuditResults.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
+            dataGridViewCellStyle20.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle20.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle20.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_PresAuditResults.RowsDefaultCellStyle = dataGridViewCellStyle20;
+            this.dgv_PresAuditResults.RowTemplate.Height = 23;
+            this.dgv_PresAuditResults.SelectedIndex = -1;
+            this.dgv_PresAuditResults.Size = new System.Drawing.Size(1434, 154);
+            this.dgv_PresAuditResults.TabIndex = 12;
+            this.dgv_PresAuditResults.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiGroupBox1
+            // 
+            this.uiGroupBox1.Controls.Add(this.dgv_PresUploadInfo);
+            this.uiGroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.uiGroupBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiGroupBox1.Location = new System.Drawing.Point(0, 0);
+            this.uiGroupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiGroupBox1.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiGroupBox1.Name = "uiGroupBox1";
+            this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.uiGroupBox1.Size = new System.Drawing.Size(1434, 430);
+            this.uiGroupBox1.TabIndex = 10;
+            this.uiGroupBox1.Text = "电子处方上传记录";
+            this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiGroupBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgv_PresUploadInfo
+            // 
+            this.dgv_PresUploadInfo.AllowUserToAddRows = false;
+            dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresUploadInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21;
+            this.dgv_PresUploadInfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresUploadInfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle22.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle22.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresUploadInfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22;
+            this.dgv_PresUploadInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle23.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle23.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle23.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle23.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle23.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_PresUploadInfo.DefaultCellStyle = dataGridViewCellStyle23;
+            this.dgv_PresUploadInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_PresUploadInfo.EnableHeadersVisualStyles = false;
+            this.dgv_PresUploadInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_PresUploadInfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_PresUploadInfo.Location = new System.Drawing.Point(0, 32);
+            this.dgv_PresUploadInfo.Name = "dgv_PresUploadInfo";
+            dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle24.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle24.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle24.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle24.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresUploadInfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle24;
+            dataGridViewCellStyle25.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle25.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle25.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle25.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle25.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_PresUploadInfo.RowsDefaultCellStyle = dataGridViewCellStyle25;
+            this.dgv_PresUploadInfo.RowTemplate.Height = 23;
+            this.dgv_PresUploadInfo.SelectedIndex = -1;
+            this.dgv_PresUploadInfo.Size = new System.Drawing.Size(1434, 398);
+            this.dgv_PresUploadInfo.TabIndex = 11;
+            this.dgv_PresUploadInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiPanel3
+            // 
+            this.uiPanel3.Controls.Add(this.uiLabel5);
+            this.uiPanel3.Controls.Add(this.uiLabel6);
+            this.uiPanel3.Controls.Add(this.dt_ET_Process);
+            this.uiPanel3.Controls.Add(this.dt_ST_Process);
+            this.uiPanel3.Controls.Add(this.uiTextBox1);
+            this.uiPanel3.Controls.Add(this.btn_QueryUploadInfo);
+            this.uiPanel3.Controls.Add(this.uiButton4);
+            this.uiPanel3.Controls.Add(this.uiButton5);
+            this.uiPanel3.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.uiPanel3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiPanel3.Location = new System.Drawing.Point(0, 616);
+            this.uiPanel3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel3.Name = "uiPanel3";
+            this.uiPanel3.Size = new System.Drawing.Size(1434, 88);
+            this.uiPanel3.TabIndex = 8;
+            this.uiPanel3.Text = null;
+            this.uiPanel3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel5
+            // 
+            this.uiLabel5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel5.Location = new System.Drawing.Point(494, 35);
+            this.uiLabel5.Name = "uiLabel5";
+            this.uiLabel5.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel5.TabIndex = 39;
+            this.uiLabel5.Text = "身份证号:";
+            this.uiLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel6
+            // 
+            this.uiLabel6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel6.Location = new System.Drawing.Point(16, 35);
+            this.uiLabel6.Name = "uiLabel6";
+            this.uiLabel6.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel6.TabIndex = 38;
+            this.uiLabel6.Text = "查询时间:";
+            this.uiLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_ET_Process
+            // 
+            this.dt_ET_Process.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_ET_Process.FillColor = System.Drawing.Color.White;
+            this.dt_ET_Process.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_ET_Process.Location = new System.Drawing.Point(296, 33);
+            this.dt_ET_Process.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_ET_Process.MaxLength = 19;
+            this.dt_ET_Process.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_ET_Process.Name = "dt_ET_Process";
+            this.dt_ET_Process.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_ET_Process.Size = new System.Drawing.Size(183, 29);
+            this.dt_ET_Process.SymbolDropDown = 61555;
+            this.dt_ET_Process.SymbolNormal = 61555;
+            this.dt_ET_Process.TabIndex = 37;
+            this.dt_ET_Process.Text = "2023-06-15 00:00:00";
+            this.dt_ET_Process.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_ET_Process.Value = new System.DateTime(2023, 6, 15, 0, 0, 0, 0);
+            this.dt_ET_Process.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_ST_Process
+            // 
+            this.dt_ST_Process.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_ST_Process.FillColor = System.Drawing.Color.White;
+            this.dt_ST_Process.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_ST_Process.Location = new System.Drawing.Point(111, 33);
+            this.dt_ST_Process.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_ST_Process.MaxLength = 19;
+            this.dt_ST_Process.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_ST_Process.Name = "dt_ST_Process";
+            this.dt_ST_Process.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_ST_Process.Size = new System.Drawing.Size(183, 29);
+            this.dt_ST_Process.SymbolDropDown = 61555;
+            this.dt_ST_Process.SymbolNormal = 61555;
+            this.dt_ST_Process.TabIndex = 36;
+            this.dt_ST_Process.Text = "2023-06-14 00:00:00";
+            this.dt_ST_Process.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_ST_Process.Value = new System.DateTime(2023, 6, 14, 0, 0, 0, 0);
+            this.dt_ST_Process.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTextBox1
+            // 
+            this.uiTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiTextBox1.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.uiTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTextBox1.Location = new System.Drawing.Point(586, 33);
+            this.uiTextBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiTextBox1.MinimumSize = new System.Drawing.Size(1, 16);
+            this.uiTextBox1.Name = "uiTextBox1";
+            this.uiTextBox1.ShowText = false;
+            this.uiTextBox1.Size = new System.Drawing.Size(183, 29);
+            this.uiTextBox1.TabIndex = 30;
+            this.uiTextBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiTextBox1.Watermark = "请输入身份证号";
+            this.uiTextBox1.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // btn_QueryUploadInfo
+            // 
+            this.btn_QueryUploadInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.btn_QueryUploadInfo.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btn_QueryUploadInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btn_QueryUploadInfo.Location = new System.Drawing.Point(792, 11);
+            this.btn_QueryUploadInfo.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btn_QueryUploadInfo.Name = "btn_QueryUploadInfo";
+            this.btn_QueryUploadInfo.Size = new System.Drawing.Size(189, 66);
+            this.btn_QueryUploadInfo.TabIndex = 29;
+            this.btn_QueryUploadInfo.Text = "1.电子处方上传记录查询";
+            this.btn_QueryUploadInfo.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btn_QueryUploadInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btn_QueryUploadInfo.Click += new System.EventHandler(this.btn_QueryUploadInfo_Click);
+            // 
+            // uiButton4
+            // 
+            this.uiButton4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.uiButton4.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton4.Location = new System.Drawing.Point(1322, 11);
+            this.uiButton4.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton4.Name = "uiButton4";
+            this.uiButton4.Size = new System.Drawing.Size(106, 66);
+            this.uiButton4.TabIndex = 1;
+            this.uiButton4.Text = "退    出";
+            this.uiButton4.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton4.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // uiButton5
+            // 
+            this.uiButton5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.uiButton5.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton5.Location = new System.Drawing.Point(1094, 11);
+            this.uiButton5.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton5.Name = "uiButton5";
+            this.uiButton5.Size = new System.Drawing.Size(226, 66);
+            this.uiButton5.TabIndex = 0;
+            this.uiButton5.Text = "2.选中上传记录查询审核结果";
+            this.uiButton5.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton5.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton5.Click += new System.EventHandler(this.uiButton5_Click);
+            // 
+            // tb_PresInfo
+            // 
+            this.tb_PresInfo.Controls.Add(this.uiGroupBox4);
+            this.tb_PresInfo.Controls.Add(this.uiGroupBox3);
+            this.tb_PresInfo.Controls.Add(this.uiPanel4);
+            this.tb_PresInfo.Location = new System.Drawing.Point(0, 40);
+            this.tb_PresInfo.Name = "tb_PresInfo";
+            this.tb_PresInfo.Size = new System.Drawing.Size(1434, 704);
+            this.tb_PresInfo.TabIndex = 2;
+            this.tb_PresInfo.Text = "电子处方信息查询";
+            this.tb_PresInfo.UseVisualStyleBackColor = true;
+            // 
+            // uiGroupBox4
+            // 
+            this.uiGroupBox4.Controls.Add(this.uiTabControl2);
+            this.uiGroupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.uiGroupBox4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiGroupBox4.Location = new System.Drawing.Point(0, 268);
+            this.uiGroupBox4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiGroupBox4.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiGroupBox4.Name = "uiGroupBox4";
+            this.uiGroupBox4.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.uiGroupBox4.Size = new System.Drawing.Size(1434, 348);
+            this.uiGroupBox4.TabIndex = 11;
+            this.uiGroupBox4.Text = "医保电子处方中心返回信息";
+            this.uiGroupBox4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiGroupBox4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiTabControl2
+            // 
+            this.uiTabControl2.Controls.Add(this.tp_PresMain);
+            this.uiTabControl2.Controls.Add(this.tp_DetlList);
+            this.uiTabControl2.Controls.Add(this.tp_Otpinfo);
+            this.uiTabControl2.Controls.Add(this.tp_DiseList);
+            this.uiTabControl2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.uiTabControl2.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
+            this.uiTabControl2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTabControl2.ItemSize = new System.Drawing.Size(150, 40);
+            this.uiTabControl2.Location = new System.Drawing.Point(0, 32);
+            this.uiTabControl2.MainPage = "";
+            this.uiTabControl2.Name = "uiTabControl2";
+            this.uiTabControl2.SelectedIndex = 0;
+            this.uiTabControl2.Size = new System.Drawing.Size(1434, 316);
+            this.uiTabControl2.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
+            this.uiTabControl2.TabIndex = 0;
+            this.uiTabControl2.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiTabControl2.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tp_PresMain
+            // 
+            this.tp_PresMain.Controls.Add(this.dgv_Main_tb);
+            this.tp_PresMain.Location = new System.Drawing.Point(0, 40);
+            this.tp_PresMain.Name = "tp_PresMain";
+            this.tp_PresMain.Size = new System.Drawing.Size(1434, 276);
+            this.tp_PresMain.TabIndex = 0;
+            this.tp_PresMain.Text = "处方信息";
+            this.tp_PresMain.UseVisualStyleBackColor = true;
+            // 
+            // dgv_Main_tb
+            // 
+            this.dgv_Main_tb.AllowUserToAddRows = false;
+            dataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Main_tb.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle26;
+            this.dgv_Main_tb.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Main_tb.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle27.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle27.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle27.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle27.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle27.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Main_tb.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle27;
+            this.dgv_Main_tb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle28.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle28.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle28.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle28.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle28.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_Main_tb.DefaultCellStyle = dataGridViewCellStyle28;
+            this.dgv_Main_tb.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_Main_tb.EnableHeadersVisualStyles = false;
+            this.dgv_Main_tb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_Main_tb.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_Main_tb.Location = new System.Drawing.Point(0, 0);
+            this.dgv_Main_tb.Name = "dgv_Main_tb";
+            dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle29.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle29.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle29.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle29.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Main_tb.RowHeadersDefaultCellStyle = dataGridViewCellStyle29;
+            dataGridViewCellStyle30.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle30.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle30.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle30.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_Main_tb.RowsDefaultCellStyle = dataGridViewCellStyle30;
+            this.dgv_Main_tb.RowTemplate.Height = 23;
+            this.dgv_Main_tb.SelectedIndex = -1;
+            this.dgv_Main_tb.Size = new System.Drawing.Size(1434, 276);
+            this.dgv_Main_tb.TabIndex = 1;
+            this.dgv_Main_tb.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tp_DetlList
+            // 
+            this.tp_DetlList.Controls.Add(this.dgv_DetlList_tb);
+            this.tp_DetlList.Location = new System.Drawing.Point(0, 40);
+            this.tp_DetlList.Name = "tp_DetlList";
+            this.tp_DetlList.Size = new System.Drawing.Size(200, 0);
+            this.tp_DetlList.TabIndex = 1;
+            this.tp_DetlList.Text = "处方明细信息";
+            this.tp_DetlList.UseVisualStyleBackColor = true;
+            // 
+            // dgv_DetlList_tb
+            // 
+            this.dgv_DetlList_tb.AllowUserToAddRows = false;
+            dataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_DetlList_tb.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle31;
+            this.dgv_DetlList_tb.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_DetlList_tb.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle32.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle32.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle32.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle32.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle32.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_DetlList_tb.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle32;
+            this.dgv_DetlList_tb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle33.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle33.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle33.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle33.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle33.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle33.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle33.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_DetlList_tb.DefaultCellStyle = dataGridViewCellStyle33;
+            this.dgv_DetlList_tb.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_DetlList_tb.EnableHeadersVisualStyles = false;
+            this.dgv_DetlList_tb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_DetlList_tb.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_DetlList_tb.Location = new System.Drawing.Point(0, 0);
+            this.dgv_DetlList_tb.Name = "dgv_DetlList_tb";
+            dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle34.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle34.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle34.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle34.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle34.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_DetlList_tb.RowHeadersDefaultCellStyle = dataGridViewCellStyle34;
+            dataGridViewCellStyle35.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle35.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle35.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle35.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_DetlList_tb.RowsDefaultCellStyle = dataGridViewCellStyle35;
+            this.dgv_DetlList_tb.RowTemplate.Height = 23;
+            this.dgv_DetlList_tb.SelectedIndex = -1;
+            this.dgv_DetlList_tb.Size = new System.Drawing.Size(200, 0);
+            this.dgv_DetlList_tb.TabIndex = 1;
+            this.dgv_DetlList_tb.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tp_Otpinfo
+            // 
+            this.tp_Otpinfo.Controls.Add(this.dgv_Otpinfo_tb);
+            this.tp_Otpinfo.Location = new System.Drawing.Point(0, 40);
+            this.tp_Otpinfo.Name = "tp_Otpinfo";
+            this.tp_Otpinfo.Size = new System.Drawing.Size(200, 0);
+            this.tp_Otpinfo.TabIndex = 2;
+            this.tp_Otpinfo.Text = "就诊信息";
+            this.tp_Otpinfo.UseVisualStyleBackColor = true;
+            // 
+            // dgv_Otpinfo_tb
+            // 
+            this.dgv_Otpinfo_tb.AllowUserToAddRows = false;
+            dataGridViewCellStyle36.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Otpinfo_tb.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle36;
+            this.dgv_Otpinfo_tb.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_Otpinfo_tb.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle37.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle37.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle37.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle37.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle37.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle37.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Otpinfo_tb.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle37;
+            this.dgv_Otpinfo_tb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle38.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle38.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle38.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle38.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle38.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle38.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_Otpinfo_tb.DefaultCellStyle = dataGridViewCellStyle38;
+            this.dgv_Otpinfo_tb.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_Otpinfo_tb.EnableHeadersVisualStyles = false;
+            this.dgv_Otpinfo_tb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_Otpinfo_tb.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_Otpinfo_tb.Location = new System.Drawing.Point(0, 0);
+            this.dgv_Otpinfo_tb.Name = "dgv_Otpinfo_tb";
+            dataGridViewCellStyle39.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle39.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle39.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle39.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle39.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle39.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_Otpinfo_tb.RowHeadersDefaultCellStyle = dataGridViewCellStyle39;
+            dataGridViewCellStyle40.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle40.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle40.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle40.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle40.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_Otpinfo_tb.RowsDefaultCellStyle = dataGridViewCellStyle40;
+            this.dgv_Otpinfo_tb.RowTemplate.Height = 23;
+            this.dgv_Otpinfo_tb.SelectedIndex = -1;
+            this.dgv_Otpinfo_tb.Size = new System.Drawing.Size(200, 0);
+            this.dgv_Otpinfo_tb.TabIndex = 1;
+            this.dgv_Otpinfo_tb.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tp_DiseList
+            // 
+            this.tp_DiseList.Controls.Add(this.dgv_DiseList_tb);
+            this.tp_DiseList.Location = new System.Drawing.Point(0, 40);
+            this.tp_DiseList.Name = "tp_DiseList";
+            this.tp_DiseList.Size = new System.Drawing.Size(200, 0);
+            this.tp_DiseList.TabIndex = 3;
+            this.tp_DiseList.Text = "诊断信息";
+            this.tp_DiseList.UseVisualStyleBackColor = true;
+            // 
+            // dgv_DiseList_tb
+            // 
+            this.dgv_DiseList_tb.AllowUserToAddRows = false;
+            dataGridViewCellStyle41.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_DiseList_tb.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle41;
+            this.dgv_DiseList_tb.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_DiseList_tb.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle42.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle42.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle42.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle42.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle42.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle42.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_DiseList_tb.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle42;
+            this.dgv_DiseList_tb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle43.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle43.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle43.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle43.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle43.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle43.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle43.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_DiseList_tb.DefaultCellStyle = dataGridViewCellStyle43;
+            this.dgv_DiseList_tb.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_DiseList_tb.EnableHeadersVisualStyles = false;
+            this.dgv_DiseList_tb.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_DiseList_tb.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_DiseList_tb.Location = new System.Drawing.Point(0, 0);
+            this.dgv_DiseList_tb.Name = "dgv_DiseList_tb";
+            dataGridViewCellStyle44.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle44.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle44.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle44.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle44.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle44.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle44.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_DiseList_tb.RowHeadersDefaultCellStyle = dataGridViewCellStyle44;
+            dataGridViewCellStyle45.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle45.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle45.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle45.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle45.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_DiseList_tb.RowsDefaultCellStyle = dataGridViewCellStyle45;
+            this.dgv_DiseList_tb.RowTemplate.Height = 23;
+            this.dgv_DiseList_tb.SelectedIndex = -1;
+            this.dgv_DiseList_tb.Size = new System.Drawing.Size(200, 0);
+            this.dgv_DiseList_tb.TabIndex = 1;
+            this.dgv_DiseList_tb.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiGroupBox3
+            // 
+            this.uiGroupBox3.Controls.Add(this.dgv_PresPreChekInfo);
+            this.uiGroupBox3.Dock = System.Windows.Forms.DockStyle.Top;
+            this.uiGroupBox3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiGroupBox3.Location = new System.Drawing.Point(0, 0);
+            this.uiGroupBox3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiGroupBox3.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiGroupBox3.Name = "uiGroupBox3";
+            this.uiGroupBox3.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0);
+            this.uiGroupBox3.Size = new System.Drawing.Size(1434, 268);
+            this.uiGroupBox3.TabIndex = 10;
+            this.uiGroupBox3.Text = "电子处方预核验信息(包含未上传和已上传电子处方)";
+            this.uiGroupBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiGroupBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dgv_PresPreChekInfo
+            // 
+            this.dgv_PresPreChekInfo.AllowUserToAddRows = false;
+            dataGridViewCellStyle46.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresPreChekInfo.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle46;
+            this.dgv_PresPreChekInfo.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgv_PresPreChekInfo.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
+            dataGridViewCellStyle47.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle47.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle47.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle47.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle47.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle47.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle47.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresPreChekInfo.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle47;
+            this.dgv_PresPreChekInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            dataGridViewCellStyle48.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle48.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle48.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle48.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle48.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle48.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle48.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgv_PresPreChekInfo.DefaultCellStyle = dataGridViewCellStyle48;
+            this.dgv_PresPreChekInfo.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgv_PresPreChekInfo.EnableHeadersVisualStyles = false;
+            this.dgv_PresPreChekInfo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dgv_PresPreChekInfo.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
+            this.dgv_PresPreChekInfo.Location = new System.Drawing.Point(0, 32);
+            this.dgv_PresPreChekInfo.Name = "dgv_PresPreChekInfo";
+            dataGridViewCellStyle49.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle49.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle49.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle49.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle49.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle49.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle49.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgv_PresPreChekInfo.RowHeadersDefaultCellStyle = dataGridViewCellStyle49;
+            dataGridViewCellStyle50.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle50.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle50.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle50.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle50.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgv_PresPreChekInfo.RowsDefaultCellStyle = dataGridViewCellStyle50;
+            this.dgv_PresPreChekInfo.RowTemplate.Height = 23;
+            this.dgv_PresPreChekInfo.SelectedIndex = -1;
+            this.dgv_PresPreChekInfo.Size = new System.Drawing.Size(1434, 236);
+            this.dgv_PresPreChekInfo.TabIndex = 0;
+            this.dgv_PresPreChekInfo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiPanel4
+            // 
+            this.uiPanel4.Controls.Add(this.uiLabel7);
+            this.uiPanel4.Controls.Add(this.uiLabel8);
+            this.uiPanel4.Controls.Add(this.dt_ET_PPC);
+            this.uiPanel4.Controls.Add(this.dt_ST_PPC);
+            this.uiPanel4.Controls.Add(this.tb_PresCertNo);
+            this.uiPanel4.Controls.Add(this.tb_QueryPresPreCheck);
+            this.uiPanel4.Controls.Add(this.uiButton6);
+            this.uiPanel4.Controls.Add(this.btn_InsuQuery);
+            this.uiPanel4.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiPanel4.Location = new System.Drawing.Point(0, 616);
+            this.uiPanel4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiPanel4.Name = "uiPanel4";
+            this.uiPanel4.Size = new System.Drawing.Size(1434, 88);
+            this.uiPanel4.TabIndex = 9;
+            this.uiPanel4.Text = null;
+            this.uiPanel4.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
+            this.uiPanel4.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel7
+            // 
+            this.uiLabel7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel7.Location = new System.Drawing.Point(308, 11);
+            this.uiLabel7.Name = "uiLabel7";
+            this.uiLabel7.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel7.TabIndex = 39;
+            this.uiLabel7.Text = "身份证号:";
+            this.uiLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel7.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel8
+            // 
+            this.uiLabel8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.uiLabel8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel8.Location = new System.Drawing.Point(14, 11);
+            this.uiLabel8.Name = "uiLabel8";
+            this.uiLabel8.Size = new System.Drawing.Size(90, 23);
+            this.uiLabel8.TabIndex = 38;
+            this.uiLabel8.Text = "查询时间:";
+            this.uiLabel8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel8.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_ET_PPC
+            // 
+            this.dt_ET_PPC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_ET_PPC.FillColor = System.Drawing.Color.White;
+            this.dt_ET_PPC.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_ET_PPC.Location = new System.Drawing.Point(109, 50);
+            this.dt_ET_PPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_ET_PPC.MaxLength = 19;
+            this.dt_ET_PPC.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_ET_PPC.Name = "dt_ET_PPC";
+            this.dt_ET_PPC.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_ET_PPC.Size = new System.Drawing.Size(183, 29);
+            this.dt_ET_PPC.SymbolDropDown = 61555;
+            this.dt_ET_PPC.SymbolNormal = 61555;
+            this.dt_ET_PPC.TabIndex = 37;
+            this.dt_ET_PPC.Text = "2023-06-15 00:00:00";
+            this.dt_ET_PPC.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_ET_PPC.Value = new System.DateTime(2023, 6, 15, 0, 0, 0, 0);
+            this.dt_ET_PPC.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // dt_ST_PPC
+            // 
+            this.dt_ST_PPC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.dt_ST_PPC.FillColor = System.Drawing.Color.White;
+            this.dt_ST_PPC.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.dt_ST_PPC.Location = new System.Drawing.Point(109, 11);
+            this.dt_ST_PPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.dt_ST_PPC.MaxLength = 19;
+            this.dt_ST_PPC.MinimumSize = new System.Drawing.Size(63, 0);
+            this.dt_ST_PPC.Name = "dt_ST_PPC";
+            this.dt_ST_PPC.Padding = new System.Windows.Forms.Padding(0, 0, 30, 2);
+            this.dt_ST_PPC.Size = new System.Drawing.Size(183, 29);
+            this.dt_ST_PPC.SymbolDropDown = 61555;
+            this.dt_ST_PPC.SymbolNormal = 61555;
+            this.dt_ST_PPC.TabIndex = 36;
+            this.dt_ST_PPC.Text = "2023-06-14 00:00:00";
+            this.dt_ST_PPC.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.dt_ST_PPC.Value = new System.DateTime(2023, 6, 14, 0, 0, 0, 0);
+            this.dt_ST_PPC.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_PresCertNo
+            // 
+            this.tb_PresCertNo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.tb_PresCertNo.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tb_PresCertNo.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tb_PresCertNo.Location = new System.Drawing.Point(307, 50);
+            this.tb_PresCertNo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tb_PresCertNo.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tb_PresCertNo.Name = "tb_PresCertNo";
+            this.tb_PresCertNo.ShowText = false;
+            this.tb_PresCertNo.Size = new System.Drawing.Size(183, 29);
+            this.tb_PresCertNo.TabIndex = 30;
+            this.tb_PresCertNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tb_PresCertNo.Watermark = "请输入身份证号";
+            this.tb_PresCertNo.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // tb_QueryPresPreCheck
+            // 
+            this.tb_QueryPresPreCheck.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left)));
+            this.tb_QueryPresPreCheck.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.tb_QueryPresPreCheck.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tb_QueryPresPreCheck.Location = new System.Drawing.Point(505, 13);
+            this.tb_QueryPresPreCheck.MinimumSize = new System.Drawing.Size(1, 1);
+            this.tb_QueryPresPreCheck.Name = "tb_QueryPresPreCheck";
+            this.tb_QueryPresPreCheck.Size = new System.Drawing.Size(144, 66);
+            this.tb_QueryPresPreCheck.TabIndex = 29;
+            this.tb_QueryPresPreCheck.Text = "1.预核验记录查询";
+            this.tb_QueryPresPreCheck.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tb_QueryPresPreCheck.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.tb_QueryPresPreCheck.Click += new System.EventHandler(this.tb_QueryPresPreCheck_Click);
+            // 
+            // uiButton6
+            // 
+            this.uiButton6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.uiButton6.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.uiButton6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton6.Location = new System.Drawing.Point(1322, 11);
+            this.uiButton6.MinimumSize = new System.Drawing.Size(1, 1);
+            this.uiButton6.Name = "uiButton6";
+            this.uiButton6.Size = new System.Drawing.Size(106, 66);
+            this.uiButton6.TabIndex = 1;
+            this.uiButton6.Text = "退    出";
+            this.uiButton6.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiButton6.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.uiButton6.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // btn_InsuQuery
+            // 
+            this.btn_InsuQuery.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.btn_InsuQuery.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.btn_InsuQuery.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btn_InsuQuery.Location = new System.Drawing.Point(1038, 11);
+            this.btn_InsuQuery.MinimumSize = new System.Drawing.Size(1, 1);
+            this.btn_InsuQuery.Name = "btn_InsuQuery";
+            this.btn_InsuQuery.Size = new System.Drawing.Size(281, 66);
+            this.btn_InsuQuery.TabIndex = 0;
+            this.btn_InsuQuery.Text = "2.选中预核验信息查电子处方详细信息";
+            this.btn_InsuQuery.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btn_InsuQuery.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            this.btn_InsuQuery.Click += new System.EventHandler(this.btn_InsuQuery_Click);
+            // 
+            // PrescriptionCirculation
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1434, 744);
+            this.Controls.Add(this.tc_Main);
+            this.Name = "PrescriptionCirculation";
+            this.Text = "医保处方流转";
+            this.Load += new System.EventHandler(this.PrescriptionCirculation_Load);
+            this.Shown += new System.EventHandler(this.PrescriptionCirculation_Shown);
+            this.tc_Main.ResumeLayout(false);
+            this.tb_PresUpload.ResumeLayout(false);
+            this.gb_HISInsuReg.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_HISRegInfo)).EndInit();
+            this.gb_Prescription.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PrescriptionInfo)).EndInit();
+            this.uiPanel1.ResumeLayout(false);
+            this.tb_CancelPres.ResumeLayout(false);
+            this.uiPanel2.ResumeLayout(false);
+            this.uiPanel2.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Master)).EndInit();
+            this.tb_PresToExaInfo.ResumeLayout(false);
+            this.uiGroupBox2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresAuditResults)).EndInit();
+            this.uiGroupBox1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresUploadInfo)).EndInit();
+            this.uiPanel3.ResumeLayout(false);
+            this.tb_PresInfo.ResumeLayout(false);
+            this.uiGroupBox4.ResumeLayout(false);
+            this.uiTabControl2.ResumeLayout(false);
+            this.tp_PresMain.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Main_tb)).EndInit();
+            this.tp_DetlList.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_DetlList_tb)).EndInit();
+            this.tp_Otpinfo.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_Otpinfo_tb)).EndInit();
+            this.tp_DiseList.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_DiseList_tb)).EndInit();
+            this.uiGroupBox3.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgv_PresPreChekInfo)).EndInit();
+            this.uiPanel4.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private Sunny.UI.UITabControl tc_Main;
+        private System.Windows.Forms.TabPage tb_PresUpload;
+        private Sunny.UI.UIPanel uiPanel1;
+        private Sunny.UI.UIButton btnClose;
+        private Sunny.UI.UIButton btnPresUpload;
+        private System.Windows.Forms.TabPage tb_CancelPres;
+        private System.Windows.Forms.TabPage tb_PresInfo;
+        private System.Windows.Forms.TabPage tb_PresToExaInfo;
+        private Sunny.UI.UIButton btnUpload_Pre;
+        private Sunny.UI.UIButton btnGetInfo;
+        private Sunny.UI.UIGroupBox gb_Prescription;
+        private Sunny.UI.UITextBox tb_CertNo;
+        private Sunny.UI.UILabel uiLabel2;
+        private Sunny.UI.UILabel uiLabel1;
+        private Sunny.UI.UIDatetimePicker dtED;
+        private Sunny.UI.UIDatetimePicker dtST;
+        private Sunny.UI.UIDataGridView dgv_PrescriptionInfo;
+        private Sunny.UI.UIGroupBox gb_HISInsuReg;
+        private Sunny.UI.UIDataGridView dgv_HISRegInfo;
+        private Sunny.UI.UIPanel uiPanel2;
+        private Sunny.UI.UILabel uiLabel3;
+        private Sunny.UI.UILabel uiLabel4;
+        private Sunny.UI.UIDatetimePicker dt_Et;
+        private Sunny.UI.UIDatetimePicker dt_St;
+        private Sunny.UI.UITextBox tb_CertnoQuery;
+        private Sunny.UI.UIButton btnQuery;
+        private Sunny.UI.UIButton uiButton3;
+        private Sunny.UI.UIButton btnCancel;
+        private Sunny.UI.UIDataGridView dgv_Master;
+        private Sunny.UI.UIButton btnElcSign;
+        private Sunny.UI.UIRadioButtonGroup rg_type;
+        private Sunny.UI.UIRichTextBox rtb_CancelReason;
+        public PTControl.DBLookupCombox cbx_DocInfo;
+        private System.Windows.Forms.Label label4;
+        private Sunny.UI.UIPanel uiPanel3;
+        private Sunny.UI.UILabel uiLabel5;
+        private Sunny.UI.UILabel uiLabel6;
+        private Sunny.UI.UIDatetimePicker dt_ET_Process;
+        private Sunny.UI.UIDatetimePicker dt_ST_Process;
+        private Sunny.UI.UITextBox uiTextBox1;
+        private Sunny.UI.UIButton btn_QueryUploadInfo;
+        private Sunny.UI.UIButton uiButton4;
+        private Sunny.UI.UIButton uiButton5;
+        private Sunny.UI.UIGroupBox uiGroupBox2;
+        private Sunny.UI.UIDataGridView dgv_PresAuditResults;
+        private Sunny.UI.UIGroupBox uiGroupBox1;
+        private Sunny.UI.UIDataGridView dgv_PresUploadInfo;
+        private Sunny.UI.UIGroupBox uiGroupBox4;
+        private Sunny.UI.UITabControl uiTabControl2;
+        private System.Windows.Forms.TabPage tp_PresMain;
+        private Sunny.UI.UIDataGridView dgv_Main_tb;
+        private System.Windows.Forms.TabPage tp_DetlList;
+        private Sunny.UI.UIDataGridView dgv_DetlList_tb;
+        private System.Windows.Forms.TabPage tp_Otpinfo;
+        private Sunny.UI.UIDataGridView dgv_Otpinfo_tb;
+        private System.Windows.Forms.TabPage tp_DiseList;
+        private Sunny.UI.UIDataGridView dgv_DiseList_tb;
+        private Sunny.UI.UIGroupBox uiGroupBox3;
+        private Sunny.UI.UIDataGridView dgv_PresPreChekInfo;
+        private Sunny.UI.UIPanel uiPanel4;
+        private Sunny.UI.UILabel uiLabel7;
+        private Sunny.UI.UILabel uiLabel8;
+        private Sunny.UI.UIDatetimePicker dt_ET_PPC;
+        private Sunny.UI.UIDatetimePicker dt_ST_PPC;
+        private Sunny.UI.UITextBox tb_PresCertNo;
+        private Sunny.UI.UIButton tb_QueryPresPreCheck;
+        private Sunny.UI.UIButton uiButton6;
+        private Sunny.UI.UIButton btn_InsuQuery;
+    }
+}

+ 1674 - 0
Forms/PrescriptionCirculation.cs

@@ -0,0 +1,1674 @@
+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.FormSetter;
+using PTMedicalInsurance.Business;
+using PTMedicalInsurance.Variables;
+using System.IO;
+using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
+using GMCrypto.Lib;
+
+namespace PTMedicalInsurance.Forms
+{
+    public partial class PrescriptionCirculation : Form
+    {
+        //设置业务实例
+        CenterBusiness cBus = new CenterBusiness();
+        HisMainBusiness hBus = new HisMainBusiness();
+        HisIrisServices hIS = new HisIrisServices();
+        MIIrisServices mIS = new MIIrisServices();
+        InvokeHelper invoker = new InvokeHelper();
+        //InsuServices iris = new InsuServices();
+        public string patInfo = "", ReadCardOutParam = "", CertNo = "";
+        public string presAdmLoc = "", presAdmDoc = "", presAdmID = "", presNo = "", hiRxno = "";
+        public string DrCode = "", DrName = "", DrInsuCode = "", DrCertNo = "";
+        public string HospRxno = "";
+
+        //1.声明自适应类实例
+        AutoResizeForm asc = new AutoResizeForm();
+
+        //public PrescriptionCirculation()
+        //{
+        //    InitializeComponent();
+
+        //    asc.controllInitializeSize(this);
+        //    asc.controlAutoSize(this);
+
+        //    GridViewSetter grdSetter = new GridViewSetter();
+            
+        //    grdSetter.SetHeaderTextOfHISRegister(dgv_HISRegInfo);
+        //    grdSetter.SetHeaderTextOfHISPrescFee(dgv_PrescriptionInfo);   
+        //    grdSetter.DatagridviewColumnWidthAdaptation(dgv_HISRegInfo);
+        //    grdSetter.DatagridviewColumnWidthAdaptation(dgv_PrescriptionInfo);
+
+        //    dtST.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
+        //    dtED.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+
+        //    if (CertNo != "")
+        //    {
+        //        //查询HIS就诊信息
+        //        string outParam = "";
+        //        DataTable dt = null;
+        //        if (GetHISRegInfo("2023-06-14 00:00:00", "2023-06-14 23:59:59", "620202197310200245", ref outParam, ref dt) != 0)
+        //        {
+        //            MessageBox.Show(outParam);
+        //            return;
+        //        }
+        //        dgv_HISRegInfo.DataSource = dt;
+
+
+        //        //查询处方明细信息
+        //        if (dt.Rows.Count == 0)
+        //            return;
+        //        if (dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["ID"].Value.ToString() == "")
+        //            return;
+
+        //        DataTable dt2 = null;
+        //        presAdmDoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["doc"].Value.ToString();
+        //        presAdmLoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["loc"].Value.ToString();
+        //        presNo = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["prescNo"].Value.ToString();
+        //        presAdmID = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["admID"].Value.ToString();
+        //        Global.pat.adm_Dr = int.Parse(presAdmID);
+
+        //        if (presNo == "") return;
+
+        //        //获取HIS处方明细信息
+        //        if (GetHISPrescFeeInfo(presNo, ref outParam, ref dt2) != 0)
+        //        {
+        //            MessageBox.Show(outParam);
+        //            return;
+        //        }
+
+        //        dgv_PrescriptionInfo.DataSource = dt2;
+        //    }   
+        //}
+
+        public PrescriptionCirculation(string PatInfo)
+        {
+            InitializeComponent();
+
+            asc.controllInitializeSize(this);
+            asc.controlAutoSize(this);
+
+            GridViewSetter grdSetter = new GridViewSetter();
+
+            grdSetter.SetHeaderTextOfHISRegister(dgv_HISRegInfo);
+            grdSetter.SetHeaderTextOfHISPrescFee(dgv_PrescriptionInfo);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_HISRegInfo);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_PrescriptionInfo);
+
+            dtST.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
+            dtED.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+
+            if (PatInfo != "")
+            {
+                //查询HIS就诊信息
+                string outParam = "";
+                DataTable dt = null;
+                if (GetHISRegInfo(dtST.Text, dtED.Text, PatInfo, ref outParam, ref dt) != 0)
+                {
+                    MessageBox.Show(outParam);
+                    return;
+                }
+                dgv_HISRegInfo.DataSource = dt;
+                tb_CertNo.Text = PatInfo;
+
+                //查询处方明细信息
+                if (dt.Rows.Count == 0)
+                    return;
+                if (dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["ID"].Value.ToString() == "")
+                    return;
+
+                DataTable dt2 = null;
+                presAdmDoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["doc"].Value.ToString();
+                presAdmLoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["loc"].Value.ToString();
+                presNo = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["prescNo"].Value.ToString();
+                presAdmID = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["admID"].Value.ToString();
+                Global.pat.adm_Dr = int.Parse(presAdmID);
+
+                if (presNo == "") return;
+
+                //获取HIS处方明细信息
+                if (GetHISPrescFeeInfo(presNo, ref outParam, ref dt2) != 0)
+                {
+                    MessageBox.Show(outParam);
+                    return;
+                }
+
+                dgv_PrescriptionInfo.DataSource = dt2;
+            }
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
+
+        private void PrescriptionCirculation_Load(object sender, EventArgs e)
+        {
+            this.Height = 800;
+            this.Width = 1500;
+
+            this.WindowState = FormWindowState.Maximized;
+
+            asc.controllInitializeSize(this);
+            asc.controlAutoSize(this);            
+        }
+
+        private void SetDBLKCombox(ref PTControl.DBLookupCombox dblcbx, DataTable dtUserInfo)
+        {
+            dblcbx.sDisplayField = "Code,descripts,insuUserCode,credNo";
+            dblcbx.sDisplayMember = "姓名";
+            dblcbx.sKeyWords = "Code,descripts";
+            dblcbx.DataSource = dtUserInfo;
+            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[3].Name = "证件号码";
+            dblcbx.DataGridView.Columns[0].Width = 55;
+            dblcbx.DataGridView.Columns[1].Width = 55;
+            dblcbx.DataGridView.Columns[2].Width = 115;
+            dblcbx.DataGridView.Columns[3].Width = 200;
+        }
+
+        private void dgv_HISRegInfo_CellClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (dgv_HISRegInfo.DataSource == null)            
+                return;
+
+            if (dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["ID"].Value.ToString() == "")
+                return;
+
+            string outParam = "";
+            DataTable dt = null;
+            presAdmDoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["doc"].Value.ToString();
+            presAdmLoc = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["loc"].Value.ToString();
+            presNo = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["prescNo"].Value.ToString();
+            presAdmID = dgv_HISRegInfo.Rows[dgv_HISRegInfo.CurrentRow.Index].Cells["admID"].Value.ToString();
+            Global.pat.adm_Dr = int.Parse(presAdmID);
+
+            if (presNo == "") return;
+
+            //获取HIS处方明细信息
+            if (GetHISPrescFeeInfo(presNo, ref outParam, ref dt) != 0)
+            {
+                MessageBox.Show(outParam);
+                return;
+            }
+
+            dgv_PrescriptionInfo.DataSource = dt;
+        }
+
+        private void btnUpload_Pre_Click(object sender, EventArgs e)
+        {
+            string OutMsg = "", InsuOutMsg = "", outParam = "";
+            if (((DataTable)dgv_HISRegInfo.DataSource == null) || ((DataTable)dgv_PrescriptionInfo.DataSource == null))
+            {
+                MessageBox.Show("请先查询该患者就诊处方信息!");
+                return;
+            }
+
+            if (presNo == "")
+            {
+                MessageBox.Show("请选择处方就诊记录!");
+                return;
+            }
+
+            //Global.pat.adm_Dr = int.Parse(presAdmID);
+            //获取最近医保挂号信息(电子处方流转只能取通过电子凭证挂号登记的记录)
+            //if (GetInsuRegIDFromHIS(presAdmID,AdmDoc,AdmLoc,out Global.pat.mdtrtID, out OutMsg) != 0)
+            //{
+            //    MessageBox.Show("【医保电子处方流程业务】获取医保就诊ID失败!");
+            //    return;
+            //}
+
+            #region【获取电子处方上传预核验业务入参】
+            if (GetPreVerificationInput(presAdmID, presNo, ref outParam) != 0)
+            {
+                MessageBox.Show("【医保电子处方流转业务】获取电子处方上传预核验业务入参失败:" + outParam);
+                return;
+            }
+
+            string pharCode = JObject.Parse(outParam)["mdtrtinfo"]["pharCode"].ToString();
+            if (pharCode == "")
+            {
+                MessageBox.Show("【医保电子处方流转业务】获取电子处方上传预核验成功,但返回审方医保药师代码信息为空!");
+                return;
+            }
+            #endregion
+
+            #region【2201医保挂号-2203医保就诊信息上传-获取医保就诊ID】               
+            if (GetPresCirInsuRegID(out Global.pat.mdtrtID, out OutMsg) != 0)
+            {
+                MessageBox.Show("【医保电子处方流转业务】医保挂号失败:" + OutMsg);
+                return;
+            }
+            #endregion
+
+            #region【7101】电子处方上传预核验             
+            JObject joInput = JObject.Parse(outParam);
+            joInput["mdtrtinfo"]["mdtrtId"] = Global.pat.mdtrtID;  //取最新的2201医保挂号返回就诊ID
+            joInput["mdtrtinfo"]["psnNo"] = Global.pat.psn_no;
+            joInput["mdtrtinfo"]["medType"] = Global.pat.medType;
+            joInput["insuPlcNo"] = Global.pat.insuplc_admdvs;          
+
+            JObject joRtn = invoker.invokeCenterServicePresCir("7101", JsonHelper.setCenterInparPresCirNew(joInput));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn, out InsuOutMsg) != 0)
+            {
+                //电子处方上传预核验失败,调用2202撤销医保挂号
+                if (CancelInsuReg(Global.pat.psn_no, Global.pat.mdtrtID, presAdmID, out string OutMsg2) != 0)
+                {
+                    MessageBox.Show("【7101】电子处方上传预核验失败:" + InsuOutMsg + "\r\n" + ",撤销医保挂号失败:" + OutMsg2);
+                    return;
+                }
+                else
+                {
+                    //中心撤销成功后调用撤销医保平台登记表信息                    
+                    if (mIS.cancleRegister(6, out OutMsg) != 0) //取消医保平台登记
+                    {
+                        MessageBox.Show("【7101】电子处方上传预核验失败,撤销医保挂号成功,但云医保平台取消失败:" + OutMsg);
+                        return;
+                    }
+                    else
+                    {                        
+                        if (hIS.cancleRegister(out outParam) != 0) //取消HIS 门诊登记
+                        {
+                            MessageBox.Show("【7101】电子处方上传预核验失败,云医保平台取消登记成功,但HIS取消失败," + outParam + InsuOutMsg);
+                            return;
+                        }
+                        else
+                        {
+                            MessageBox.Show("【7101】电子处方上传预核验失败,撤销医保挂号成功 :" + InsuOutMsg);
+                            return;
+                        }
+                    }
+                }
+            }
+            else
+            {
+                /*使用应用公钥(publicKey示例默认值)对本地自签名的数据进行验签示例*/
+                JValue encDataObj = (JValue)joRtn.GetValue("encData");
+                string encData = encDataObj.ToString();
+                //解密
+                string decDatas = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.secretKey);
+                JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+                //验签
+                //Boolean isVerifys = SMUtil.verify(signDto, Global.inf.Secret, Global.inf.publicKey, signData);
+                //MessageBox.Show("验签:" + isVerifys);
+
+                //医保电子处方上传预核验成功后写入后台记录
+                if (insertPresCirPreResult(joInput, joRtnEncDataObj, out OutMsg) != 0)
+                {
+                    MessageBox.Show("【7101】电子处方上传预核验成功,调用IRIS服务插入记录失败:" + OutMsg);
+                    return;
+                }
+
+                MessageBox.Show("电子处方上传预核验成功!");
+            }
+            #endregion
+        }
+
+        private void btnElcSign_Click(object sender, EventArgs e)
+        {
+            if ((DataTable)dgv_HISRegInfo.DataSource == null)
+            {
+                MessageBox.Show("请先查询该患者就诊处方信息!");
+                return;
+            }
+
+            if (presNo == "")
+            {
+                MessageBox.Show("请选择处方记录!");
+                return;
+            }
+
+            #region【组织originalValue原始待签名处方信息】
+
+            //1.获取处方预核验表信息
+            if (mIS.GetPresCirPreCheckInfo(presNo, out string OutMsg) != 0)
+            {
+                MessageBox.Show("查询电子处方上传预核验信息失败:" + OutMsg);
+                return;
+            }
+
+            //2.组织电子处方电子签名调用入参
+            JObject joPreCheckParam = MontageElcSignParam(OutMsg);
+            string originalValue = Base64Encrypt(joPreCheckParam.ToString());
+            string originalRxFile;
+
+            //MessageBox.Show("originalValue加密值base64:" + originalValue);
+            //MessageBox.Show("originalValue解密值:" + Base64Decrypt(originalValue));
+
+            //3.获取参数originalRxFile原始待签名处方文件base64的字符值
+            if (hIS.GetPrescPDFBase64Str("处方笺", presNo, Global.inf.hisHospitalDr.ToString(), out OutMsg) != 0)
+            {
+                MessageBox.Show("【7102】电子处方医保电子签名GetPrescPDFBase64Str失败, :" + OutMsg);
+                return;
+            }
+            else
+            {
+                JObject joRxFile = JObject.Parse(JsonHelper.getDestValue(JObject.Parse(OutMsg), "result"));
+                originalRxFile = JsonHelper.getDestValue(joRxFile, "base64Str");
+                if (originalRxFile == "")
+                {
+                    MessageBox.Show("【7102】电子处方医保电子签名失败,电子处方PDF生成Base64Str失败 :" + OutMsg);
+                    return;
+                }
+            }
+
+            //4.调用电子处方医保电子签名
+            JObject joInParam = new JObject();
+            joInParam.Add("fixmedinsCode", Global.inf.hospitalNO);
+            joInParam.Add("originalValue", originalValue);
+            joInParam.Add("originalRxFile", originalRxFile);
+            joInParam.Add("extras", "1");            
+            JObject joRtn = invoker.invokeCenterServicePresCir("7102", JsonHelper.setCenterInparPresCirNew(joInParam));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn, out OutMsg) != 0)
+            {
+                MessageBox.Show("【7102】电子处方医保电子签名失败 :" + OutMsg);
+                return;
+            }
+
+            //5.解密返回值
+            JValue encDataObj = (JValue)joRtn.GetValue("encData");
+            string encData = encDataObj.ToString();
+            string decDatas = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.secretKey);
+            JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+            //6.医保电子处方电子签名成功后调用IRIS服务写入后台记录
+            if (insertPresCirSignResult(joPreCheckParam, originalValue, originalRxFile, joRtnEncDataObj, out OutMsg) != 0)
+            {
+                MessageBox.Show("【7102】电子处方医保电子签名成功,调用IRIS服务插入记录失败:" + OutMsg);
+                return;
+            }
+
+            MessageBox.Show("电子处方医保电子签名成功!");
+
+            #endregion
+        }
+
+        private void btnPresUpload_Click(object sender, EventArgs e)
+        {
+            if ((DataTable)dgv_HISRegInfo.DataSource == null)
+            {
+                MessageBox.Show("请先查询该患者就诊处方信息!");
+                return;
+            }
+
+            if (presNo == "")
+            {
+                MessageBox.Show("请选择处方记录!");
+                return;
+            }            
+
+            string OutMsg1, OutMsg2, OutMsg;
+
+            //1.查询电子处方预核验信息
+            if (mIS.GetPresCirPreCheckInfo(presNo, out OutMsg1) != 0)
+            {
+                MessageBox.Show("查询电子处方上传预核验信息失败:" + OutMsg1);
+                return;
+            }
+           
+            //2.查询电子处方电子签名信息
+            if (mIS.GetPresCirElectronicSignatureInfo(presNo, out OutMsg2) != 0)
+            {
+                MessageBox.Show("查询电子处方电子签名信息失败,请重新执行一次电子签名操作:" + OutMsg2);
+                return;
+            }
+
+            //3.组织电子处方上传接口入参
+            JObject joPreCheckInfo = JObject.Parse(OutMsg1);  //预核验信息
+            JObject joElectronicSignatureInfo = JObject.Parse(OutMsg2);  //电子签名信息
+            JObject joInput = MontagePresCiruUploadParam(joPreCheckInfo, joElectronicSignatureInfo);
+
+            //4.调用7103电子处方上传接口
+            JObject joRtn = invoker.invokeCenterServicePresCir("7103", JsonHelper.setCenterInparPresCirNew(joInput));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn, out OutMsg) != 0)
+            {
+                MessageBox.Show("【7103】电子处方上传失败 :" + OutMsg);
+                return;
+            }
+
+            //5.解密返回值
+            JValue encDataObj = (JValue)joRtn.GetValue("encData");
+            string encData = encDataObj.ToString();
+            string decDatas = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.secretKey);
+            JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+            //6.电子处方上传7103接口调用成功后插入后台
+            if (insertPresCirUploadRecord(joInput, joRtnEncDataObj, out OutMsg) != 0)
+            {
+                MessageBox.Show("【7101】电子处方上传预核验成功,调用IRIS服务插入记录失败:" + OutMsg);
+                return;
+            }
+
+            //7.电子处方上传成功后更新HIS处方状态
+            if (hIS.updateHISPrecNoStatus(presNo, hiRxno, "B", out OutMsg) != 0)
+            {
+                MessageBox.Show("【7101】电子处方上传预核验成功,调用IRIS服务插入记录成功,更新HIS处方状态失败:" + OutMsg);
+                return;
+            }
+
+            MessageBox.Show("【7103】电子处方上传成功!");
+        }              
+
+        private void btnQuery_Click(object sender, EventArgs e)
+        {
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruUploadRecord ";
+            sqlStr = sqlStr + "WHERE Hospital_Dr=" + Global.inf.hospitalDr; //Upload=Y And 
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;
+            sqlStr = sqlStr + " and OccurTime>'" + dt_St.Text + "'";
+            sqlStr = sqlStr + " and OccurTime<'" + dt_Et.Text + "'";
+            if (tb_CertnoQuery.Text != "")
+            {
+                sqlStr = sqlStr + " and Certno='" + tb_CertnoQuery.Text + "'";
+            }
+
+            switch (rg_type.SelectedIndex)
+            {
+                case 1:
+                    {
+                        sqlStr = sqlStr + " and Upload='Y'";
+                        break;
+                    }
+                case 2:
+                    {
+                        sqlStr = sqlStr + " and Upload='N'";
+                        break;
+                    }
+            }
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010100");
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方上传信息");
+
+            DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            dgv_Master.DataSource = dt;
+
+            if (dt.Rows.Count <= 0)
+                dgv_Master.DataSource = null;
+
+        }
+
+        private void cbx_DocInfo_AfterSelector(object sender, PTControl.AfterSelectorEventArgs e)
+        {
+            DataGridViewRow row = e.Value as DataGridViewRow;
+            DataRowView dataRow = row.DataBoundItem as DataRowView;
+
+            DrCode = dataRow["Code"].ToString().Trim();      //HIS工号
+            DrName = dataRow["descripts"].ToString().Trim();      //姓名
+            DrInsuCode = dataRow["insuUserCode"].ToString().Trim();  //医保医师代码
+            DrCertNo = dataRow["credNo"].ToString().Trim();    //身份证号
+
+            cbx_DocInfo.Text = DrName;                                                               
+        }
+
+        private void btnCancel_Click(object sender, EventArgs e)
+        {
+            if (dgv_Master.DataSource == null)
+            {
+                MessageBox.Show("请先查询电子处方信息!");
+                return;
+            }
+
+            if ((rtb_CancelReason.Text == "") || (rtb_CancelReason.Text == "请输入撤销原因"))
+            {
+                MessageBox.Show("请输入撤销原因!");
+                return;
+            }
+
+            if (cbx_DocInfo.Text == "")
+            {
+                MessageBox.Show("请选择撤销医师!");
+                return;
+            }
+
+            string OutPut, errMsg;
+            int i = dgv_Master.CurrentRow.Index;
+            DataTable dt = (DataTable)dgv_Master.DataSource;
+            string HiRxno = dt.Rows[i]["HiRxno"].ToString();
+            string FixmedinsCode = dt.Rows[i]["FixmedinsCode"].ToString();
+            string ID = dt.Rows[i]["ID"].ToString();
+            presNo = dt.Rows[i]["HospRxno"].ToString();
+
+            JObject joData = new JObject();
+            joData.Add("hiRxno", HiRxno);                  //医保处方编号
+            joData.Add("fixmedinsCode", FixmedinsCode);    //定点医疗机构编号
+            joData.Add("drCode", DrInsuCode);                //撤销医师的医保医师代码
+            joData.Add("undoDrName", DrName);            //撤销医师姓名
+            joData.Add("undoDrCertType", "01");          //撤销医师证件类型
+            joData.Add("undoDrCertno", DrCertNo);          //撤销医师证件号码
+            joData.Add("undoRea", rtb_CancelReason.Text);               //撤销原因描述
+            joData.Add("undoTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));              //撤销时间
+
+            JObject joRtn7104 = invoker.invokeCenterServicePresCir("7104", JsonHelper.setCenterInparPresCirNew(joData));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn7104, out OutPut) != 0)
+            {
+                MessageBox.Show("【7104】电子处方撤销!" + OutPut);
+                return;
+            }
+            else
+            {
+                //解密
+                JValue encDataObj = (JValue)joRtn7104.GetValue("encData");
+                string encData = encDataObj.ToString();
+                string decDatas = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.secretKey);
+                JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+                //撤销电子处方上传更新IRIS表
+                if (mIS.cancelPresCirUpload(joRtnEncDataObj, ID, HiRxno, FixmedinsCode, rtb_CancelReason.Text, DrInsuCode, DrName, DrCertNo, out string OutMsg) != 0)                
+                {
+                    MessageBox.Show("【7104】电子处方撤销成功,IRIS服务更新处方上传记录表失败!" + OutMsg);
+                    return;
+                }
+
+                //电子处方上传成功后更新HIS处方状态
+                if (hIS.updateHISPrecNoStatus(presNo, HiRxno, "C", out OutMsg) != 0)
+                {
+                    MessageBox.Show("【7104】电子处方撤销成功,IRIS服务更新处方上传记录表成功,更新HIS处方状态失败:" + OutMsg);
+                    return;
+                }
+
+                MessageBox.Show("【7104】医保电子处方撤销成功!");
+            }
+        }
+
+        private void btnReadCard_Click(object sender, EventArgs e)
+        {
+            if (tb_CertNo.Text == "")
+            {
+                MessageBox.Show("请先输入患者身份证号进行查找患者未结算处方信息!");
+                return;
+            }
+            else
+            {
+                dgv_HISRegInfo.DataSource = null;
+                dgv_PrescriptionInfo.DataSource = null;
+
+                CertNo = tb_CertNo.Text;
+                Global.pat.certNO = tb_CertNo.Text;
+            }
+
+            #region【查询HIS就诊信息-用身份证号查询患者当日的就诊记录】
+            string outParam = "";
+            DataTable dt1 = null;
+            if (GetHISRegInfo(dtST.Text, dtED.Text, Global.pat.certNO, ref outParam,ref dt1) != 0)
+            {
+                MessageBox.Show(outParam);
+                return;
+            }
+
+            dgv_HISRegInfo.DataSource = dt1;
+            #endregion
+
+            #region【调用医保平台获取医保登记信息-根据HIS就诊信息查找医保登记信息 (接诊医生、接诊科室)】
+            /*
+            if (GetInsuRegIDFromHIS(presAdmID, presAdmDoc, presAdmLoc, out Global.pat.mdtrtID, out outParam) != 0)
+            {
+                MessageBox.Show(outParam);
+                return;
+            }
+            */
+            #endregion
+
+            presAdmDoc = dgv_HISRegInfo.Rows[0].Cells["doc"].Value.ToString();
+            presAdmLoc = dgv_HISRegInfo.Rows[0].Cells["loc"].Value.ToString();
+            presNo = dgv_HISRegInfo.Rows[0].Cells["prescNo"].Value.ToString();
+            presAdmID = dgv_HISRegInfo.Rows[0].Cells["admID"].Value.ToString();
+            Global.pat.adm_Dr = int.Parse(presAdmID);
+
+            if (presNo == "") return;
+            DataTable dt2 = null;
+            //获取HIS处方明细信息
+            if (GetHISPrescFeeInfo(presNo, ref outParam, ref dt2) != 0)
+            {
+                MessageBox.Show(outParam);
+                return;
+            }
+
+            dgv_PrescriptionInfo.DataSource = dt2;
+        }
+
+        /// <summary>
+        /// 获取HIS就诊信息
+        /// </summary>
+        /// <param name="dtST"></param>
+        /// <param name="dtED"></param>
+        /// <param name="PatInfo"></param>
+        /// <param name="errMsg"></param>
+        /// <param name="DT"></param>
+        /// <returns></returns>
+        private int GetHISRegInfo(string dtST, string dtED, string PatInfo, ref string errMsg, ref DataTable DT)
+        {
+            dynamic joTmp = new JObject();
+            joTmp.Add("stDate", dtST);
+            joTmp.Add("endDate", dtED);
+            joTmp.Add("patInfo", PatInfo);
+
+            JObject joRtnHISRegInfo = hIS.GetHISRegInfo(joTmp);
+
+            if (JsonHelper.parseIrisRtnValue(joRtnHISRegInfo, out errMsg) != 0)
+            {
+                errMsg = "获取HIS患者就诊信息失败,请联系管理员!" + errMsg;
+                return -1;
+            }
+            else
+            {
+                if ((joRtnHISRegInfo["result"]["rows"].ToString() == "[]"))
+                {
+                    errMsg = "查询HIS就诊信息结果为空!";
+                    return -1;
+                }
+                else
+                {
+                    DT = (DataTable)joRtnHISRegInfo["result"]["rows"].ToObject(typeof(DataTable));
+                    return 0;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 获取HIS费用明细信息
+        /// </summary>
+        /// <param name="PrescNo"></param>
+        /// <param name="errMsg"></param>
+        /// <param name="DT"></param>
+        /// <returns></returns>
+        private int GetHISPrescFeeInfo(string PrescNo, ref string errMsg, ref DataTable DT)
+        {
+            dynamic joTmp = new JObject();
+            joTmp.Add("prescNo", PrescNo);
+
+            JObject joRtnHISPrescFeeInfo = hIS.GetHISPrescFeeInfo(joTmp);
+
+            if (JsonHelper.parseIrisRtnValue(joRtnHISPrescFeeInfo, out errMsg) != 0)
+            {
+                errMsg = "获取HIS患者处方信息失败,请联系管理员!" + errMsg;
+                return -1;
+            }
+            else
+            {
+                if ((joRtnHISPrescFeeInfo["result"]["rows"].ToString() == "[]"))
+                {
+                    errMsg = "查询HIS处方信息结果为空!";
+                    return -1;
+                }
+                else
+                {
+                    DT = (DataTable)joRtnHISPrescFeeInfo["result"]["rows"].ToObject(typeof(DataTable));
+                    return 0;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 获取电子处方预核验入参
+        /// </summary>
+        /// <param name="AdmID"></param>
+        /// <param name="prescNo"></param>
+        /// <param name="outParam"></param>
+        /// <returns></returns>
+        private int GetPreVerificationInput(string AdmID, string prescNo, ref string outParam)
+        {
+            dynamic joTmp = new JObject();
+            joTmp.Add("prescNo", prescNo);
+            joTmp.Add("admID", AdmID);
+
+            JObject joRtnPreVerificationData = hIS.GetPreVerificationData(joTmp);
+            if (JsonHelper.parseIrisRtnValue(joRtnPreVerificationData, out outParam) != 0)
+            {
+                outParam = "获取处方流传预核验数据失败,请联系管理员!" + outParam;
+                return -1;
+            }
+            else
+            {
+                if (joRtnPreVerificationData["dllinput"]["params"].ToString() == "[]")
+                {
+                    outParam = "获取处方流传预核验数据结果为空!";
+                    return -1;
+                }
+                else
+                {
+                    //outParam = joRtnPreVerificationData["dllinput"]["params"].ToString();
+
+                    JObject jo = JObject.Parse(joRtnPreVerificationData["dllinput"].ToString());
+                    JArray ja = (JArray)jo["params"];
+
+                    foreach (var item in ja)
+                    {
+                        outParam = item.ToString();
+                    }
+                }
+
+                return 0;
+            }
+        }
+
+        /// <summary>
+        /// 医保患者参保信息获取
+        /// </summary>
+        /// <param name="OutParam"></param>
+        /// <returns></returns>
+        private int GetPersonInfo(ref string OutParam)
+        {
+            string errMsg;
+            //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
+            if (hBus.readCard(out ReadCardOutParam) != 0)
+            {
+                OutParam = JsonHelper.setExceptionJson(-100, "【医保电子处方流转业务】读卡失败!", ReadCardOutParam).ToString();
+                return -1;
+            }
+            else
+            {
+                //展示患者信息界面
+                if (hBus.showPatInfo(ReadCardOutParam, out patInfo) != 0)
+                {
+                    OutParam = "【医保电子处方流转业务】读卡成功,展示患者信息界面失败:" + patInfo;
+                    return -1;
+                }
+
+                if (hBus.setGlobalPatAfaterShowPatInfo(patInfo, out errMsg) != 0)
+                {
+                    OutParam = JsonHelper.setExceptionJson(-1, "setGlobalPatAfaterShowPatInfo", errMsg).ToString();
+                    return -1;
+                }
+
+                OutParam = patInfo;
+                return 0;
+            }
+        }
+
+        /// <summary>
+        /// 医保电子处方流转前调用医保挂号和就诊信息上传获取最新的医保登记流水号
+        /// </summary>
+        /// <param name="Inparam"></param>
+        /// <param name="MdtrtID"></param>
+        /// <param name="Msg"></param>
+        /// <returns></returns>
+        private int MedInsuRegisterAndVisitUpload(string patInfo, out string MdtrtID, out string Msg)
+        {
+            string errMsg;
+            MdtrtID = "";
+            Msg = "";
+
+            try
+            {
+                if (hBus.setGlobalPatAfaterShowPatInfo(patInfo, out errMsg) != 0)
+                {
+                    Msg = JsonHelper.setExceptionJson(-1, "setGlobalPatAfaterShowPatInfo", errMsg).ToString();
+                    return -1;
+                }
+
+                //显示登记面板
+                string outParam;
+                if (hBus.showOutPatRegisterForm(out outParam) != 0)
+                {
+                    Msg = JsonHelper.setExceptionJson(-1, "显示登记面板", outParam).ToString();
+                    return -1;
+                }
+                JObject joReg = JObject.Parse(outParam);
+
+                //医保挂号
+                JObject jo2201Inpar = JObject.Parse(JsonHelper.getDestProperty(joReg, "data"));
+                JObject jo2201Inpar_plain = JObject.Parse(JsonHelper.getDestProperty(joReg, "data"));
+                jo2201Inpar = JObject.Parse(JsonHelper.setCenterInpar("2201", jo2201Inpar));
+                jo2201Inpar_plain = JObject.Parse(JsonHelper.setCenterInpar_plain("2201", jo2201Inpar_plain));
+                //此处先取到就诊信息上传的入参,只要挂号成功就保存到云HIS后台(保存后台需要用到2203入参)
+                JObject jo2203Inpar = new JObject();
+                JObject jo2203Inpar_plain = new JObject();
+                jo2203Inpar.Add("mdtrtinfo", JObject.Parse(JsonHelper.getDestValue(joReg, "mdtrtinfo")));
+                jo2203Inpar.Add("diseinfo", JArray.Parse(JsonHelper.getDestValue(joReg, "diseinfo")));
+                JObject jo2201Rtn = invoker.invokeCenterService("2201", jo2201Inpar);
+                if (JsonHelper.parseCenterRtnValue(jo2201Rtn, out errMsg) != 0)
+                {
+                    Msg = JsonHelper.setExceptionJson(-1, "医保挂号失败", errMsg).ToString();
+                    return -1;
+                }
+                else
+                {
+                    MdtrtID = JsonHelper.getDestValue(jo2201Rtn, "output.data.mdtrt_id");
+                    Global.pat.mdtrtID = MdtrtID;
+
+                    //插入患者本次就诊用的参保信息
+                    hBus.insertPatCurInsuInfo(patInfo, out outParam);
+
+                    jo2203Inpar["mdtrtinfo"]["mdtrt_id"] = MdtrtID;
+                    jo2203Inpar_plain = JObject.Parse(JsonHelper.setCenterInpar_plain("2203", jo2203Inpar));
+                    jo2203Inpar = JObject.Parse(JsonHelper.setCenterInpar("2203", jo2203Inpar));
+                    //门诊登记信息,插入云医保平台
+                    jo2201Rtn.Add("validflag", 1);
+                    jo2201Rtn.Add("regstate", 1);
+                    jo2201Rtn.Add("type", 6);
+                    Global.writeLog(jo2201Inpar_plain.ToString());
+                    if (mIS.saveOutpatRegisterInfoPresCiru(jo2201Inpar_plain, jo2201Rtn, jo2203Inpar_plain, out errMsg) != 0)
+                    {
+                        Msg = JsonHelper.setExceptionJson(-1, "中心登记成功但医保平台保存失败,请联系管理员!", errMsg).ToString();
+                        return -1;
+                    }
+
+                    //门诊登记信息,插入HIS就诊信息表
+                    if (hIS.returnRegisterInfo(jo2203Inpar_plain, null, out outParam) != 0)
+                    {
+                        Msg = JsonHelper.setExceptionJson(-1, "HIS平台保存登记信息", outParam).ToString();
+                        return -1;
+                    }
+
+                    //门诊就诊信息上传                            
+                    JObject jo2203Rtn = invoker.invokeCenterService("2203", jo2203Inpar);
+                    if (JsonHelper.parseCenterRtnValue(jo2203Rtn, out errMsg) != 0)
+                    {
+                        Msg = JsonHelper.setExceptionJson(-1, "门诊就诊信息上传", errMsg).ToString();
+                        return -1;
+                    }
+
+                    return 0;
+                }
+            }
+            catch (Exception e)
+            {
+                Msg = JsonHelper.setExceptionJson(-1, "医保门诊挂号和就诊信息上传异常", e.Message).ToString();
+                return -1;
+            }
+
+        }
+
+        /// <summary>
+        /// 组织电子处方电子签名入参
+        /// </summary>
+        /// <param name="sInput"></param>
+        /// <returns></returns>
+        private JObject MontageElcSignParam(string sInput)
+        {
+            JObject joPreCheckInfo = JObject.Parse(sInput);
+            JObject joInput = new JObject();
+            joInput.Add("rxTraceCode", JsonHelper.getDestValue(joPreCheckInfo, "RxTraceCode"));
+            joInput.Add("hiRxno", JsonHelper.getDestValue(joPreCheckInfo, "HiRxno"));
+            //joInput.Add("hospRxno", JsonHelper.getDestValue(joPreCheckInfo, "HospRxno"));
+            joInput.Add("mdtrtId", JsonHelper.getDestValue(joPreCheckInfo, "MdtrtID"));
+            joInput.Add("patnName", JsonHelper.getDestValue(joPreCheckInfo, "PatnName"));
+            joInput.Add("psnCertType", JsonHelper.getDestValue(joPreCheckInfo, "PsnCertType"));
+            joInput.Add("certno", JsonHelper.getDestValue(joPreCheckInfo, "Certno"));
+            joInput.Add("fixmedinsName", Global.inf.hospitalName);
+            joInput.Add("fixmedinsCode", Global.inf.hospitalNO);
+            joInput.Add("drCode", JsonHelper.getDestValue(joPreCheckInfo, "DrCode"));
+            joInput.Add("prscDrName", JsonHelper.getDestValue(joPreCheckInfo, "PrscDrName"));
+            joInput.Add("pharDeptName", JsonHelper.getDestValue(joPreCheckInfo, "PharDeptName"));
+            joInput.Add("pharDeptCode", JsonHelper.getDestValue(joPreCheckInfo, "PharDeptCode"));
+            joInput.Add("pharProfttlCodg", ""); //审方药师职称编码phar_pro_tech_duty JsonHelper.getDestValue(joPreCheckInfo, "DrProfttlCodg")
+            joInput.Add("pharProfttlName", ""); //审方药师职称名称 JsonHelper.getDestValue(joPreCheckInfo, "DrProfttlName")
+            joInput.Add("pharCode", JsonHelper.getDestValue(joPreCheckInfo, "PharCode"));  //审方医保药师代码
+            joInput.Add("pharCertType", "");
+            joInput.Add("pharCertno", "");
+            joInput.Add("pharName", JsonHelper.getDestValue(joPreCheckInfo, "PharName"));
+            joInput.Add("pharPracCertNo", ""); //审方药师执业资格证号
+            joInput.Add("pharChkTime", JsonHelper.getDestValue(joPreCheckInfo, "PharChkTime"));
+
+            Global.writeLog("原始待签名处方信息:" + joInput.ToString());
+            HospRxno = JsonHelper.getDestValue(joPreCheckInfo, "HospRxno");
+
+            Global.pat.mdtrtID = JsonHelper.getDestValue(joPreCheckInfo, "MdtrtID");
+
+            return joInput;
+        }
+
+        /// <summary>
+        /// 组织电子处方上传入参
+        /// </summary>
+        /// <param name="sInput"></param>
+        /// <returns></returns>
+        private JObject MontagePresCiruUploadParam(JObject joPreCheckInfo, JObject joElectronicSignatureInfo)
+        {
+            JObject joInput = new JObject();
+            Global.pat.mdtrtID = JsonHelper.getDestValue(joPreCheckInfo, "MdtrtID");
+            HospRxno = JsonHelper.getDestValue(joPreCheckInfo, "HospRxno");
+            Global.pat.name = JsonHelper.getDestValue(joPreCheckInfo, "PatnName");
+            //joInput.Add("hospRxno", JsonHelper.getDestValue(joPreCheckInfo, "HospRxno"));
+            joInput.Add("rxTraceCode", JsonHelper.getDestValue(joPreCheckInfo, "RxTraceCode"));
+            joInput.Add("hiRxno", JsonHelper.getDestValue(joPreCheckInfo, "HiRxno"));
+            joInput.Add("mdtrtId", JsonHelper.getDestValue(joPreCheckInfo, "MdtrtID"));
+            joInput.Add("patnName", JsonHelper.getDestValue(joPreCheckInfo, "PatnName"));
+            joInput.Add("psnCertType", JsonHelper.getDestValue(joPreCheckInfo, "PsnCertType"));
+            joInput.Add("certno", JsonHelper.getDestValue(joPreCheckInfo, "Certno"));
+            joInput.Add("fixmedinsName", Global.inf.hospitalName);
+            joInput.Add("fixmedinsCode", Global.inf.hospitalNO);
+            joInput.Add("drCode", JsonHelper.getDestValue(joPreCheckInfo, "DrCode"));
+            joInput.Add("prscDrName", JsonHelper.getDestValue(joPreCheckInfo, "PrscDrName"));
+            joInput.Add("pharDeptName", JsonHelper.getDestValue(joPreCheckInfo, "PharDeptName"));
+            joInput.Add("pharDeptCode", JsonHelper.getDestValue(joPreCheckInfo, "PharDeptCode"));
+            joInput.Add("pharProfttlCodg", ""); //审方药师职称编码phar_pro_tech_duty  JsonHelper.getDestValue(joPreCheckInfo, "DrProfttlCodg")
+            joInput.Add("pharProfttlName", ""); //审方药师职称名称 JsonHelper.getDestValue(joPreCheckInfo, "DrProfttlName")
+            joInput.Add("pharCode", JsonHelper.getDestValue(joPreCheckInfo, "PharCode"));  //审方医保药师代码
+            joInput.Add("pharCertType", "");
+            joInput.Add("pharCertno", "");
+            joInput.Add("pharName", JsonHelper.getDestValue(joPreCheckInfo, "PharName"));
+            joInput.Add("pharPracCertNo", ""); //审方药师执业资格证号
+
+            joInput.Add("pharChkTime", JsonHelper.getDestValue(joPreCheckInfo, "PharChkTime"));
+
+            Global.writeLog("电子处方上传前20位:" + joInput.ToString());
+
+            joInput.Add("rxFile", JsonHelper.getDestValue(joElectronicSignatureInfo, "RxFile"));
+            joInput.Add("signDigest", JsonHelper.getDestValue(joElectronicSignatureInfo, "SignDigest"));
+            joInput.Add("extras", JsonHelper.getDestValue(joElectronicSignatureInfo, "Extras"));
+
+            return joInput;
+        }
+
+        /// <summary>
+        /// 医保电子处方上传预核验成功调用IRIS服务插入记录
+        /// </summary>
+        /// <param name="JoRtn"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int insertPresCirPreResult(JObject JoInput, JObject JoRtn, out string OutMsg)
+        {
+            string errMsg = "";
+
+            try
+            {
+                //string hiRxno = JsonHelper.getDestValue(JoRtn, "hiRxno");
+                //string rxTraceCode = JsonHelper.getDestValue(JoRtn, "rxTraceCode");
+
+                JObject joInParam = new JObject();
+
+                joInParam.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joInParam.Add("Interface_Dr", Global.inf.interfaceDr);
+                joInParam.Add("MdtrtID", Global.pat.mdtrtID);
+                joInParam.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joInParam.Add("HospRxno", JsonHelper.getDestValue(JoInput, "hospRxno"));
+                joInParam.Add("MdtrtCertType", JsonHelper.getDestValue(JoInput, "mdtrtCertType"));
+                joInParam.Add("MdtrtCertNo", JsonHelper.getDestValue(JoInput, "mdtrtCertNo"));
+
+                if (JsonHelper.getDestValue(JoInput, "insuPlcNo")=="")
+                    joInParam.Add("InsuPlcNo", Global.pat.insuplc_admdvs);
+                else
+                    joInParam.Add("InsuPlcNo", JsonHelper.getDestValue(JoInput, "insuPlcNo"));
+
+                joInParam.Add("InitRxno", JsonHelper.getDestValue(JoInput, "initRxno"));
+                joInParam.Add("RxTypeCode", JsonHelper.getDestValue(JoInput, "rxTypeCode"));
+                joInParam.Add("PrscTime", JsonHelper.getDestValue(JoInput, "prscTime"));
+                joInParam.Add("RxDrugCnt", JsonHelper.getDestValue(JoInput, "rxDrugCnt"));
+                joInParam.Add("ValiDays", JsonHelper.getDestValue(JoInput, "mdtrtCertType"));
+                joInParam.Add("ValiEndTime", JsonHelper.getDestValue(JoInput, "valiEndTime"));
+                joInParam.Add("MedType", JsonHelper.getDestValue(JoInput, "mdtrtinfo.medType"));
+                joInParam.Add("IptOtpNo", JsonHelper.getDestValue(JoInput, "mdtrtinfo.iptOtpNo"));
+                joInParam.Add("OtpIptFlag", JsonHelper.getDestValue(JoInput, "mdtrtinfo.otpIptFlag"));
+                joInParam.Add("PsnNo", JsonHelper.getDestValue(JoInput, "mdtrtinfo.psnNo"));
+                joInParam.Add("PatnName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.patnName"));
+
+                if (JsonHelper.getDestValue(JoInput, "mdtrtinfo.PsnCertType")=="")
+                    joInParam.Add("PsnCertType", "01");
+                else
+                    joInParam.Add("PsnCertType", JsonHelper.getDestValue(JoInput, "mdtrtinfo.PsnCertType"));
+
+                joInParam.Add("Certno", JsonHelper.getDestValue(JoInput, "mdtrtinfo.certno"));
+                joInParam.Add("PatnAge", JsonHelper.getDestValue(JoInput, "mdtrtinfo.patnAge"));
+                joInParam.Add("Gend", JsonHelper.getDestValue(JoInput, "mdtrtinfo.gend"));
+                joInParam.Add("PrscDeptName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.prscDeptName"));
+                joInParam.Add("PrscDeptCode", JsonHelper.getDestValue(JoInput, "mdtrtinfo.prscDeptCode"));
+                joInParam.Add("DrCode", JsonHelper.getDestValue(JoInput, "mdtrtinfo.drCode"));
+                joInParam.Add("PrscDrName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.prscDrName"));
+                joInParam.Add("DrProfttlCodg", JsonHelper.getDestValue(JoInput, "mdtrtinfo.drProfttlCodg"));
+                joInParam.Add("DrProfttlName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.drProfttlName"));
+
+                joInParam.Add("MdtrtTime", JsonHelper.getDestValue(JoInput, "mdtrtinfo.mdtrtTime"));
+                joInParam.Add("DiseCodg", JsonHelper.getDestValue(JoInput, "mdtrtinfo.diseCodg"));
+                joInParam.Add("DiseName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.diseName"));
+                joInParam.Add("SpDiseFlag", JsonHelper.getDestValue(JoInput, "mdtrtinfo.spDiseFlag"));
+                joInParam.Add("MaindiagCode", JsonHelper.getDestValue(JoInput, "mdtrtinfo.maindiagCode"));
+                joInParam.Add("MaindiagName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.maindiagName"));
+                joInParam.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+
+                joInParam.Add("RxTraceCode", JsonHelper.getDestValue(JoRtn, "rxTraceCode"));
+                joInParam.Add("HiRxno", JsonHelper.getDestValue(JoRtn, "hiRxno"));
+                joInParam.Add("UpdateUserID", Global.user.ID);
+
+                joInParam.Add("PharCode", JsonHelper.getDestValue(JoInput, "mdtrtinfo.pharCode"));
+                joInParam.Add("PharName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.pharName"));
+
+                joInParam.Add("PharChkTime", JsonHelper.getDestValue(JoInput, "mdtrtinfo.pharChkTime"));
+
+                joInParam.Add("PharDeptCode", JsonHelper.getDestValue(JoInput, "mdtrtinfo.pharDeptCode")); 
+                joInParam.Add("PharDeptName", JsonHelper.getDestValue(JoInput, "mdtrtinfo.pharDeptName"));
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010096", joInParam).ToString(), "插入电子处方上传预核验信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    OutMsg = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "插入电子处方上传预核验信息:" + ex.Message;
+                return -1;
+            }           
+        }
+
+        /// <summary>
+        /// 医保电子处方医保电子签名成功调用IRIS服务插入记录
+        /// </summary>
+        /// <param name="JoInput"></param>
+        /// <param name="originalValue"></param>
+        /// <param name="originalRxFile"></param>
+        /// <param name="JoRtn"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int insertPresCirSignResult(JObject JoInput,string originalValue,string originalRxFile, JObject JoRtn, out string OutMsg)
+        {
+            string errMsg = "";
+            try
+            {
+                //string rxFile = JsonHelper.getDestValue(JoRtn, "rxFile");
+                //string signDigest = JsonHelper.getDestValue(JoRtn, "signDigest");
+                //string signCertSn = JsonHelper.getDestValue(JoRtn, "signCertSn");
+                //string signCertDn = JsonHelper.getDestValue(JoRtn, "signCertDn");
+
+                JObject joInParam = new JObject();
+
+                joInParam.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joInParam.Add("Interface_Dr", Global.inf.interfaceDr);
+                joInParam.Add("MdtrtID", Global.pat.mdtrtID);
+                joInParam.Add("Adm_Dr", Global.pat.adm_Dr); 
+
+                joInParam.Add("FixmedinsCode", JsonHelper.getDestValue(JoInput, "fixmedinsCode"));
+                joInParam.Add("HospRxno", HospRxno);
+                joInParam.Add("IptOtpNo", JsonHelper.getDestValue(JoInput, "iptOtpNo"));
+                joInParam.Add("OriginalValue", originalValue);
+                joInParam.Add("OriginalRxFile", originalRxFile);
+                joInParam.Add("Extras", JsonHelper.getDestValue(JoInput, "extras"));
+                joInParam.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+
+                joInParam.Add("RxFile", JsonHelper.getDestValue(JoRtn, "rxFile"));
+                joInParam.Add("SignDigest", JsonHelper.getDestValue(JoRtn, "signDigest"));
+                joInParam.Add("SignCertSn", JsonHelper.getDestValue(JoRtn, "signCertSn"));
+                joInParam.Add("SignCertDn", JsonHelper.getDestValue(JoRtn, "signCertDn"));
+                joInParam.Add("UpdateUserID", Global.user.ID);
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010097", joInParam).ToString(), "插入电子处方医保电子签名信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    OutMsg = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "插入电子处方医保电子签名信息:" + ex.Message;
+                return -1;
+            }
+        }
+
+        private void btn_QueryUploadInfo_Click(object sender, EventArgs e)
+        {
+            dgv_PresUploadInfo.DataSource = null;
+            dgv_PresAuditResults.DataSource = null;
+
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruUploadRecord ";
+            sqlStr = sqlStr + "WHERE Hospital_Dr=" + Global.inf.hospitalDr; //Upload=Y And 
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;
+            sqlStr = sqlStr + " and OccurTime>'" + dt_ST_Process.Text + "'";
+            sqlStr = sqlStr + " and OccurTime<'" + dt_ET_Process.Text + "'";
+            sqlStr = sqlStr + " and Upload= 'Y'";
+            if (tb_CertnoQuery.Text != "")
+            {
+                sqlStr = sqlStr + " and Certno='" + tb_CertnoQuery.Text + "'";
+            }
+
+            switch (rg_type.SelectedIndex)
+            {
+                case 1:
+                    {
+                        sqlStr = sqlStr + " and Upload='Y'";
+                        break;
+                    }
+                case 2:
+                    {
+                        sqlStr = sqlStr + " and Upload='N'";
+                        break;
+                    }
+            }
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010100");
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方上传信息");
+
+            DataTable dt = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+            
+            if (dt.Rows.Count>0)
+                dgv_PresUploadInfo.DataSource = dt;
+        }
+
+        private void uiButton5_Click(object sender, EventArgs e)
+        {
+            if (dgv_PresUploadInfo.DataSource == null)
+            {
+                MessageBox.Show("请先查询电子处方信息!");
+                return;
+            }
+
+            string OutPut, errMsg;
+            int i = dgv_PresUploadInfo.CurrentRow.Index;
+            DataTable dt = (DataTable)dgv_PresUploadInfo.DataSource;
+            string HiRxno = dt.Rows[i]["HiRxno"].ToString();
+            string FixmedinsCode = dt.Rows[i]["FixmedinsCode"].ToString();
+            string ID = dt.Rows[i]["ID"].ToString();
+            string MdtrtId = dt.Rows[i]["MdtrtId"].ToString();
+            string PsnName = dt.Rows[i]["PatnName"].ToString();
+            string PsnCertType = dt.Rows[i]["PsnCertType"].ToString();
+            string Certno = dt.Rows[i]["Certno"].ToString();
+
+            if (PsnCertType == "")
+                PsnCertType = "01";
+
+            JObject joData = new JObject();
+            joData.Add("hiRxno", HiRxno);                  //医保处方编号
+            joData.Add("fixmedinsCode", FixmedinsCode);    //定点医疗机构编号
+            joData.Add("mdtrtId", MdtrtId);                //医保就诊ID
+            joData.Add("psnName", PsnName);            //姓名
+            joData.Add("psnCertType", PsnCertType);          //撤销医师证件类型
+            joData.Add("certno", Certno);          //撤销医师证件号码          
+            JObject joRtn7106 = invoker.invokeCenterServicePresCir("7106", JsonHelper.setCenterInparPresCirNew(joData));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn7106, out OutPut) != 0)
+            {
+                MessageBox.Show("【7106】电子处方审核结果查询失败!" + OutPut);
+                return;
+            }
+            else
+            {
+                //解密
+                JValue encDataObj = (JValue)joRtn7106.GetValue("encData");
+                string encData = encDataObj.ToString();
+                string decDatas = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.secretKey);
+                JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+                JArray jaRtnEncDataObj = new JArray();
+                jaRtnEncDataObj.Add(joRtnEncDataObj);                
+
+                //DataTable dtRtn = (DataTable)joRtnEncDataObj["result"]["data"].ToObject(typeof(DataTable));
+                DataTable dtRtn = (DataTable)jaRtnEncDataObj.ToObject(typeof(DataTable));
+                dgv_PresAuditResults.DataSource = dtRtn;
+
+                if (dgv_PresAuditResults.Rows.Count <= 0)
+                    dgv_PresAuditResults.DataSource = null;
+
+                //撤销电子处方上传更新IRIS表
+                if (mIS.UpdatePresCirUpload(joRtnEncDataObj, ID, out string OutMsg) != 0)
+                {
+                    MessageBox.Show("【7106】电子处方审核结果查询成功,IRIS服务更新处方上传记录表失败!" + OutMsg);
+                    return;
+                }
+
+                MessageBox.Show("【7106】电子处方审核结果查询成功!");
+            }
+        }
+
+        private void tb_QueryPresPreCheck_Click(object sender, EventArgs e)
+        {
+            dgv_PresPreChekInfo.DataSource = null;
+            //1.获取处方预核验表信息
+            string sqlStr = " SELECT * FROM BS_MedInsuPresCiruUploadPreCheck ";
+            sqlStr = sqlStr + " WHERE Hospital_Dr=" + Global.inf.hospitalDr;
+            sqlStr = sqlStr + " and Interface_Dr= " + Global.inf.interfaceDr;            
+            sqlStr = sqlStr + " and OccurTime>'" + dt_ST_PPC.Text + "'";
+            sqlStr = sqlStr + " and OccurTime<'" + dt_ET_PPC.Text + "'";
+
+            if (tb_PresCertNo.Text != "")
+                sqlStr = sqlStr + " and CertNo='" + tb_PresCertNo.Text + "'";
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010101");
+            JObject joPresPreCheckInfo = invoker.invokeInsuService(joSettlQuery.ToString(), "查询电子处方上传预核验信息");
+
+            DataTable dt = (DataTable)joPresPreCheckInfo["result"]["data"].ToObject(typeof(DataTable));
+
+            if (dt.Rows.Count > 0)
+                dgv_PresPreChekInfo.DataSource = dt;
+        }
+
+        private void btn_InsuQuery_Click(object sender, EventArgs e)
+        {
+            dgv_Main_tb.DataSource = null;
+            dgv_DetlList_tb.DataSource = null;
+            dgv_Otpinfo_tb.DataSource = null;
+            dgv_DiseList_tb.DataSource = null;
+
+            if (dgv_PresPreChekInfo.DataSource == null)
+            {
+                MessageBox.Show("请先查询电子处方预核验信息!");
+                return;
+            }        
+
+            string OutPut, errMsg;
+            int i = dgv_PresPreChekInfo.CurrentRow.Index;
+            DataTable dt = (DataTable)dgv_PresPreChekInfo.DataSource;
+            JObject joInput = new JObject();
+            joInput.Add("fixmedinsCode", Global.inf.hospitalNO);       //定点医疗机构编号
+            joInput.Add("hiRxno", dt.Rows[i]["HiRxno"].ToString());    //医保处方号
+            joInput.Add("mdtrtId", dt.Rows[i]["MdtrtId"].ToString());  //医保就诊ID
+            joInput.Add("ecToken", "");                                //电子凭证令牌
+            joInput.Add("psnName", dt.Rows[i]["PatnName"].ToString()); //人员名称
+            joInput.Add("psnCertType", "01");                          //人员证件类型
+            joInput.Add("certno", dt.Rows[i]["Certno"].ToString());    //证件号码
+            JObject joRtn7105 = invoker.invokeCenterServicePresCir("7105", JsonHelper.setCenterInparPresCirNew(joInput));
+            if (JsonHelper.parseCenterRtnValuePresCir(joRtn7105, out OutPut) != 0)            
+            {
+                MessageBox.Show("【7105】电子处方信息查询失败" + OutPut);
+                return;
+            }
+            else
+            {
+                //解密
+                JValue encDataObj = (JValue)joRtn7105.GetValue("encData");
+                string encData = encDataObj.ToString();
+                string decDatas = SMUtil.decrypt(encData, "", "");
+                JObject joRtnEncDataObj = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(decDatas);
+
+                JArray jaOtpinfo = new JArray();
+                jaOtpinfo.Add(JObject.Parse(JsonHelper.getDestValue(joRtnEncDataObj, "rxOtpinfo")));
+                JObject joOtpinfo = new JObject();
+                joOtpinfo.Add("rxOtpinfoList", jaOtpinfo);
+
+                JObject joData = new JObject();
+                joData.Add("fixmedinsCode", JsonHelper.getDestValue(joRtnEncDataObj, "fixmedinsCode"));
+                joData.Add("fixmedinsName", JsonHelper.getDestValue(joRtnEncDataObj, "fixmedinsName"));
+                joData.Add("hiRxno", JsonHelper.getDestValue(joRtnEncDataObj, "hiRxno"));
+                joData.Add("longRxFlag", JsonHelper.getDestValue(joRtnEncDataObj, "longRxFlag"));
+                joData.Add("prscTime", JsonHelper.getDestValue(joRtnEncDataObj, "prscTime"));
+                joData.Add("rxStasCodg", JsonHelper.getDestValue(joRtnEncDataObj, "rxStasCodg"));
+                joData.Add("rxStasName", JsonHelper.getDestValue(joRtnEncDataObj, "rxStasName"));
+                joData.Add("rxTypeCode", JsonHelper.getDestValue(joRtnEncDataObj, "rxTypeCode"));
+                joData.Add("rxTypeName", JsonHelper.getDestValue(joRtnEncDataObj, "rxTypeName"));
+                joData.Add("rxUsedStasCodg", JsonHelper.getDestValue(joRtnEncDataObj, "rxUsedStasCodg"));
+                joData.Add("rxUsedStasName", JsonHelper.getDestValue(joRtnEncDataObj, "rxUsedStasName"));
+                joData.Add("valiDays", JsonHelper.getDestValue(joRtnEncDataObj, "valiDays"));
+                joData.Add("valiEndTime", JsonHelper.getDestValue(joRtnEncDataObj, "valiEndTime"));
+
+                JArray jaDataList = new JArray();
+                jaDataList.Add(joData);
+
+                joRtnEncDataObj.Add("rxDataList", jaDataList);
+
+                DataTable dt1 = (DataTable)joRtnEncDataObj["rxDataList"].ToObject(typeof(DataTable));
+                DataTable dt2 = (DataTable)joRtnEncDataObj["rxDetlList"].ToObject(typeof(DataTable));
+                DataTable dt3 = (DataTable)joOtpinfo["rxOtpinfoList"].ToObject(typeof(DataTable));
+                DataTable dt4 = (DataTable)joRtnEncDataObj["rxDiseList"].ToObject(typeof(DataTable));
+
+                dgv_Main_tb.DataSource = dt1;
+                dgv_DetlList_tb.DataSource = dt2;
+                dgv_Otpinfo_tb.DataSource = dt3;
+                dgv_DiseList_tb.DataSource = dt4;
+
+            }
+        }
+
+        /// <summary>
+        /// 医保电子处方上传成功调用IRIS服务插入记录
+        /// </summary>
+        /// <param name="JoInput"></param>
+        /// <param name="JoRtn"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int insertPresCirUploadRecord(JObject JoInput, JObject JoRtn, out string OutMsg)
+        {
+            string errMsg = "";
+            try
+            {
+                //string rxFile = JsonHelper.getDestValue(JoRtn, "rxFile");
+                //string signDigest = JsonHelper.getDestValue(JoRtn, "signDigest");
+                //string signCertSn = JsonHelper.getDestValue(JoRtn, "signCertSn");
+                //string signCertDn = JsonHelper.getDestValue(JoRtn, "signCertDn");
+
+                JObject joInParam = new JObject();
+
+                joInParam.Add("Hospital_Dr", Global.inf.hospitalDr);
+                joInParam.Add("Interface_Dr", Global.inf.interfaceDr);
+                joInParam.Add("MdtrtID", Global.pat.mdtrtID);
+                joInParam.Add("Adm_Dr", Global.pat.adm_Dr);
+
+                joInParam.Add("HiRxno", JsonHelper.getDestValue(JoRtn, "hiRxno"));
+                hiRxno = JsonHelper.getDestValue(JoRtn, "hiRxno");
+
+                joInParam.Add("PatnName", JsonHelper.getDestValue(JoInput, "patnName"));
+
+                joInParam.Add("RxTraceCode", JsonHelper.getDestValue(JoInput, "rxTraceCode"));
+                joInParam.Add("PsnCertType", JsonHelper.getDestValue(JoInput, "psnCertType"));
+                joInParam.Add("Certno", JsonHelper.getDestValue(JoInput, "certno"));
+                joInParam.Add("FixmedinsName", JsonHelper.getDestValue(JoInput, "fixmedinsName"));
+                joInParam.Add("FixmedinsCode", JsonHelper.getDestValue(JoInput, "fixmedinsCode"));
+                joInParam.Add("DrCode", JsonHelper.getDestValue(JoInput, "drCode"));
+                joInParam.Add("PrscDrName", JsonHelper.getDestValue(JoInput, "prscDrName"));
+                joInParam.Add("PharDeptName", JsonHelper.getDestValue(JoInput, "pharDeptName"));
+                joInParam.Add("PharDeptCode", JsonHelper.getDestValue(JoInput, "pharDeptCode"));
+                joInParam.Add("PharCode", JsonHelper.getDestValue(JoInput, "pharCode"));
+                joInParam.Add("PharName", JsonHelper.getDestValue(JoInput, "pharName"));
+                joInParam.Add("PharChkTime", JsonHelper.getDestValue(JoInput, "pharChkTime"));
+                joInParam.Add("RxFile", JsonHelper.getDestValue(JoInput, "rxFile"));
+                joInParam.Add("SignDigest", JsonHelper.getDestValue(JoInput, "signDigest"));
+                joInParam.Add("Extras", JsonHelper.getDestValue(JoInput, "extras"));
+
+                joInParam.Add("RxStasCodg", JsonHelper.getDestValue(JoRtn, "rxStasCodg"));      
+                joInParam.Add("RxStasName", JsonHelper.getDestValue(JoRtn, "rxStasName"));
+                joInParam.Add("Upload", "Y");
+                joInParam.Add("OccurTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
+                joInParam.Add("UpdateUserID", Global.user.ID);
+
+                joInParam.Add("HospRxno", presNo); //HIS处方编号
+
+                JObject joRtn = invoker.invokeInsuService(JsonHelper.setIrisInpar("09010098", joInParam).ToString(), "插入电子处方上传信息");
+
+                if (JsonHelper.parseIrisRtnValue(joRtn, out errMsg) != 0)
+                {
+                    OutMsg = errMsg;
+                    return -1;
+                }
+                else
+                {
+                    OutMsg = joRtn.ToString();
+                    return 0;
+                }
+            }
+            catch (Exception ex)
+            {
+                OutMsg = "插入电子处方上传信息:" + ex.Message;
+                return -1;
+            }
+        }
+
+        private void PrescriptionCirculation_Shown(object sender, EventArgs e)
+        {
+            GridViewSetter grdSetter = new GridViewSetter();         
+            grdSetter.SetHeaderTextOfHISRegister(dgv_HISRegInfo);
+            grdSetter.SetHeaderTextOfHISPrescFee(dgv_PrescriptionInfo);
+            grdSetter.SetHeaderTextOfPresUploadInfo(dgv_Master);
+            grdSetter.SetHeaderTextOfPresUploadProcessInfo(dgv_PresUploadInfo);
+            grdSetter.SetHeaderTextOfPresPresAuditResults(dgv_PresAuditResults);
+            grdSetter.SetHeaderTextOfPresPresCheckInfo(dgv_PresPreChekInfo);
+
+            grdSetter.SetHeaderTextOfPresDataInfo(dgv_Main_tb);
+            grdSetter.SetHeaderTextOfPresDetlListInfo(dgv_DetlList_tb);
+            grdSetter.SetHeaderTextOfPresOtpinfoInfo(dgv_Otpinfo_tb);
+            grdSetter.SetHeaderTextOfPresDiseListInfo(dgv_DiseList_tb);
+
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_HISRegInfo);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_PrescriptionInfo);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_Master);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_PresUploadInfo);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_PresAuditResults);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_PresPreChekInfo);
+
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_Main_tb);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_DetlList_tb);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_Otpinfo_tb);
+            grdSetter.DatagridviewColumnWidthAdaptation(dgv_DiseList_tb);
+
+            dtST.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
+            dtED.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+            dt_St.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
+            dt_Et.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+            dt_ST_Process.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
+            dt_ET_Process.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+            dt_ST_PPC.Text = DateTime.Now.ToString("yyyy-MM-01 00:00:00");
+            dt_ET_PPC.Text = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
+
+            tb_CertNo.Text = "620202197310200245";
+            rg_type.SelectedIndex = 0;
+
+            //获取医院用户信息
+            JObject joUserInfo = hIS.GetHosUserInfo("");
+            DataTable dt = (DataTable)joUserInfo["result"]["rows"].ToObject(typeof(DataTable));
+            SetDBLKCombox(ref cbx_DocInfo, dt);
+        }
+
+        private void dgv_PrescriptionInfo_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+
+        }
+
+        /// <summary>
+        /// 通过医保电子凭证获取参保信息进行医保挂号和就诊信息上传获取最新医保就诊ID
+        /// </summary>
+        /// <param name="PatInfo"></param>
+        /// <param name="MdtrtIDNew"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int GetPresCirInsuRegID(out string MdtrtIDNew, out string OutMsg)
+        {
+            MdtrtIDNew = "";
+            string PatInfo = "";
+            //Global.pat.bPresCirul = true;
+            if (GetPersonInfo(ref PatInfo) != 0)
+            {
+                OutMsg = "读卡失败:" + PatInfo;
+                return -1;
+            }
+
+            if (MedInsuRegisterAndVisitUpload(PatInfo, out MdtrtIDNew, out OutMsg) != 0)
+            {
+                OutMsg = "医保挂号和医保就诊信息上传失败:" + OutMsg;
+                return -1;
+            }
+
+            return 0;
+        }
+
+        /// <summary>
+        /// 调用2202撤销医保挂号
+        /// </summary>
+        /// <param name="PsnNo"></param>
+        /// <param name="MdtrtID"></param>
+        /// <param name="IptotpNo"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int CancelInsuReg(string PsnNo, string MdtrtID, string IptotpNo, out string OutMsg)
+        {
+            if ((PsnNo == "") || (MdtrtID == "") || (IptotpNo == ""))
+            {
+                OutMsg = "撤销医保挂号PsnNo或MdtrtID或IptotpNo入参不能为空";
+                return -1;
+            }
+            //组织挂号入参
+            JObject joCancleRegInpar = new JObject();            
+            joCancleRegInpar.Add("psn_no", PsnNo);
+            joCancleRegInpar.Add("mdtrt_id", MdtrtID);
+            joCancleRegInpar.Add("ipt_otp_no", IptotpNo);
+
+            JObject joRegInput = new JObject();
+            joRegInput.Add("data", joCancleRegInpar);
+            //取消挂号信息
+            JObject jo2202Rtn = invoker.invokeCenterService("2202", JsonHelper.setCenterInpar("2202", joRegInput.ToString()));
+            if (JsonHelper.parseCenterRtnValue(jo2202Rtn, out OutMsg) != 0)
+            {
+                OutMsg = "取消医保挂号失败:" + OutMsg;
+                return -1;
+            }
+            else
+            {
+                OutMsg = "取消挂号成功";
+            }
+
+            return 0;
+        }
+
+        /// <summary>
+        /// 获取最近一次电子凭证扫码挂号返回的医保就诊ID
+        /// </summary>
+        /// <param name="AdmID"></param>
+        /// <param name="AdmDoc"></param>
+        /// <param name="AdmLoc"></param>
+        /// <param name="MdtrtID"></param>
+        /// <param name="OutMsg"></param>
+        /// <returns></returns>
+        public int GetInsuRegIDFromHIS(string AdmID,string AdmDoc,string AdmLoc,out string MdtrtID,out string OutMsg)
+        {
+            MdtrtID = "";
+            OutMsg = "";
+            if ((AdmID == "") || (AdmDoc == "") || (AdmLoc == ""))
+            {
+                OutMsg = "获取HIS历史医保挂号信息AdmID或AdmDoc或AdmLoc入参不能为空";
+                return -1;
+            }
+            
+            string sqlStr = " SELECT Top 1 * FROM  BS_MedInsuRegisterInfo " //DateDiff(dd,OccurTime,getdate())=0
+                          + " WHERE Type=3 And RegState=1 and OccurTime> '" + dtST.Text + "' And OccurTime<'" + dtED.Text + "'"
+                          + " AND CertificateType='01' " //只取使用电子凭证就诊的挂号记录
+                          + " and PersonalNO='" + Global.pat.psn_no + "' and Hospital_Dr='" + Global.inf.hospitalDr + "'"
+                          + " and Adm_Dr='" + AdmID + "'"
+                          + " And AdmInDepName='" + AdmLoc + "'"
+                          + " And ChiefPhyDocName='" + AdmDoc + "'"
+                          + " Order By OccurTime DESC ";
+
+            JObject joSqlstr = new JObject();
+            joSqlstr.Add("sqlStr", sqlStr);
+            JArray jaParam = new JArray();
+            jaParam.Add(joSqlstr);
+            JObject joSettlQuery = new JObject();
+            joSettlQuery.Add("params", jaParam);
+            joSettlQuery.Add("code", "09010062");
+            InvokeHelper invoker = new InvokeHelper();
+            JObject joRtn = invoker.invokeInsuService(joSettlQuery.ToString(), "查询门诊挂号");
+
+            try
+            {
+                if (joRtn["result"]["data"].ToString() == "[]")
+                {
+                    OutMsg = "查询结果为空";
+                    return -1;
+                }
+                else
+                {
+                    DataTable dtInsu = (DataTable)joRtn["result"]["data"].ToObject(typeof(DataTable));
+                    MdtrtID = dtInsu.Rows[0]["InsuRegID"].ToString();
+                    return 0;
+                }
+            }
+            catch (Exception eX)
+            {
+                MdtrtID = "";
+                OutMsg = "查询获取HIS历史医保挂号信息异常:" + eX.Message;
+                return -1;
+            }
+        }
+
+        #region Base64加密解密
+        /// <summary>
+        /// Base64是一種使用64基的位置計數法。它使用2的最大次方來代表僅可列印的ASCII 字元。
+        /// 這使它可用來作為電子郵件的傳輸編碼。在Base64中的變數使用字元A-Z、a-z和0-9 ,
+        /// 這樣共有62個字元,用來作為開始的64個數字,最後兩個用來作為數字的符號在不同的
+        /// 系統中而不同。
+        /// Base64加密
+        /// </summary>
+        /// <param name="str"></param>
+        /// <returns></returns>
+        public static string Base64Encrypt(string str)
+        {
+            byte[] encbuff = System.Text.Encoding.UTF8.GetBytes(str);
+            return Convert.ToBase64String(encbuff);
+        }
+
+        /// <summary>
+        /// Base64解密
+        /// </summary>
+        /// <param name="str"></param>
+        /// <returns></returns>
+        public static string Base64Decrypt(string str)
+        {
+            byte[] decbuff = Convert.FromBase64String(str);
+            return System.Text.Encoding.UTF8.GetString(decbuff);
+        }
+        #endregion
+
+        #region【文件转BASE64 (互转)】
+        /// <summary>
+        /// 文件转base64 
+        /// </summary>
+        /// <param name="fileName">文件全路径</param>
+        /// <returns></returns>
+        public string DocumentToBase64Str(string fileName)
+        {
+            FileStream filestream = new FileStream(fileName, FileMode.Open);
+
+            byte[] bt = new byte[filestream.Length];
+            //调用read读取方法
+            filestream.Read(bt, 0, bt.Length);
+            string base64Str = Convert.ToBase64String(bt);
+            filestream.Close();
+            return base64Str;
+        }
+
+        /// <summary>
+        /// Base64字符串转文件并保存
+        /// </summary>
+        /// <param name="base64String">base64字符串</param>
+        /// /// <param name="fileFullPath">保存的文件路径</param>
+        /// <param name="fileName">保存的文件名</param>
+        /// <returns>是否转换并保存成功</returns>
+        public bool Base64StringToFile(string base64String, string fileFullPath, string fileName)
+        {
+            bool opResult = false;
+            try
+            {
+                if (!Directory.Exists(fileFullPath))
+                {
+                    Directory.CreateDirectory(fileFullPath);
+                }
+                MemoryStream stream = new MemoryStream(Convert.FromBase64String(base64String));
+                FileStream fs = new FileStream(fileFullPath + "\\" + fileName, FileMode.OpenOrCreate, FileAccess.Write);
+                byte[] b = stream.ToArray();
+                fs.Write(b, 0, b.Length);
+                fs.Close();
+
+                opResult = true;
+            }
+            catch (Exception e)
+            {
+                MessageBox.Show("Base64字符串转文件并保存异常" + e.Message);
+            }
+            return opResult;
+        }
+        #endregion
+
+    }
+}

+ 120 - 0
Forms/PrescriptionCirculation.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>

+ 152 - 0
Helper/InvokeHelper.cs

@@ -486,6 +486,158 @@ namespace PTMedicalInsurance.Helper
 
         #endregion
 
+        #region 电子处方
 
+        /// </summary>
+        /// <param name="funNO"></param>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        public JObject invokeCenterServicePresCir(string funNO, string data)
+        {
+            JObject joRtn = new JObject();
+            string outPar = "";
+
+            try
+            {
+                switch (funNO)
+                {
+                    case "7101":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/uploadChk";
+                            break;
+                        }
+                    case "7102":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxFixmedinsSign";
+                            break;
+                        }
+                    case "7103":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxFileUpld";
+                            break;
+                        }
+                    case "7104":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxUndo";
+                            break;
+                        }
+                    case "7105":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/hospRxDetlQuery";
+                            break;
+                        }
+                    case "7106":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxChkInfoQuery";
+                            break;
+                        }
+                    case "7107":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxSetlInfoQuery";
+                            break;
+                        }
+                    case "7108":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxChkInfoCallback";
+                            break;
+                        }
+                    case "7109":
+                        {
+                            Global.curEvt.URL = Global.curEvt.URL + "/fixmedins/rxSetlInfoCallback";
+                            break;
+                        }
+                }
+
+                //Global.curEvt.URL = Global.inf.centerURL;
+                joRtn = invokeCenterServicePresCir(data);
+                outPar = JsonHelper.Compress(joRtn);
+
+                return joRtn;
+            }
+            catch (Exception ex)
+            {
+                if (joRtn["infcode"] == null)
+                { joRtn.Add("infcode", -1); }
+                if (joRtn["err_msg"] == null)
+                { joRtn.Add("err_msg", "invokeCenterServicePresCir(3):" + ex.Message); }
+                outPar = JsonHelper.Compress(joRtn);
+                return joRtn;
+            }
+            finally
+            {
+                Global.writeLog(funNO + "(" + Global.curEvt.URL + ")", JsonHelper.Compress(data), joRtn.ToString());
+                //this.saveCenterLog(JsonHelper.Compress(data), outPar, JsonHelper.Compress(data), outPar);
+            }
+        }
+
+        /// <summary>
+        /// 医保电子处方流转调用服务
+        /// </summary>
+        /// <param name="data"></param>
+        /// <returns></returns>
+        private JObject invokeCenterServicePresCir(string data)
+        {
+            string postContent = "";
+            JObject joRtn = new JObject();
+            try
+            {
+                //内容类型                
+                //Signer signer = new Signer();
+                //signer.Key = Global.inf.privateKey;                     //应用编码
+                //signer.Secret = Global.inf.secretKey;               //secretKey 私钥
+
+                string timestamp = TimeStamp.get13().ToString();  //当前时间戳(秒)
+                string nonce = Guid.NewGuid().ToString();         //非重复的随机字符串(十分钟内不能重复)
+
+                HttpRequest Resquest = new HttpRequest("POST", new Uri(Global.curEvt.URL));
+                Resquest.headers.Add("charset", "UTF-8");
+                //Resquest.headers.Add("x-hw-id", signer.Key);
+                //Resquest.headers.Add("x-tif-timestamp", timestamp);
+                //Resquest.headers.Add("x-tif-passid", signer.Key);
+                //Resquest.headers.Add("x-tif-nonce", nonce);
+                Resquest.body = data;
+
+                string RtnStr;
+                //HttpWebRequest req = signer.Sign(Resquest);
+                HttpWebRequest req = (HttpWebRequest)WebRequest.Create(Global.curEvt.URL);
+                req.ContentType = "application/json;charset=utf8";
+                req.Timeout = 5 * 10000;
+
+                try
+                {
+                    var writer = new StreamWriter(req.GetRequestStream());
+                    writer.Write(Resquest.body);
+                    writer.Flush();
+                    HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
+                    StreamReader reader = new StreamReader(resp.GetResponseStream());
+
+                    RtnStr = reader.ReadToEnd();
+                    joRtn = JObject.Parse(RtnStr);//返回Json数据
+                    return joRtn;
+                }
+                catch (WebException e)
+                {
+                    HttpWebResponse resp = (HttpWebResponse)e.Response;
+                    if (resp != null)
+                    {
+                        return JsonHelper.setExceptionJson(-99, "centerServeiceInvok中获得响应流异常(a)", new StreamReader(resp.GetResponseStream()).ReadToEnd() + "异常内容:" + e.Message);
+                    }
+                    else
+                    {
+                        RtnStr = "异常:" + e.Message;
+                        return JsonHelper.setExceptionJson(-99, "centerServeiceInvok中获得响应流异常(b)", e.Message);
+                    }
+                }
+            }
+            catch (Exception ex)
+            {
+                postContent = "调用中心服务异常" + ex.Message;
+                joRtn.Add("infcode", -1);
+                joRtn.Add("err_msg", "invokeCenterService(Exception_Last):" + ex.Message);
+                return joRtn;
+            }
+        }
+
+        #endregion
     }
 }

+ 131 - 0
Helper/JsonHelper.cs

@@ -559,5 +559,136 @@ namespace PTMedicalInsurance.Helper
             }
 
         }
+
+        /// <summary>
+        /// 组织中心入参-医保电子处方流转
+        /// </summary>
+        /// <param name="infno"></param>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        public static string setCenterInparPresCirNew(JObject data)
+        {
+            #region【测试环境】
+            /*
+            //应用ID
+            Global.inf.appId = "6582E8493AFE477BB7C6F3A46B5CEB1A"; 
+            //Global.inf.appId = "57E2D561E97141A3871DEFB410ADD920"; 
+            //应用秘钥
+            Global.inf.Secret = "AD3731D4509A4186A177B8701DB4069F";
+            //Global.inf.Secret = "F30D0D261BA04063A0BCAEF19F8ADBCC";
+            //应用私钥
+            Global.inf.privateKey = "ANxsfa0qU4Oc4WBG/oA41Z4+goGfJW/ovzz47VQcunKd";    //中心邮件下发 
+            //Global.inf.privateKey = "AKyhfvPbT+tIJHJkZSDILrw7t+FOG1U58UcupYYTzCOj";  //中心Demo
+            //应用公钥
+            //Global.inf.publicKey = "BKRejz4MwM8G8Krc4hyIIvhphvwrQpnHIsGWTd0sn0TJYr2eKJGAv87AKnrT8pL50H6hdVHdU0FFaL18GApDEbU"; //中心邮件下发
+            Global.inf.publicKey = "BIFd2+2CgjuPAj5FMj5L/L3azTWu86suPtlIJkCo8zjQ44R7SQUUkTgZGdVelRQCM5pW+x9tZGzDPaUNbfD499w=";  //中心Demo
+           
+            Global.inf.cardURL = "http://10.126.105.66/hsa-hgs-adapt/api/card/initDll";   //测试环境
+            Global.inf.presCenterURL = "http://10.126.40.12:8080/epc/api";
+             */
+            #endregion
+
+            #region【正式环境】
+            if (Global.inf.interfaceDr == 21) //兰2
+            {
+                //应用ID
+                Global.inf.appId = "4D967CAB5DA44E3583F4246D7FE897F0";
+                //应用秘钥
+                Global.inf.privateKey = "586BD24D03E5481C8AE4FE9DD8424FFE";
+                //应用私钥
+                Global.inf.secretKey = "XTbX+Tt1np5Fma0+twhYi+vtM4J0UJ8VX5fFEZ7t/ro=";
+                //应用公钥            
+                Global.inf.publicKey = "BIFd2+2CgjuPAj5FMj5L/L3azTWu86suPtlIJkCo8zjQ44R7SQUUkTgZGdVelRQCM5pW+x9tZGzDPaUNbfD499w=";
+            }
+
+            Global.curEvt.URL = "http://10.126.34.36:8080/epc/api";
+            #endregion
+
+            Global.writeLog("密钥id:" + Global.inf.appId);
+            Global.writeLog("密钥key:" + Global.inf.secretKey);
+            Global.writeLog("定点医药机构私钥:" + Global.inf.privateKey);
+            Global.writeLog("医保电子处方中心公钥:" + Global.inf.publicKey);
+
+            //Global.curEvt.msgid = Global.inf.hospitalNO + DateTime.Now.ToString("yyyyMMddHHmmssffff");
+            string timestamp = ((long)(DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds).ToString();
+            Global.curEvt.msgid = timestamp;
+
+            JObject requestData = new JObject();
+            requestData.Add("appId", Global.inf.appId);
+            //requestData.Add("version", "2.0.1");
+            requestData.Add("encType", "SM4");
+            requestData.Add("signType", "SM2");
+            requestData.Add("timestamp", timestamp);
+
+            //加密
+            String encData = SMUtil.encrypt(JsonConvert.SerializeObject(data, Formatting.None), Global.inf.appId, Global.inf.secretKey);
+            //Global.writeLog("入参加密前:" + "\r\n" + JsonConvert.DeserializeObject(data.ToString()) + "\r\n" + "入参加密后:" + "\r\n" + encData);
+
+            JObject signDto = (JObject)JObject.Parse(JsonConvert.SerializeObject(requestData, Formatting.None));
+            signDto.Add("data", data);
+
+            //加签
+            String signData = SMUtil.sign(signDto, Global.inf.secretKey, Global.inf.appId);
+            Global.writeLog("签名结果:" + "\r\n" + signData);
+
+            //报文
+            requestData.Add("encData", encData);
+            requestData.Add("signData", signData);
+
+            dynamic Jo = new JObject();
+            Jo.appId = Global.inf.appId;
+            //Jo.version = "2.0.1";
+            Jo.timestamp = timestamp;
+            Jo.encType = "SM4";
+            Jo.signType = "SM2";
+            Jo.signData = signDto.ToString();
+            Jo.encData = data.ToString();
+
+            Global.writeLog("加密前报文:" + "\r\n" + Jo.ToString() + "\r\n" + "加密后报文:" + "\r\n" + JsonConvert.SerializeObject(requestData, Formatting.None));
+
+            //本地解密
+            //String decData = SMUtil.decrypt(encData, Global.inf.appId, Global.inf.Secret);
+            //Global.writeLog("解密:" + decData);
+            //使用应用公钥(publicKey示例默认值)对本地自签名的数据进行验签示例
+            //Boolean isVerify = SMUtil.verify(signDto, Global.inf.Secret, Global.inf.publicKey, signData);
+            //Global.writeLog("验签:" + isVerify);
+
+            return requestData.ToString();
+        }
+
+        /// <summary>
+        /// 解析中心返参
+        /// </summary>
+        /// <param name="joRtn"></param>
+        /// <param name="errorMsg"></param>
+        /// <returns></returns>
+        public static int parseCenterRtnValuePresCir(JObject joRtn, out string errorMsg)
+        {
+            try
+            {
+                string errcode = getDestValue(joRtn, "errcode");
+                string errorCode = getDestValue(joRtn, "errorCode");
+                if (errcode != "")
+                {
+                    errorMsg = getDestValue(joRtn, "message");
+                    return -1;
+                }
+                else if (errorCode != "")
+                {
+                    errorMsg = getDestValue(joRtn, "errorMessage");
+                    return -2;
+                }
+                else
+                {
+                    errorMsg = getDestValue(joRtn, "message");
+                    return int.Parse(getDestValue(joRtn, "code"));
+                }
+            }
+            catch (Exception ex)
+            {
+                errorMsg = "解析中心返参发生异常:" + ex.Message;
+                return -1;
+            }
+        }
     }
 }

+ 10 - 4
InsuBusiness.cs

@@ -1441,17 +1441,17 @@ namespace PTMedicalInsurance
                     rtnResult = JsonHelper.setExceptionJson(-1, "", errMsg).ToString();
                     return rtnResult;
                 }
-                
+
                 //BS架构调用方式问题,每次调用都需要重新初始化
                 if (init(InParam, out outParam) != 0)
                 {
-                    Global.writeLog("初始化异常:"+outParam);
+                    Global.writeLog("初始化异常:" + outParam);
                     rtnResult = outParam;
                     // 基础数据没有初始化成功,也可以运行
-                    if (!businessType.Equals("BasicData")) {
+                    if (!businessType.Equals("BasicData"))
+                    {
                         return rtnResult;
                     }
-                    
                 }
                 //获取pat
                 hBus.GetAgentFunHisInfo(businessType, joInParam, out Global.pat);
@@ -1554,6 +1554,12 @@ namespace PTMedicalInsurance
                                 }
                             }
 
+                            break;
+                        }
+                    case "PrescribeCirculation"://处方流转
+                        {
+                            PrescriptionCirculation PresCir = new PrescriptionCirculation("622426199404255223");
+                            PresCir.ShowDialog();
                             break;
                         }
                     default:

+ 4 - 2
Variables/Struct.cs

@@ -48,8 +48,10 @@ namespace PTMedicalInsurance.Variables
         public string version;
         public string signatureType;
         public string recivedSystem;
-        public string AK;
-        public string SK;
+        public string appId;
+        public string privateKey;
+        public string secretKey;
+        public string publicKey;
         public string dev_no;
         public string dev_safe_info;
         public string cainfo;