예제 #1
0
        /// <summary>
        /// 查询午别
        /// </summary>
        /// <returns></returns>
        public ArrayList Query()
        {
            string sql = "";

            if (this.Sql.GetSql("Registration.DoctSchema.Query.1", ref sql) == -1)
            {
                return(null);
            }
            if (this.ExecQuery(sql) == -1)
            {
                return(null);
            }

            al = new ArrayList();
            try
            {
                while (this.Reader.Read())
                {
                    noon      = new Neusoft.HISFC.Models.Base.Noon();
                    noon.ID   = this.Reader[2].ToString(); //id
                    noon.Name = this.Reader[3].ToString(); //name

                    if (Reader.IsDBNull(4) == false)
                    {
                        noon.StartTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[4].ToString());//开始时间
                    }
                    if (Reader.IsDBNull(5) == false)
                    {
                        noon.EndTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[5].ToString());//结束时间
                    }
                    if (Reader.IsDBNull(6) == false)
                    {
                        noon.IsAutoEmergency = Neusoft.FrameWork.Function.NConvert.ToBoolean(Reader[6].ToString());//是否急诊
                    }
                    //noon.OperID = this.Reader[7].ToString();//操作员
                    //noon.OperDate = Neusoft.FrameWork.Function.NConvert.ToDateTime(Reader[8].ToString());

                    al.Add(noon);
                }
                this.Reader.Close();
            }
            catch (Exception e)
            {
                this.Err     = "获取午别出错" + e.Message;
                this.ErrCode = e.Message;
                return(null);
            }
            return(al);
        }
예제 #2
0
        /// <summary>
        /// 删除一条午别记录
        /// </summary>
        /// <param name="noon"></param>
        /// <returns></returns>
        public int Delete(Neusoft.HISFC.Models.Base.Noon noon)
        {
            string sql = "";

            if (this.Sql.GetSql("Registration.DoctSchema.Delete.2", ref sql) == -1)
            {
                return(-1);
            }

            try
            {
                sql = string.Format(sql, noon.ID);

                return(this.ExecNoQuery(sql));
            }
            catch (Exception e)
            {
                this.Err     = "删除午别信息时出错!" + e.Message;
                this.ErrCode = e.Message;
                return(-1);
            }
        }
예제 #3
0
        /// <summary>
        /// 插入午别表
        /// </summary>
        /// <param name="noon"></param>
        /// <returns></returns>
        public int Insert(Neusoft.HISFC.Models.Base.Noon noon)
        {
            string sql = "";

            if (this.Sql.GetSql("Registration.DoctSchema.Insert.2", ref sql) == -1)
            {
                return(-1);
            }

            try
            {
                sql = string.Format(sql, noon.ID, noon.Name, noon.StartTime.ToString(), noon.EndTime.ToString(),
                                    "", DateTime.MinValue.ToString());

                return(this.ExecNoQuery(sql));
            }
            catch (Exception e)
            {
                this.Err     = "插入午别信息表出错!" + e.Message;
                this.ErrCode = e.Message;
                return(-1);
            }
        }
