示例#1
0
        /// <summary>
        /// 插入PATIENT_INF_LOCAL_ID新记录
        /// </summary>
        /// <param name="exam_times"></param>
        /// <returns></returns>
        public string InsertPatientInfLocalId(bool exam_times)
        {
            string P_local_id = "";

            if (GetConfig.LM_IsLocalMode != 2)
            {
                string seq = "EXAM_" + LocalIdClass + "_SEQ";
                //switch (GetConfig.DALAndModel)
                //{
                //    case "SIS":
                //        seq = "SEQ_EXAM_" + LocalIdClass;
                //        break;
                //    case "PACS":
                //        seq = "EXAM_" + LocalIdClass + "_SEQ";
                //        break;
                //}
                BGetSeqValue bGetAnyId = new BGetSeqValue(GetConfig.DALAndModel, seq);
                P_local_id = bGetAnyId.GetSeqValue();
            }
            if (exam_times)//确认收费时,检查次数为1,否则为0
            {
                this.ExamTimes = 1;
            }
            else
            {
                this.ExamTimes = 0;
            }
            iPatientInfLocalId = DALFactory.Model.CreateMPatientInfLocalId();
            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                smPatientInfLocalId.PATIENT_ID       = this.patientId;
                smPatientInfLocalId.LOCAL_ID_CLASS   = this.LocalIdClass;
                smPatientInfLocalId.PATIENT_LOCAL_ID = P_local_id;
                smPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                pmPatientInfLocalId.PATIENT_ID       = this.patientId;
                pmPatientInfLocalId.LOCAL_ID_CLASS   = this.LocalIdClass;
                pmPatientInfLocalId.PATIENT_LOCAL_ID = P_local_id;
                pmPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;
            }
            if (!this.bPatientInfLocalId.Exists(iPatientInfLocalId))
            {
                this.bPatientInfLocalId.Add(iPatientInfLocalId);
            }
            if (GetConfig.LM_IsLocalMode == 2)
            {
                return("");
            }
            return(P_local_id);
        }
示例#2
0
        /// <summary>
        /// 获取LOCAL_ID_CLASS和PATIENT_INF_LOCAL_ID表中的PATIENT_LOCAL_ID、EXAM_TIMES
        /// </summary>
        public string SelectPatientInfLocalId(ref bool isExit)
        {
            BExamClass bExamClass = new BExamClass();
            IModel     iExamClass = bExamClass.GetModel(this.examClass, this.examSubClass);
            string     localId    = "";

            isExit = false;
            try
            {
                switch (GetConfig.DALAndModel)
                {
                case "SIS":
                    SIS_Model.MExamClass smExamClass = (SIS_Model.MExamClass)iExamClass;
                    this.LocalIdClass       = smExamClass.LOCAL_ID_CLASS;
                    this.iPatientInfLocalId = bPatientInfLocalId.GetModel(this.patientId, this.LocalIdClass);
                    if (iPatientInfLocalId != null)
                    {
                        SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                        localId   = smPatientInfLocalId.PATIENT_LOCAL_ID;
                        ExamTimes = smPatientInfLocalId.EXAM_TIMES;
                        isExit    = true;
                    }
                    break;

                case "PACS":
                    PACS_Model.MExamClass pmExamClass = (PACS_Model.MExamClass)iExamClass;
                    this.LocalIdClass       = pmExamClass.LOCAL_ID_CLASS;
                    this.iPatientInfLocalId = bPatientInfLocalId.GetModel(this.patientId, this.LocalIdClass);
                    if (iPatientInfLocalId != null)
                    {
                        PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                        localId   = pmPatientInfLocalId.PATIENT_LOCAL_ID;
                        ExamTimes = pmPatientInfLocalId.EXAM_TIMES;
                        isExit    = true;
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message, "提示");
            }
            return(localId);
        }
示例#3
0
        public void SetPatientInfLocalIdData(string Field, object Value, IModel iPatientInfLocalId)
        {
            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId)iPatientInfLocalId;
                switch (Field)
                {
                case "EXAM_TIMES":
                    smPatientInfLocalId.EXAM_TIMES = Convert.ToInt32(Value);
                    break;

                case "PATIENT_LOCAL_ID":
                    smPatientInfLocalId.PATIENT_LOCAL_ID = Value.ToString();
                    break;

                case "LOCAL_ID_CLASS":
                    smPatientInfLocalId.LOCAL_ID_CLASS = Value.ToString();
                    break;
                }
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId)iPatientInfLocalId;
                switch (Field)
                {
                case "EXAM_TIMES":
                    pmPatientInfLocalId.EXAM_TIMES = Convert.ToInt32(Value);
                    break;

                case "PATIENT_LOCAL_ID":
                    pmPatientInfLocalId.PATIENT_LOCAL_ID = Value.ToString();
                    break;

                case "LOCAL_ID_CLASS":
                    pmPatientInfLocalId.LOCAL_ID_CLASS = Value.ToString();
                    break;
                }
                break;
            }
        }
