Пример #1
0
        private void Init()
        {
            if (this.myMgr == null)
            {
                this.myMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
            }
            al = this.myMgr.Query();
            foreach (Neusoft.HISFC.Models.Registration.Noon noon in al)
            {
                this.htNoon.Add(noon.ID, noon.Name);
            }

            if (this.personMgr == null)
            {
                this.personMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            }
            //得到医生列表
            al = new ArrayList();
            al = this.personMgr.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            foreach (Neusoft.HISFC.Models.Base.Employee person in al)
            {
                this.htDoct.Add(person.ID, person.Name);
            }
            this.btnRefresh.Text = "刷 新";
            this.btnRefresh.Tag  = "REF";
            this.SetFP();
            this.dtDate.Value = this.myQueue.GetDateTimeFromSysDateTime();
        }
Пример #2
0
        private void Init()
        {
            ArrayList al = new ArrayList();

            if (this.myMgr == null)
            {
                this.myMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
            }
            al = this.myMgr.Query();
            foreach (Neusoft.HISFC.Models.Registration.Noon noon in al)
            {
                this.htNoon.Add(noon.ID, noon.Name);
            }

            if (this.personMgr == null)
            {
                this.personMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            }
            //得到医生列表
            al = new ArrayList();
            al = this.personMgr.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            foreach (Neusoft.HISFC.Models.Base.Employee person in al)
            {
                this.htDoct.Add(person.ID, person.Name);
            }
        }
Пример #3
0
        /// <summary>
        /// 分诊
        /// </summary>
        /// <param name="trans"></param>
        /// <param name="assign"></param>
        /// <param name="TrigeWhereFlag">分诊标志 1.分到队列  2.分到诊台</param>
        /// <param name="error"></param>
        /// <returns></returns>
        public static int Triage(Neusoft.HISFC.Models.Nurse.Assign assign,
                                 string TrigeWhereFlag, ref string error)
        {
            Neusoft.HISFC.BizLogic.Nurse.Assign assignMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign();

            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();

            try
            {
                //assignMgr.SetTrans(trans.Trans);
                //regMgr.SetTrans(trans.Trans);

                //1、获取队列最大看诊序号
                assign.SeeNO = assignMgr.Query((assign.Queue as Neusoft.FrameWork.Models.NeuObject));
                if (assign.SeeNO == -1)
                {
                    error = assignMgr.Err;
                    return(-1);
                }

                assign.SeeNO = assign.SeeNO + 1;
                //专家的直接取 时间段内的看诊序号
                //				if(neusoft.neNeusoft.HISFC.Components.Function.NConvert.ToInt32(assign.Register.IsPre) == 1)
                if (assign.Register.DoctorInfo.Templet.Doct.ID != null && assign.Register.DoctorInfo.Templet.Doct.ID != "")
                {
                    assign.SeeNO = assign.Register.DoctorInfo.SeeNO;
                }

                //2、插入分诊信息表
                if (assignMgr.Insert(assign) == -1)
                {
                    error = assignMgr.Err;
                    return(-1);
                }

                //3、更新挂号信息表,置分诊标志
                Neusoft.HISFC.BizLogic.Nurse.Assign a = new Neusoft.HISFC.BizLogic.Nurse.Assign();
                //a.SetTrans(trans.Trans);
                if (regMgr.Update(assign.Register.ID, Neusoft.FrameWork.Management.Connection.Operator.ID,
                                  a.GetDateTimeFromSysDateTime() /*regMgr.GetDateTimeFromSysDateTime()*/) == -1)
                {
                    error = regMgr.Err;
                    return(-1);
                }
                //4.队列数量增加1
                if (assignMgr.UpdateQueue(assign.Queue.ID, "1") == -1)
                {
                    error = assignMgr.Err;
                    return(-1);
                }
            }
            catch (Exception e)
            {
                error = e.Message;
                return(-1);
            }

            return(0);
        }
