Пример #1
0
        /// <summary>
        /// 缴纳预交金
        /// </summary>
        /// <param name="depositList">预交金</param>
        /// <returns>错误消息</returns>
        public string PayADeposit(IP_DepositList depositList)
        {
            DataTable dt = NewDao <IIPManageDao>().GetPatStatus(depositList.PatListID);

            if (dt.Rows.Count > 0)
            {
                this.BindDb(depositList);
                depositList.save();
                return(string.Empty);
            }
            else
            {
                return("该病人不存在或已取消入院,请确认!");
            }
        }
Пример #2
0
        public ServiceResponseData PayADeposit()
        {
            // 住院登记记录信息
            IP_DepositList depositList = requestData.GetData <IP_DepositList>(0);
            string         msg         = NewObject <DepositManagement>().PayADeposit(depositList);

            if (string.IsNullOrEmpty(msg))
            {
                string perfChar = string.Empty;
                NewObject <InvoiceManagement>().GetInvoiceCurNOAndUse(InvoiceType.住院预交金, depositList.MakerEmpID, out perfChar);
            }

            responseData.AddData(msg);
            responseData.AddData(depositList.DepositID);
            return(responseData);
        }
        /// <summary>
        /// 缴纳预交金
        /// </summary>
        /// <param name="depositList">待保存预交金数据</param>
        private void PayADeposit(IP_DepositList depositList)
        {
            depositList.MakerEmpID = LoginUserInfo.EmpId; //收费人
            depositList.MakerDate  = DateTime.Now;        // 收费时间
            depositList.Status     = 0;
            depositList.PrintTimes = 1;
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                request.AddData(depositList);
            });

            if (depositList.TotalFee <= 0)
            {
                MessageBoxShowSimple("请输入正确的金额");
                return;
            }

            if (MessageBoxShowYesNo(string.Format("确定要该病人收费[{0}]吗?", depositList.TotalFee)) == DialogResult.Yes)
            {
                ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "AdmissionController", "PayADeposit", requestAction);
                string msg       = retdata.GetData <string>(0);
                int    depositID = retdata.GetData <int>(1);

                if (depositID <= 0)
                {
                    MessageBoxShowSimple(msg);
                }
                else
                {
                    Action <ClientRequestData> derequestAction = ((ClientRequestData request) =>
                    {
                        request.AddData(depositID);
                    });

                    ServiceResponseData         deretdata = InvokeWcfService("IPProject.Service", "AdmissionController", "GetPayADeposit", derequestAction);
                    DataTable                   dt        = deretdata.GetData <DataTable>(0);
                    Dictionary <string, object> dic       = new Dictionary <string, object>();

                    if (dt.Rows.Count > 0 && dt.Rows[0]["Status"].ToString() == "正常")
                    {
                        dt.Rows[0]["Head"] = LoginUserInfo.WorkName + "预交金缴款单";
                        string serialNumber = dt.Rows[0]["SerialNumber"].ToString();
                        string patName      = dt.Rows[0]["PatName"].ToString();
                        dt.Rows[0]["SerialNumberName"] = patName + "(住院号" + serialNumber + ")";

                        for (int i = 0; i < dt.Rows.Count; i++)
                        {
                            for (int j = 0; j < dt.Rows[i].ItemArray.Length; j++)
                            {
                                dic.Add(dt.Columns[j].ColumnName, dt.Rows[i][j]);
                            }

                            dic.Add("Year", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Year);
                            dic.Add("Month", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Month);
                            dic.Add("Day", Convert.ToDateTime(dt.Rows[i]["MakerDate"]).Day);
                            dic.Add("TotalFees", dt.Rows[i]["TotalFee"].ToString());
                        }

                        ReportTool.GetReport(LoginUserInfo.WorkId, 3204, 0, dic, null).PrintPreview(true);
                    }
                    else
                    {
                        DevComponents.DotNetBar.MessageBoxEx.Show("已退费不能打印");
                    }
                }
            }
        }
        public void SavePatientInfo()
        {
            Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
            {
                ipatientInfo.PatList.MakerEmpID = LoginUserInfo.EmpId;                                          // 登记人
                ipatientInfo.PatList.PYCode = SpellAndWbCode.GetSpellCode(ipatientInfo.PatList.PatName, 0, 10); // 拼音码
                ipatientInfo.PatList.WBCode = SpellAndWbCode.GetWBCode(ipatientInfo.PatList.PatName, 0, 10);    // 五笔码
                ipatientInfo.PatList.CurrDeptID = ipatientInfo.PatList.EnterDeptID;                             // 当前科室

                if (ipatientInfo.IsNewPatient)
                {
                    ipatientInfo.PatList.Status = 1; // 病人状态
                }

                ipatientInfo.PatList.CurrWardID = ipatientInfo.PatList.EnterWardID;     // 当前病区代码
                ipatientInfo.PatList.CurrDoctorID = ipatientInfo.PatList.EnterDoctorID; // 当前医生代码
                ipatientInfo.PatList.CurrNurseID = ipatientInfo.PatList.EnterNurseID;   // 当前护士代码
                ipatientInfo.PatList.LeaveHDate = DateTime.Now;                         // 出院日期
                request.AddData(ipatientInfo.PatientInfo);
                request.AddData(ipatientInfo.PatList);
                request.AddData(ipatientInfo.IsNewPatient);
                request.AddData(twoAdmission);
                request.AddData(ipatientInfo.InpatientReg);
                request.AddData(LoginUserInfo.WorkId);
                request.AddData(LoginUserInfo.EmpId);
                request.AddData(LoginUserInfo.DeptId);
            });
            ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "AdmissionController", "SavePatientInfo", requestAction);
            string result = retdata.GetData <string>(0);

            if (!string.IsNullOrEmpty(result))
            {
                // 当前会员已办理过住院登记
                MessageBoxShowSimple(result);
                ipatientInfo.SetCardControlEnabled();
                return;
            }
            else
            {
                MessageBox.Show("保存病人信息成功!");
            }

            // 关闭新病人入院信息录入界面
            ipatientInfo.FormClose();

            if (ipatientInfo.TotalFee > 0)
            {
                // 收取预交金
                int            patListID   = retdata.GetData <int>(1);
                IP_DepositList depositList = new IP_DepositList();
                depositList.MemberID  = ipatientInfo.PatList.MemberID;   //会员ID
                depositList.PatListID = patListID;                       //登记ID
                depositList.DeptID    = ipatientInfo.PatList.CurrDeptID; //科室ID

                if (ipatientInfo.IsNewPatient)
                {
                    depositList.SerialNumber = retdata.GetData <decimal>(2); //住院流水号
                }
                else
                {
                    depositList.SerialNumber = ipatientInfo.PatList.SerialNumber; //住院流水号
                }

                depositList.InvoiceNO = ipatientInfo.InvoiceNO;
                depositList.PayType   = ipatientInfo.PayType;
                depositList.TotalFee  = ipatientInfo.TotalFee;
                PayADeposit(depositList);
            }

            // 重新加载病人列表
            GetPatientList(ipatientInfo.IsNewPatient);
        }