Ejemplo n.º 1
0
        /// <summary>
        /// 根据sql语句插叙医疗组维护信息
        /// </summary>
        /// <param name="strSql"></param>
        /// <returns></returns>
        private List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct> ExcuteQueryMedicalTeamForDoctBySql(string strSql)
        {
            int returnValue = this.ExecQuery(strSql);

            if (returnValue < 0)
            {
                return(null);
            }
            List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct> medicalTeamForDoctList = new List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct>();

            while (this.Reader.Read())
            {
                Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medicalTeamForDoctObj = new Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct();
                medicalTeamForDoctObj.MedcicalTeam.Dept.ID = this.Reader[0].ToString();

                medicalTeamForDoctObj.MedcicalTeam.ID = this.Reader[1].ToString();

                medicalTeamForDoctObj.Doct.ID       = this.Reader[2].ToString();
                medicalTeamForDoctObj.Doct.Name     = this.Reader[3].ToString();
                medicalTeamForDoctObj.Oper.ID       = this.Reader[5].ToString();
                medicalTeamForDoctObj.Oper.OperTime = Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[4].ToString());
                medicalTeamForDoctObj.IsValid       = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.Reader[6].ToString());
                medicalTeamForDoctList.Add(medicalTeamForDoctObj);
            }
            this.Reader.Close();
            return(medicalTeamForDoctList);
        }