Пример #4
0
        /// <summary>
        /// 取消分诊
        /// </summary>
        /// <param name="trans"></param>
        /// <param name="assign"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public static int CancelTriage(Neusoft.HISFC.Models.Nurse.Assign assign, ref string error)
        {
            Neusoft.HISFC.BizLogic.Nurse.Assign assignMgr = new Neusoft.HISFC.BizLogic.Nurse.Assign();

            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();

            try
            {
                //assignMgr.SetTrans(trans.Trans);
                //regMgr.SetTrans(trans.Trans);

                //删除分诊信息
                int rtn = assignMgr.Delete(assign);
                if (rtn == -1)//出错
                {
                    error = assignMgr.Err;
                    return(-1);
                }

                if (rtn == 0)
                {
                    error = "该分诊信息状态已经发生改变,请刷新屏幕!";
                    return(-1);
                }
                //恢复挂号信息的分诊状态
                rtn = regMgr.CancelTriage(assign.Register.ID);
                if (rtn == -1)
                {
                    error = regMgr.Err;
                    return(-1);
                }
                //4.队列数量-1
                if (assignMgr.UpdateQueue(assign.Queue.ID, "-1") == -1)
                {
                    error = assignMgr.Err;
                    return(-1);
                }
            }
            catch (Exception e)
            {
                error = e.Message;
                return(-1);
            }

            return(0);
        }
Пример #5
0
        /// <summary>
        /// 获取午别
        /// </summary>
        /// <param name="current"></param>
        /// <returns></returns>
        public static string GetNoon(DateTime current)
        {
            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration schemaMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();

            ArrayList alNoon = schemaMgr.Query();

            if (alNoon == null)
            {
                return("");
            }

            /*
             * 实际午别为医生出诊时间段,上午可能为08~11:30,下午为14~17:30
             * 所以挂号员如果不在这个时间段挂号,就有可能提示午别未维护
             * 所以改为根据传人时间所在的午别例如:9:30在06~12之间,那么就判断是否有午别在
             * 06~12之间,全包含就说明9:30是那个午别代码
             */

            int[,] zones = new int[, ] {
                { 0, 120000 }, { 120000, 180000 }, { 180000, 235959 }
            };
            int time = int.Parse(current.ToString("HHmmss"));
            int begin = 0, end = 0;

            for (int i = 0; i < 3; i++)
            {
                if (zones[i, 0] <= time && zones[i, 1] > time)
                {
                    begin = zones[i, 0];
                    end   = zones[i, 1];
                    break;
                }
            }

            foreach (Neusoft.HISFC.Models.Registration.Noon obj in alNoon)
            {
                if (int.Parse(obj.BeginTime.ToString("HHmmss")) >= begin &&
                    int.Parse(obj.EndTime.ToString("HHmmss")) <= end)
                {
                    return(obj.ID);
                }
            }

            return("");
        }
