Example #1
0
        /// <summary>
        /// ²éѯ¸ú×ټǼ
        /// </summary>
        /// <param name="caseID">²¡ÀúºÅ</param>
        /// <returns>nullʧ°Ü</returns>
        public List <Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack> QueryTrackRecordByCaseID(string caseID)
        {
            if (caseID == null || caseID == string.Empty)
            {
                this.Err = "²¡ÀúºÅΪ¿Õ";
                return(null);
            }

            string strsql = "";

            if (this.Sql.GetSql("CaseManager.Track.SelectByCaseID", ref strsql) == -1)
            {
                this.Err = "»ñÈ¡ CaseManager.Track.SelectByCaseID ʧ°Ü";
                return(null);
            }

            try
            {
                strsql = string.Format(strsql, caseID);
            }
            catch (Exception ex)
            {
                this.Err = "QueryTrackRecordByCaseID ×é×Ö·û»¼Ê§°Ü" + ex.Message;
                return(null);
            }

            if (this.ExecQuery(strsql) == -1)
            {
                this.Err = "Ö´ÐÐ QueryTrackRecordByCaseID ʧ°Ü";
                return(null);
            }

            List <Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack> listTrack = new List <Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack>();

            while (this.Reader.Read())
            {
                Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack track = new Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack();

                track.ID             = this.Reader.IsDBNull(0) ? "" : this.Reader[0].ToString();
                track.PatientCase.ID = this.Reader.IsDBNull(1) ? "" : this.Reader[1].ToString();

                track.UseCaseEnv.ID   = this.Reader.IsDBNull(2) ? "" : this.Reader[2].ToString();                                                                    //ʹÓÃÈ˱àºÅ
                track.UseCaseEnv.Name = this.Reader.IsDBNull(3) ? "" : this.Reader[3].ToString();                                                                    //ÐÕÃû

                track.UseCaseEnv.Dept.ID   = this.Reader.IsDBNull(4) ? "" : this.Reader[4].ToString();                                                               //ʹÓÿÆÊÒ±àºÅ
                track.UseCaseEnv.Dept.Name = this.Reader.IsDBNull(5) ? "" : this.Reader[5].ToString();                                                               //ʹÓÿÆÊÒÃû³Æ

                track.UseCaseEnv.OperTime = this.Reader.IsDBNull(6) ? DateTime.MinValue : Neusoft.FrameWork.Function.NConvert.ToDateTime(this.Reader[6].ToString()); //ʹÓÃʱ¼ä

                track.UseCaseEnv.User01 = this.Reader.IsDBNull(7) ? "" : this.Reader[7].ToString();                                                                  //²¡ÀúʹÓÃÀàÐͱàÂë
                track.UseCaseEnv.User02 = this.Reader.IsDBNull(8) ? "" : this.Reader[8].ToString();                                                                  //²¡ÀúʹÓÃÀàÐÍÃû³Æ

                listTrack.Add(track);
            }

            this.Reader.Close();

            return(listTrack);
        }
Example #2
0
        private void FillTrackRecord(Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack track)
        {
            this.neuSpread1_Sheet1.Rows.Add(this.neuSpread1_Sheet1.Rows.Count, 1);
            int rowIndex = this.neuSpread1_Sheet1.Rows.Count;


            this.neuSpread1_Sheet1.SetText(rowIndex, 0, track.ID);
            this.neuSpread1_Sheet1.SetText(rowIndex, 1, track.PatientCase.ID);
            this.neuSpread1_Sheet1.SetText(rowIndex, 2, track.UseCaseEnv.ID);
            this.neuSpread1_Sheet1.SetText(rowIndex, 3, track.UseCaseEnv.Name);
            this.neuSpread1_Sheet1.SetText(rowIndex, 4, track.UseCaseEnv.Dept.ID);
            this.neuSpread1_Sheet1.SetText(rowIndex, 5, track.UseCaseEnv.Dept.Name);
            this.neuSpread1_Sheet1.SetText(rowIndex, 6, track.UseCaseEnv.OperTime.ToString());
            this.neuSpread1_Sheet1.SetText(rowIndex, 7, track.User01);
            this.neuSpread1_Sheet1.SetText(rowIndex, 8, track.User02);

            this.neuSpread1_Sheet1.Rows[rowIndex].Tag = track;
        }