示例#4
0
        /// <summary>
        /// 更新PATIENT_LOCAL_ID
        /// </summary>
        /// <returns></returns>
        public bool UpdatePatientInfLocalId(IModel iPatientInfLocalId)
        {
            int i = 0;

            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId)iPatientInfLocalId;
                i = this.bPatientInfLocalId.Update(this.iPatientInfLocalId, "where PATIENT_ID ='" + smPatientInfLocalId.PATIENT_ID + "' and LOCAL_ID_CLASS ='" + smPatientInfLocalId.LOCAL_ID_CLASS + "'");
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId)iPatientInfLocalId;
                i = this.bPatientInfLocalId.Update(this.iPatientInfLocalId, "where PATIENT_ID ='" + pmPatientInfLocalId.PATIENT_ID + "' and LOCAL_ID_CLASS ='" + pmPatientInfLocalId.LOCAL_ID_CLASS + "'");
                break;
            }
            bool issuccess = i > 0 ? true : false;

            // return issuccess;
            return(true);
        }
示例#5
0
        /// <summary>
        /// 更新EXAM_TIMES
        /// </summary>
        /// <param name="ExamTimes"></param>
        /// <returns></returns>
        public int?UpdateExamTimes(int?ExamTimes)
        {
            if (ExamTimes == null)
            {
                ExamTimes = 1;
            }
            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                smPatientInfLocalId.EXAM_TIMES = ExamTimes;
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                pmPatientInfLocalId.EXAM_TIMES = ExamTimes;
                break;
            }
            this.bPatientInfLocalId.Update(iPatientInfLocalId, " where PATIENT_ID = '" + this.patientId + "' and LOCAL_ID_CLASS = '" + this.LocalIdClass + "'");
            return(ExamTimes);
        }
示例#6
0
        /// <summary>
        /// 获取病人检查号
        /// </summary>
        /// <param name="Mode">当前登记模式</param>
        public void GetPatientLocalID(string Mode)
        {
            string localId = "";
            bool   isExit  = false;//PATIENT_INF_LOCAL_ID表中是否存在该病人对该类检查类别和检查子类的记录

            localId = this.SelectPatientInfLocalId(ref isExit);
            if (GetConfig.LM_LocalIdMode != 0 && Mode != "6")//检查号模式不与病人绑定和当前登记模式不为编辑模式的初始化状态
            {
                localId = this.NewPatietnLocalId(isExit);
            }
            if (Mode != "10" && Mode != "11") //当前登记模式不为住院检查申请和住院登记
            {
                if (Mode == "4")              //当前登记模式为绿色通道登记
                {
                    this.SetPatientInfLocalId(true, localId);
                }
                else
                {
                    this.SetPatientInfLocalId(GetConfig.RM_OPDIsConfirmed, localId);//根据门诊默认是否收费来设置PATIENT_INF_LOCAL_ID表
                }
            }
            else
            {
                this.SetPatientInfLocalId(GetConfig.RM_INPIsConfirmed, localId);//根据住院默认是否收费来设置PATIENT_INF_LOCAL_ID表
            }
            switch (GetConfig.DALAndModel)
            {
            case "SIS":
                SIS_Model.MPatientInfLocalId smPatientInfLocalId = (SIS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                smPatientInfLocalId.PATIENT_LOCAL_ID = this.PatientLocalId;
                smPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;

            case "PACS":
                PACS_Model.MPatientInfLocalId pmPatientInfLocalId = (PACS_Model.MPatientInfLocalId) this.iPatientInfLocalId;
                pmPatientInfLocalId.PATIENT_LOCAL_ID = this.PatientLocalId;
                pmPatientInfLocalId.EXAM_TIMES       = this.ExamTimes;
                break;
            }
        }