Пример #6
0
        public ucTriage(string nurseID)
        {
            InitializeComponent();

            //Neusoft.HISFC.BizLogic.Nurse.Queue queueMgr = new Neusoft.HISFC.BizLogic.Nurse.Queue();
            Neusoft.HISFC.BizLogic.Nurse.Dept deptMgr = new Neusoft.HISFC.BizLogic.Nurse.Dept();
            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration schemaMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();

            DateTime current = deptMgr.GetDateTimeFromSysDateTime();

            string noonID = Nurse.Function.GetNoon(current);

            //ArrayList queues = queueMgr.Query(nurseID,current.Date,noonID);
            queues = queueMgr.Query(nurseID, current.Date, noonID);
            if (queues == null)
            {
                queues = new ArrayList();
            }


            ArrayList depts = deptMgr.GetDeptInfoByNurseNo(nurseID);

            this.cmbQueue.AddItems(queues);
            #region {4600A33C-8065-4b2c-93D2-9B26B24F61CF}
            if (this.cmbQueue.Items.Count > 0)
            {
                this.cmbQueue.SelectedIndex = 0;
                // return;
            }
            #endregion
            //this.cmbQueue.isItemOnly = true;
            this.txtCard.ReadOnly     = true;
            this.txtCard.BackColor    = Color.White;
            this.txtName.ReadOnly     = true;
            this.txtName.BackColor    = Color.White;
            this.txtRegDate.ReadOnly  = true;
            this.txtRegDate.BackColor = Color.White;
            this.txtDept.ReadOnly     = true;
            this.txtDept.BackColor    = Color.White;
        }
        protected override int OnSave(object sender, object neuObject)
        {
            if (adt == null)
            {
                adt = Neusoft.FrameWork.WinForms.Classes.UtilInterface.CreateObject(this.GetType(), typeof(Neusoft.HISFC.BizProcess.Interface.IHE.IADT)) as Neusoft.HISFC.BizProcess.Interface.IHE.IADT;
            }

            if (adt == null)
            {
                return(-1);
            }

            Neusoft.HISFC.BizProcess.Integrate.RADT radtBll = new Neusoft.HISFC.BizProcess.Integrate.RADT();
            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regBll = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();


            Neusoft.HISFC.Models.RADT.PatientInfo      patient = radtBll.GetPatientInfomation(this.patientInfo.ID);
            Neusoft.HISFC.Models.Registration.Register r       = adt.ProduceInpatientToOutPatientMessage(this.patientInfo);

            if (r == null)
            {
                MessageBox.Show("生成挂号实体出错!");
                return(-1);
            }
            int resultValue = radtBll.UnregisterNoFee(patient);

            if (resultValue != 1)
            {
                throw new Exception(radtBll.Err);
            }
            if (regBll.InsertByDoct(r) == -1)
            {
                throw new Exception(regBll.Err);
            }

            adt.InPatientToOutpatient(this.patientInfo);
            return(base.OnSave(sender, neuObject));
        }