예제 #4
0
        /// <summary>
        /// 获取挂号信息
        /// </summary>
        /// <returns></returns>
        private Neusoft.HISFC.Models.Registration.Register GetRegisterInfo()
        {
            Neusoft.HISFC.Models.Registration.Register register = null;

            if (this.patientInfo != null && !string.IsNullOrEmpty(this.patientInfo.PID.CardNO))
            {
                register                 = new Neusoft.HISFC.Models.Registration.Register();
                register.PID.CardNO      = this.patientInfo.PID.CardNO;
                register.Name            = this.patientInfo.Name;
                register.Sex.ID          = this.patientInfo.Sex.ID;
                register.Birthday        = this.patientInfo.Birthday;
                register.Pact.ID         = this.patientInfo.Pact.ID;
                register.Pact.PayKind.ID = this.patientInfo.Pact.PayKind.ID;
                register.SSN             = this.patientInfo.SSN;
                register.PhoneHome       = this.patientInfo.PhoneHome;
                register.AddressHome     = this.patientInfo.AddressHome;
                register.IDCard          = this.patientInfo.IDCard;
                register.NormalName      = this.patientInfo.NormalName;
                register.IsEncrypt       = this.patientInfo.IsEncrypt;
                register.IDCard          = this.patientInfo.IDCard;
                if (this.patientInfo.IsEncrypt == true)
                {
                    register.Name = Neusoft.FrameWork.WinForms.Classes.Function.Decrypt3DES(this.patientInfo.NormalName);
                }

                register.CardType.ID = this.patientInfo.Memo;

                //挂号流水号
                register.ID       = this.regMgr.GetSequence("Registration.Register.ClinicID");
                register.TranType = Neusoft.HISFC.Models.Base.TransTypes.Positive;//正交易

                //this.regObj.DoctorInfo.Templet.RegLevel.ID = this.cmbRegLevel.Tag.ToString();
                //this.regObj.DoctorInfo.Templet.RegLevel.Name = this.cmbRegLevel.Text;

                register.DoctorInfo.Templet.Dept.ID   = (this.txtDept.Tag as Neusoft.FrameWork.Models.NeuObject).ID;
                register.DoctorInfo.Templet.Dept.Name = (this.txtDept.Tag as Neusoft.FrameWork.Models.NeuObject).Name;

                register.DoctorInfo.Templet.Doct.ID   = string.Empty;
                register.DoctorInfo.Templet.Doct.Name = string.Empty;
                register.RegType = Neusoft.HISFC.Models.Base.EnumRegType.Reg;
                register.Pact    = this.patientInfo.Pact;

                register.DoctorInfo.SeeDate               = this.regMgr.GetDateTimeFromSysDateTime();
                register.DoctorInfo.Templet.RegLevel.ID   = "1";
                register.DoctorInfo.Templet.RegLevel.Name = "普通号";

                Neusoft.HISFC.Models.Base.Noon noon = this.getNoon(register.DoctorInfo.SeeDate);
                register.DoctorInfo.Templet.Noon  = noon;
                register.DoctorInfo.Templet.Begin = register.DoctorInfo.SeeDate.Date;
                register.DoctorInfo.Templet.End   = register.DoctorInfo.SeeDate.Date;
                int returnValue = this.GetRegFee(register);
                if (returnValue < 0)
                {
                    MessageBox.Show("获得挂号费失败");
                    return(null);
                }

                //处方号
                //  this.regObj.InvoiceNO = this.txtRecipeNo.Text.Trim();
                register.RecipeNO = "1";


                register.IsFee              = false;
                register.Status             = Neusoft.HISFC.Models.Base.EnumRegisterStatus.Valid;
                register.IsSee              = false;
                register.InputOper.ID       = this.regMgr.Operator.ID;
                register.InputOper.OperTime = this.regMgr.GetDateTimeFromSysDateTime();
                //add by niuxinyuan
                register.DoctorInfo.SeeDate  = register.InputOper.OperTime;
                register.CancelOper.ID       = "";
                register.CancelOper.OperTime = DateTime.MinValue;
                string invoice = this.feeIntegrate.GetNewInvoiceNO("C");
                if (invoice == null)
                {
                    MessageBox.Show(this.feeIntegrate.Err);
                    return(null);
                }

                register.InvoiceNO = invoice;
                //查询患者就诊记录出错
                int regCount = this.regMgr.QueryRegiterByCardNO(register.PID.CardNO);
                if (regCount == 1)
                {
                    register.IsFirst = false;
                }
                else
                {
                    if (regCount == 0)
                    {
                        register.IsFirst = true;
                    }
                    else
                    {
                        MessageBox.Show("查询患者就诊记录出错");
                        return(null);
                    }
                }

                if (register.DoctorInfo.Templet.Noon.ID == "")
                {
                    MessageBox.Show("未维护午别信息,请先维护!", "提示");
                    return(null);
                }
                register.DoctorInfo.Templet.ID = "";
            }

            return(register);
        }