Example #3
0
        /// <summary>
        /// 入库确认创建病历跟踪
        /// </summary>
        /// <param name="caseBill">病历单据</param>
        /// <param name="useType">使用类型</param>
        /// <returns>-1-失败,1-成功</returns>
        public int InsertCaseTrackAfterInConfirm(Neusoft.HISFC.Models.HealthRecord.Case.CaseBill caseBill, string useType)
        {
            if (caseBill.CaseBillState != Neusoft.HISFC.Models.HealthRecord.Case.EnumCaseBillState.InConfirm)
            {
                this.Err = "病历状态不正确,必须是入库确认状态";

                return(-1);
            }

            Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack caseTrack = new Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack();

            caseTrack.PatientCase         = caseBill.CaseInfo;
            caseTrack.UseCaseEnv.ID       = caseBill.InConfirmOper.ID;
            caseTrack.UseCaseEnv.OperTime = caseBill.InConfirmOper.OperTime;
            caseTrack.UseCaseEnv.Dept.ID  = this.GetDept();
            caseTrack.User01 = useType;

            return(1);
        }
Example #4
0
        /// <summary>
        /// ²åÈë¸ú×ټǼ
        /// </summary>
        /// <param name="caseTrack">²¡Àú¸ú×ÙʵÌå</param>
        /// <returns>-1ʧ°Ü£¬1³É¹¦</returns>
        public int InsertTrackRecord(Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack caseTrack, EnumTrackType trackType)
        {
            if (caseTrack == null)
            {
                this.Err = "²¡Àú¸ú×ÙʵÌåΪ¿Õ";
                return(-1);
            }

            string strsql = "";

            if (this.Sql.GetSql("CaseManager.Track.InsertTrackInfo", ref strsql) == -1)
            {
                this.Err = "»ñÈ¡ CaseManager.Track.InsertTrackInfo ʧ°Ü";
                return(-1);
            }

            switch (trackType)
            {
            case EnumTrackType.CLINIC_CURE:
                caseTrack.User01 = "01";
                break;

            case EnumTrackType.INPATIENT_CURE:
                caseTrack.User01 = "02";
                break;

            case EnumTrackType.CASE_LEND:
                caseTrack.User01 = "03";
                break;

            case EnumTrackType.CASE_CHECK:
                caseTrack.User01 = "04";
                break;

            case EnumTrackType.CASE_QUALITY:
                caseTrack.User01 = "05";
                break;

            case EnumTrackType.FANGLIAO:
                caseTrack.User01 = "06";
                break;

            case EnumTrackType.CASE_VISIT:
                caseTrack.User01 = "07";
                break;

            default:
                caseTrack.User01 = "03";
                break;
            }

            try
            {
                strsql = string.Format(strsql, /*caseTrack.ID*/ this.GetTrackID(),
                                       caseTrack.PatientCase.ID,
                                       caseTrack.UseCaseEnv.OperTime.ToString(),
                                       caseTrack.UseCaseEnv.ID,
                                       caseTrack.UseCaseEnv.Dept.ID,
                                       caseTrack.User01);
            }
            catch (Exception ex)
            {
                this.Err = "InsertTrackRecord ×é×Ö·û»¼Ê§°Ü" + ex.Message;
                return(-1);
            }

            if (this.ExecNoQuery(strsql) <= 0)
            {
                this.Err = "InsertTrackRecord Ö´ÐÐʧ°Ü";
                return(-1);
            }

            return(1);
        }
Example #5
0
        /// <summary>
        /// 插入病历跟踪记录
        /// </summary>
        /// <param name="track">病历跟踪实体</param>
        /// <returns>-1失败;1成功</returns>
        public int InsertTrackRecord(Neusoft.HISFC.Models.HealthRecord.Case.CaseTrack track, Neusoft.HISFC.BizLogic.HealthRecord.Case.EnumTrackType type)
        {
            this.SetDB(trackManager);

            return(trackManager.InsertTrackRecord(track, type));
        }