Пример #8
0
        /// <summary>
        /// 初始化下拉列表
        /// </summary>
        private void Initcbo()
        {
            //初始化午别
            if (this.myMgr == null)
            {
                this.myMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
            }
            al = this.myMgr.Query();
            if (al == null)
            {
                al = new ArrayList();
            }
            this.cmbNoon.AddItems(al);
            //初始化看诊科室
            Neusoft.HISFC.BizProcess.Integrate.Manager ps = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            //Neusoft.HISFC.BizLogic.Manager.Person ps = new Neusoft.HISFC.BizLogic.Manager.Person();
            //Neusoft.HISFC.Models.RADT.Person p = new Neusoft.HISFC.Models.RADT.Person();
            Neusoft.HISFC.Models.Base.Employee p = new Neusoft.HISFC.Models.Base.Employee();
            p = ps.GetEmployeeInfo(this.seatMgr.Operator.ID);
            //al = this.depMgr.QueryDepartment(this.myResult.Nurse.ID);//
            al = this.depMgr.QueryDepartmentForArray(this.myResult.Nurse.ID);
            if (al != null || al.Count > 0)
            {
                this.cmbAssignDept.ClearItems();
                this.cmbAssignDept.AddItems(al);
                this.cmbAssignDept.IsListOnly = true;
            }
            //初始化看诊医生
            if (this.personMgr == null)
            {
                this.personMgr = new Neusoft.HISFC.BizProcess.Integrate.Manager();
            }
            //得到医生列表
            al = this.personMgr.QueryEmployee(Neusoft.HISFC.Models.Base.EnumEmployeeType.D);
            if (al == null)
            {
                al = new ArrayList();
            }
            this.cmbDoct.AddItems(al);
            this.cmbDoct.BringToFront();
            this.cmbDoct.IsListOnly = true;
            //加载病区诊室
            if (this.myRoom == null)
            {
                this.myRoom = new Neusoft.HISFC.BizLogic.Nurse.Room();
            }
            al = new ArrayList();
            al = this.myRoom.GetRoomInfoByNurseNoValid(this.Queue.Dept.ID);
            if (al != null)
            {
                 
                {
                    ArrayList b = new ArrayList();

                    foreach (Neusoft.HISFC.Models.Nurse.Room obj in al)
                    {
                        Neusoft.HISFC.Models.Base.Department dept = new Neusoft.HISFC.Models.Base.Department();

                        dept.ID       = obj.ID;
                        dept.Name     = obj.Name;
                        dept.UserCode = obj.InputCode;

                        b.Add(dept);
                    }

                    this.cmbRoom.AddItems(b);
                    this.cmbRoom.IsListOnly = true;
                }
            }
            //加载有效状态
            al = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject obj1 = new Neusoft.FrameWork.Models.NeuObject();
            obj1.ID   = "1";
            obj1.Name = "有效";
            al.Add(obj1);
            Neusoft.FrameWork.Models.NeuObject obj2 = new Neusoft.FrameWork.Models.NeuObject();
            obj2.ID   = "0";
            obj2.Name = "无效";
            al.Add(obj2);
            this.cmbValid.AddItems(al);
            this.cmbValid.SelectedIndex = 0;
            //加载队列类别
            al = new ArrayList();
            Neusoft.FrameWork.Models.NeuObject obj3 = new Neusoft.FrameWork.Models.NeuObject();
            obj3.ID   = "1";
            obj3.Name = "医生队列";
            al.Add(obj3);
            Neusoft.FrameWork.Models.NeuObject obj4 = new Neusoft.FrameWork.Models.NeuObject();
            obj4.ID   = "2";
            obj4.Name = "自定义队列";
            al.Add(obj4);
            this.cmbQueueType.AddItems(al);
            //操作员信息
            this.tbOper.Text     = p.Name;
            this.tbOper.Tag      = p.ID;
            this.tbOperDate.Text = this.seatMgr.GetDateTimeFromSysDateTime().ToString();

            this.dtQueue.Focus();
        }
        /// <summary>
        /// 执行打印
        /// </summary>
        /// <param name="al">打印数据</param>
        /// <returns>成功返回1 失败返回-1</returns>
        internal int Print(Neusoft.HISFC.Models.Pharmacy.DrugRecipe drugRecipe, ArrayList al)
        {
            //一次只打印一个处方号的
            //传入的时候按照组合号、院注标记分组 便于打印
            //applyOut.User01 发药窗口号 applyOut.User02 院注次数

            if (al.Count <= 0)
            {
                return(1);
            }

            Neusoft.HISFC.Models.Registration.Register patientInfo = null;              //患者信息

            #region 患者信息获取

            //获取患者信息
            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regManager = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
            patientInfo = regManager.GetByClinic(drugRecipe.ClinicNO);

            #endregion

            #region 中药房草药、成药打印
            if (this.isHerbalPrint)
            {
                patientInfo.User01 = drugRecipe.FeeOper.OperTime.ToString();

                patientInfo.DoctorInfo.Templet.Doct.Name = this.personHelper.GetName(drugRecipe.Doct.ID);

                Function.IDrugPrint.OutpatientInfo = patientInfo;

                Function.IDrugPrint.AddAllData(al);
                Function.IDrugPrint.Print();

                return(1);
            }
            #endregion

            #region 获取标签总页数
            string privCombo     = "";          //上次医嘱组合号
            int    iRecipeTotNum = 0;           //本次需打印标签总页数
            string recipeNo      = "";          //处方号
            foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut temp in al)
            {
                //temp.SendWindow = this.terminal.SendWindow.Name;
                if (privCombo == temp.CombNO && temp.CombNO != "")
                {
                    continue;
                }
                else
                {
                    iRecipeTotNum = iRecipeTotNum + 1;
                    privCombo     = temp.CombNO;
                }

                recipeNo = temp.RecipeNO;
            }
            #endregion

            Function.IDrugPrint.LabelTotNum = iRecipeTotNum;
            Function.IDrugPrint.DrugTotNum  = al.Count;
            if (patientInfo != null)
            {
                patientInfo.User02 = al.Count.ToString();
                patientInfo.User01 = drugRecipe.FeeOper.OperTime.ToString();

                patientInfo.DoctorInfo.Templet.Doct.Name = this.personHelper.GetName(drugRecipe.Doct.ID);

                patientInfo.User03 = drugRecipe.RecipeNO;

                Function.IDrugPrint.OutpatientInfo = patientInfo;
            }

            privCombo = "-1";
            ArrayList alCombo = new ArrayList();

            if (true)
            {
                #region 标签打印
                foreach (Neusoft.HISFC.Models.Pharmacy.ApplyOut info in al)
                {
                    //info.SendWindow = this.terminal.SendWindow.Name;
                    if (privCombo == "-1" || (privCombo == info.CombNO && info.CombNO != ""))
                    {
                        alCombo.Add(info);
                        privCombo = info.CombNO;
                        continue;
                    }
                    else                        //不同处方号
                    {
                        if (alCombo.Count == 1)
                        {
                            Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                        }
                        else
                        {
                            Function.IDrugPrint.AddCombo(alCombo);
                        }
                        Function.IDrugPrint.Print();

                        privCombo = info.CombNO;
                        alCombo   = new ArrayList();

                        alCombo.Add(info);
                    }
                }
                if (alCombo.Count == 0)
                {
                    return(1);
                }
                if (alCombo.Count > 1)
                {
                    Function.IDrugPrint.AddCombo(alCombo);
                }
                else
                {
                    Function.IDrugPrint.AddSingle(alCombo[0] as Neusoft.HISFC.Models.Pharmacy.ApplyOut);
                }

                Function.IDrugPrint.Print();

                #endregion
            }
            //else
            //{
            //    Function.IDrugPrint.AddAllData(al);
            //    Function.IDrugPrint.Print();
            //}

            return(1);
        }
