예제 #1
0
        /// <summary>
        /// 挂号预算
        /// </summary>
        /// <returns></returns>
        private bool Budget(RegPatient Patient)
        {
            try
            {
                register              = RegisterObject.RegisterFactory.CreateRegisterObject(Patient.PatType.Code);
                register.OperatorId   = this.operatorId;
                register.OperatorName = this.operatorName;

                Patient.RegFeeInfo = register.Budget(Patient);
                return(true);
            }
            catch (OperatorException operr)
            {
                throw operr;
            }
            catch (Exception err)
            {
                ErrorWriter.WriteLog(err);
                throw new Exception("挂号费用计算发生错误!请重试");
            }
            finally
            {
                register = null;
            }
        }
예제 #2
0
        /// <summary>
        /// 退号
        /// </summary>
        /// <param name="RegInvoiceNo"></param>
        /// <returns></returns>
        public bool CancelRegister(string RegInvoiceNo, string PerfChar)
        {
            try
            {
                RegPatient Patient = GetPatientInfoByInvoiceNo(PerfChar, RegInvoiceNo);
                if (Patient == null)
                {
                    throw new OperatorException("没有找到挂号病人信息!\r\n1、请确认挂号收据号是否正确。\r\n2、如果发票有前缀字符,请确认是否输入前缀字符。\r\n3、确认该号是否已经退号");
                }
                OutPatient     patient = new OutPatient(Patient.PatListID);
                Prescription[] pres    = patient.GetPrescriptions(PresStatus.全部, true);
                if (pres.Length > 0)
                {
                    throw new OperatorException("该病人已经有就诊记录,不能退号");
                }


                register              = RegisterObject.RegisterFactory.CreateRegisterObject(Patient.PatType.Code);
                register.OperatorId   = this.operatorId;
                register.OperatorName = this.operatorName;
                try
                {
                    return(register.CancelRegister(RegInvoiceNo, PerfChar));
                }
                catch (OperatorException operr)
                {
                    throw operr;
                }
                catch (Exception e1)
                {
                    ErrorWriter.WriteLog(e1.Message);
                    throw new Exception("退号操作不成功!请重试");
                }
            }
            catch (Exception err)
            {
                throw err;
            }
        }