Ejemplo n.º 2
0
        private int Save()
        {
            if (this.cmbDoct.SelectedItem == null)
            {
                MessageBox.Show("请选择医生");
                return(-1);
            }

            Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medicalTeamForDoct = new Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct();

            medicalTeamForDoct.IsValid       = true;
            medicalTeamForDoct.MedcicalTeam  = this.medicalTeam;
            medicalTeamForDoct.Oper.ID       = this.medicalTeamForDoctLogic.Operator.ID;
            medicalTeamForDoct.Oper.OperTime = this.medicalTeamForDoctLogic.GetDateTimeFromSysDateTime();
            medicalTeamForDoct.Doct          = this.cmbDoct.SelectedItem as Neusoft.FrameWork.Models.NeuObject;

            int returnValue = this.medicalTeamForDoctLogic.InsertMedicalTeamForDoct(medicalTeamForDoct);

            if (returnValue < 0)
            {
                MessageBox.Show("插入医生失败!\n" + this.medicalTeamForDoctLogic.Err);
                return(-1);
            }
            MessageBox.Show("添加成功");
            this.DialogResult = DialogResult.OK;
            return(1);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 插入或删除信息
        /// </summary>
        /// <param name="sqlIndex"></param>
        /// <param name="medicalTeam"></param>
        /// <returns></returns>
        private int InsertOrUpdateTable(string sqlIndex, Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medicalTeamForDoct)
        {
            string[] args = this.GetArgs(medicalTeamForDoct);

            string strSql = string.Empty;

            int returnValue = this.Sql.GetSql(sqlIndex, ref strSql);

            if (returnValue < 0)
            {
                this.Err = "查询" + sqlIndex + "对应的sql语句失败!\n" + this.Sql.Err;
                return(-1);
            }

            try
            {
                strSql = string.Format(strSql, args);
            }
            catch (Exception ex)
            {
                this.Err = "格式化字符串出错!\n" + ex.Message;
                return(-1);
            }



            return(this.ExecNoQuery(strSql));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 停用启用医生
        /// </summary>
        /// <param name="isValidFlag"></param>
        /// <returns></returns>
        private int ProcessDoctValidFlag(bool isValidFlag)
        {
            Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam obj = this.neuSpread1_Sheet1.ActiveRow.Tag as Neusoft.HISFC.Models.Order.Inpatient.MedicalTeam;
            int    returnValue = 0;
            string errText     = string.Empty;

            Neusoft.FrameWork.Management.PublicTrans.BeginTransaction();
            int j = 0;

            for (int i = 0; i < this.neuSpread1_Sheet1.RowCount; i++)
            {
                bool isSelectecd = Neusoft.FrameWork.Function.NConvert.ToBoolean(this.neuSpread2_Sheet1.Cells[i, 0].Value);

                if (isSelectecd)
                {
                    j++;
                    Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medcialTeamForDoctObj = this.neuSpread2_Sheet1.Rows[i].Tag as Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct;

                    returnValue = this.medicalTeamForDoctLogic.UpdateValidFlag(medcialTeamForDoctObj.MedcicalTeam.Dept.ID, medcialTeamForDoctObj.MedcicalTeam.ID, medcialTeamForDoctObj.Doct.ID);
                    if (returnValue < 0)
                    {
                        Neusoft.FrameWork.Management.PublicTrans.RollBack();
                        MessageBox.Show("更新医生状态出错!\n" + this.medicalTeamForDoctLogic.Err);
                        return(-1);
                    }
                }
            }
            if (j == 0) //没有选择
            {
                Neusoft.FrameWork.Management.PublicTrans.RollBack();
                MessageBox.Show("请选择要更新的医生");
                return(-1);
            }
            else
            {
                Neusoft.FrameWork.Management.PublicTrans.Commit();

                if (isValidFlag)
                {
                    MessageBox.Show("启用成功");
                }
                else
                {
                    MessageBox.Show("停用成功");
                }
            }
            this.QueryDoctByDeptAndMedicalTeam(obj.Dept.ID, obj.ID);
            return(1);
        }
Ejemplo n.º 5
0
        private string[] GetArgs(Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medicalTeamForDoct)
        {
            string[] args = new string[]
            {
                medicalTeamForDoct.MedcicalTeam.Dept.ID,
                medicalTeamForDoct.MedcicalTeam.ID,
                medicalTeamForDoct.Doct.ID,
                medicalTeamForDoct.Doct.Name,

                medicalTeamForDoct.Oper.OperTime.ToString(),
                medicalTeamForDoct.Oper.ID,
                Neusoft.FrameWork.Function.NConvert.ToInt32(medicalTeamForDoct.IsValid).ToString()
            };
            return(args);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 根据科室和医疗组信息查询医生信息
        /// </summary>
        /// <param name="deptCode"></param>
        /// <param name="medicalTeamCode"></param>
        /// <returns></returns>
        private int QueryDoctByDeptAndMedicalTeam(string deptCode, string medicalTeamCode)
        {
            this.neuSpread2_Sheet1.Rows.Count = 0;
            List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct> medicalTeamForDoctList = this.medicalTeamForDoctLogic.QueryQueryMedicalTeamForDoctInfo(deptCode, medicalTeamCode, "All");

            if (medicalTeamForDoctList == null)
            {
                MessageBox.Show("查询医生出错!\n" + this.medicalTeamForDoctLogic.Err);
                return(-1);
            }

            for (int i = 0; i < medicalTeamForDoctList.Count; i++)
            {
                Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct obj = medicalTeamForDoctList[i];
                this.neuSpread2_Sheet1.Rows.Add(0, 1);
                this.neuSpread2_Sheet1.Cells[0, 1].Text  = obj.Doct.Name;
                this.neuSpread2_Sheet1.Cells[0, 2].Value = obj.IsValid;
                this.neuSpread2_Sheet1.Rows[0].Tag       = obj;
            }



            return(1);
        }
Ejemplo n.º 7
0
        public void RefreshInfo()
        {
            this.Nodes.Clear();
            if (manager == null)
            {
                manager = new Neusoft.HISFC.BizProcess.Integrate.RADT();
            }

            ArrayList al = new ArrayList();

            Neusoft.HISFC.Models.Base.Employee per = Neusoft.FrameWork.Management.Connection.Operator as Neusoft.HISFC.Models.Base.Employee;

            //节点说明
            al.Add("分管患者|patient");
            try
            {
                ArrayList al1 = new ArrayList();

                al1 = this.manager.QueryPatientByHouseDoc(per, Neusoft.HISFC.Models.Base.EnumInState.I, per.Dept.ID);
                foreach (Neusoft.HISFC.Models.RADT.PatientInfo PatientInfo1 in al1)
                {
                    al.Add(PatientInfo1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("查找分管患者出错\n!" + ex.Message + this.manager.Err);
            }

            al.Add("本科室患者|DeptPatient");
            addPatientList(al, Neusoft.HISFC.Models.Base.EnumInState.I);

            al.Add("会诊患者|ConsultationPatient");

            try
            {
                ArrayList al1 = new ArrayList();
                Neusoft.FrameWork.Management.DataBaseManger dbManager = new Neusoft.FrameWork.Management.DataBaseManger();
                DateTime dt  = dbManager.GetDateTimeFromSysDateTime();
                DateTime dt1 = new DateTime(dt.Year, dt.Month, dt.Day, 0, 0, 0, 0);
                DateTime dt2 = new DateTime(dt.Year, dt.AddDays(1).Month, dt.AddDays(1).Day, 0, 0, 0, 0);
                al1 = this.manager.QueryPatientByConsultation(dbManager.Operator, dt1, dt2, per.Dept.ID);
                foreach (Neusoft.HISFC.Models.RADT.PatientInfo PatientInfo1 in al1)
                {
                    al.Add(PatientInfo1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("查找会诊患者出错\n!" + ex.Message + this.manager.Err);
            }

            al.Add("授权患者|PermissionPatient");

            try
            {
                ArrayList al1 = new ArrayList();
                al1 = this.manager.QueryPatientByPermission(Neusoft.FrameWork.Management.Connection.Operator);
                foreach (Neusoft.HISFC.Models.RADT.PatientInfo PatientInfo1 in al1)
                {
                    al.Add(PatientInfo1);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("查找授权患者出错\n!" + ex.Message + this.manager.Err);
            }

            try
            {
                al.Add("查找患者|QueryPatient");
            }
            catch (Exception ex)
            {
                MessageBox.Show("查找患者出错\n!" + ex.Message + this.manager.Err);
            }
            //{AC6A5576-BA29-4dba-8C39-E7C5EBC7671E} 增加医疗组处理
            al.Add("医疗组内患者|TeamPatient");

            if (this.medicalTeamForDoctBizlogic == null)
            {
                this.medicalTeamForDoctBizlogic = new Neusoft.HISFC.BizLogic.Order.MedicalTeamForDoct();
            }


            List <Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct> medicalTeamForDoctList =
                this.medicalTeamForDoctBizlogic.QueryQueryMedicalTeamForDoctInfo(per.Dept.ID, per.ID);

            if (medicalTeamForDoctList == null)
            {
                MessageBox.Show("查询医疗组失败!\n" + this.medicalTeamForDoctBizlogic.Err);
            }

            if (medicalTeamForDoctList.Count > 0)
            {
                Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medcialObj = medicalTeamForDoctList[0];

                addPatientListMedialTeam(al, Neusoft.HISFC.Models.Base.EnumInState.I, medcialObj.MedcicalTeam.ID);
            }

            this.SetPatient(al);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <param name="medicalTeam"></param>
 /// <returns></returns>
 public int UpdateMedicalTeamForDoct(Neusoft.HISFC.Models.Order.Inpatient.MedicalTeamForDoct medicalTeamForDoct)
 {
     return(this.InsertOrUpdateTable("MedicalTeamForDoct.Update", medicalTeamForDoct));
 }