Пример #10
0
        /// <summary>
        /// 根据输入的住院号/门诊号 查询诊断信息
        /// </summary>
        /// <param name="patientInfo"></param>
        /// <param name="Type"></param>
        /// <returns>-1 出错 0 传入的病人信息为空,不作处理,1 不允许有病案,2病案已经封存,不允许医生修改和查阅 3 查询有数据 4查询没有数据  </returns>
        public int LoadInfo(string InpatientNO) //Neusoft.HISFC.Models.RADT.PatientInfo patientInfo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes Type)
        {
            try
            {
                if (this.fpEnter1_Sheet1.RowCount > 0)
                {
                    this.fpEnter1_Sheet1.Rows.Remove(0, this.fpEnter1_Sheet1.RowCount);
                }
                if (InpatientNO == null || InpatientNO == "")
                {
                    //没有该病人的信息
                    MessageBox.Show("请选择病人");
                    return(0);
                }
                this.inpatientNo = InpatientNO;
                Neusoft.HISFC.Models.RADT.PatientInfo   patient = new Neusoft.HISFC.Models.RADT.PatientInfo();
                Neusoft.HISFC.BizProcess.Integrate.RADT pa      = new Neusoft.HISFC.BizProcess.Integrate.RADT();// Neusoft.HISFC.BizLogic.RADT.InPatient();
                Neusoft.HISFC.BizProcess.Integrate.Registration.Registration register = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
                //从住院主表中查旬
                patient = pa.GetPatientInfoByPatientNO(InpatientNO);
                if (patient == null)
                {
                    Neusoft.HISFC.Models.Registration.Register obj = register.GetByClinic(InpatientNO);
                    if (obj == null)
                    {
                        MessageBox.Show("查询病人信息出错");
                        return(-1);
                    }
                    patient           = new Neusoft.HISFC.Models.RADT.PatientInfo();
                    patient.ID        = obj.ID;
                    patient.CaseState = "1";
                }

                if (patient.CaseState == "0")
                {
                    //不允许有病案
                    return(1);
                }
                //定义业务层的类

                Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBase diag = new Neusoft.HISFC.BizProcess.Integrate.HealthRecord.HealthRecordBase();
                diagList = new ArrayList();

                if (frmType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC) // 医生站录入病历
                {
                    #region  医生站录入病历


                    //目前允许有病历 并且目前没有录入病历  或者标志位位空(默认是允许录入病历)
                    // 医生站录入病例

                    if (patient.CaseState == null || patient.CaseState == "1" || patient.CaseState == "2")
                    {
                        //从医生站录入的信息中查询
                        diagList = diag.QueryCaseDiagnose(patient.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
                    }
                    else
                    {
                        // 病案已经封存已经不允许医生修改和查阅
                        return(2);
                    }

                    #endregion
                }
                else if (frmType == Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS)//病案室录入病历
                {
                    #region 病案室录入病历

                    //目前允许有病历 并且目前没有录入病历  或者标志位位空(默认是允许录入病历)
                    if (patient.CaseState == null || patient.CaseState == "1" || patient.CaseState == "2")
                    {
                        //医生站已经录入病案

                        diagList = diag.QueryCaseDiagnose(patient.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
                    }
                    else if (patient.CaseState == "3")
                    {
                        //病案室已经录入病案

                        diagList = diag.QueryCaseDiagnose(patient.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS);
                    }
                    else if (patient.CaseState == "4")
                    {
                        //病案已经封存 不允许修改。

                        diagList = diag.QueryCaseDiagnose(patient.ID, "%", Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS);
                        this.fpEnter1_Sheet1.OperationMode = FarPoint.Win.Spread.OperationMode.ReadOnly;
                    }

                    #endregion
                }
                else
                {
                    //没有传入参数 不作任何处理
                }

                if (diagList != null)
                {
                    //查询有数据

                    AddInfoToFP(diagList);
                    return(3);
                }
                else
                {//查询没有数据
                    return(4);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return(-1);
            }
        }
Пример #11
0
 private void Init()
 {
     Neusoft.HISFC.BizProcess.Integrate.Registration.Registration regMgr = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
     this.patientInfo = regMgr.GetByClinic("11882");
     this.SetPatient();
 }
Пример #12
0
        private void ucOutPatientTree1_TreeDoubleClick(object sender, HISFC.Components.Order.OutPatient.Controls.ClickEventArgs e)
        {
            #region {22571B58-A56B-4dc3-A32C-EC17D74423A2}

            try
            {
                if (this.ucOutPatientTree1.neuTreeView1.Visible)
                {
                    this.tree = this.ucOutPatientTree1.neuTreeView1;
                    TreeViewEventArgs mye = new TreeViewEventArgs(this.ucOutPatientTree1.neuTreeView1.SelectedNode);
                    this.tree_AfterSelect(e.Message, mye);
                    this.Tag = this.ucOutPatientTree1.neuTreeView1.SelectedNode.Tag;
                }
                if (this.ucOutPatientTree1.neuTreeView2.Visible)
                {
                    this.tree = this.ucOutPatientTree1.neuTreeView2;
                    TreeViewEventArgs mye = new TreeViewEventArgs(this.ucOutPatientTree1.neuTreeView2.SelectedNode);
                    this.tree_AfterSelect(e.Message, mye);
                    this.Tag = this.ucOutPatientTree1.neuTreeView2.SelectedNode.Tag;
                }

                if (this.Tag is Neusoft.HISFC.Models.Registration.Register)
                {
                    //判断账户流程的挂号收费情况
                    bool    isAccount = false;
                    decimal vacancy   = 0m;
                    Neusoft.HISFC.Models.Registration.Register r = (Neusoft.HISFC.Models.Registration.Register)Tag;

                    if (isAccountTerimal && r.IsAccount)
                    {
                        if (feeMgr.GetAccountVacancy(r.PID.CardNO, ref vacancy) <= 0)
                        {
                            MessageBox.Show(feeMgr.Err);
                            return;
                        }
                        isAccount = true;
                    }
                    if (isAccount && r.IsFee == false)
                    {
                        //{6FC43DF1-86E1-4720-BA3F-356C25C74F16}
                        #region 账户扣取挂号费

                        if (!feeMgr.CheckAccountPassWord(r))
                        {
                            this.ucOutPatientTree1.neuTreeView1.SelectedNode = null;
                            this.ucOutPatientTree1.PatientInfo = null;
                            return;
                        }

                        if (isAccount && !r.IsFee)
                        {
                            if (vacancy < r.OwnCost)
                            {
                                MessageBox.Show("账户金额不足,请交费!");
                                return;
                            }


                            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
                            if (feeMgr.AccountPay(r, r.OwnCost, "挂号收费", (orderManager.Operator as Neusoft.HISFC.Models.Base.Employee).Dept.ID, string.Empty) < 0)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("扣账户金额失败!" + feeMgr.Err);
                                return;
                            }
                            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration registerManager = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();
                            r.SeeDOCD = orderManager.Operator.ID;
                            r.SeeDPCD = (orderManager.Operator as Neusoft.HISFC.Models.Base.Employee).Dept.ID;
                            if (registerManager.UpdateAccountFeeState(r.ID, r.SeeDOCD, r.SeeDPCD, orderManager.GetDateTimeFromSysDateTime()) == -1)
                            {
                                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                                MessageBox.Show("更新挂号表已收费状态出错");
                                return;
                            }
                            Neusoft.FrameWork.Management.PublicTrans.Commit();
                            r.IsFee = true;
                        }
                        #endregion
                    }
                }
            }
            catch { }
            finally { }
            #endregion
        }
Пример #13
0
        /// <summary>
        /// 门诊号 住院号
        /// </summary>
        /// <param name="InpatientNo"></param>
        /// <returns></returns>
        public int LoadInfo(string InpatientNo)
        {
            if (InpatientNo == null || InpatientNo == "")
            {
                patientInfo = null;
                MessageBox.Show("传入的住院流水号为空");
                return(-1);
            }

            Neusoft.HISFC.BizProcess.Integrate.RADT radtIntegrate = new Neusoft.HISFC.BizProcess.Integrate.RADT();
            Neusoft.HISFC.BizProcess.Integrate.Registration.Registration registerIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Registration.Registration();

            //{8BC09475-C1D9-4765-918B-299E21E04C74} 诊断录入增加医生站、门诊医生站、病案室属性
            if (Enumdiaginput == enumDiagInput.order)//住院医生
            {
                //从住院主表中查旬
                patientInfo = radtIntegrate.GetPatientInfomation(InpatientNo);
                if (patientInfo == null)
                {
                    Neusoft.HISFC.Models.Registration.Register obj = registerIntegrate.GetByClinic(InpatientNo);
                    if (obj == null)
                    {
                        MessageBox.Show("查询病人信息出错");
                        return(-1);
                    }
                    patientInfo           = new Neusoft.HISFC.Models.RADT.PatientInfo();
                    patientInfo.ID        = obj.ID;
                    patientInfo.CaseState = "1";
                }
                //this.ucDiagNoseInput1.LoadInfo(patientInfo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC);
                this.ucDiagNoseInput1.LoadInfo(patientInfo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC, enumdiaginput.ToString());
            }
            else if (Enumdiaginput == enumDiagInput.outPatientOrder)//门诊医生
            {
                Neusoft.HISFC.Models.Registration.Register obj = registerIntegrate.GetByClinic(InpatientNo);
                if (obj == null)
                {
                    MessageBox.Show("查询病人信息出错");
                    return(-1);
                }
                patientInfo            = new Neusoft.HISFC.Models.RADT.PatientInfo();
                patientInfo.ID         = obj.ID;
                patientInfo.PID.CardNO = obj.PID.CardNO;
                patientInfo.CaseState  = "1";
                this.ucDiagNoseInput1.LoadInfo(patientInfo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.DOC, enumdiaginput.ToString());
            }
            else if (Enumdiaginput == enumDiagInput.cas)
            {
                //从住院主表中查旬
                patientInfo = radtIntegrate.GetPatientInfomation(InpatientNo);
                if (patientInfo == null)
                {
                    Neusoft.HISFC.Models.Registration.Register obj = registerIntegrate.GetByClinic(InpatientNo);
                    if (obj == null)
                    {
                        MessageBox.Show("查询病人信息出错");
                        return(-1);
                    }
                    patientInfo           = new Neusoft.HISFC.Models.RADT.PatientInfo();
                    patientInfo.ID        = obj.ID;
                    patientInfo.CaseState = "1";
                }
                this.ucDiagNoseInput1.LoadInfo(patientInfo, Neusoft.HISFC.Models.HealthRecord.EnumServer.frmTypes.CAS, enumdiaginput.ToString());
            }

            this.ucDiagNoseInput1.fpEnterSaveChanges();
            if (this.ucDiagNoseInput1.GetfpSpreadRowCount() == 0)
            {
                this.ucDiagNoseInput1.AddRow();
            }
            return(1);
        }