Exemple #1
0
        /// <summary>
        /// 设置过敏史
        /// </summary>
        /// <returns></returns>
        private void SetAllergicHistory(ref PresInfo presInfo, PiPatAlDO[] pipatAls)
        {
            List <PresInfo.AllergicHistory> allergicHistory = new List <PresInfo.AllergicHistory>();
            // 过敏史记录数
            int pipatAlLength = pipatAls == null ? 0 : pipatAls.Length;
            // 获取需要循环的次数,构造大通使用的过敏史数据时,保证最少三条记录,不足设置空值
            int resultCnt = pipatAlLength > MINIMUM_RECORD_NUM ? pipatAlLength : MINIMUM_RECORD_NUM;

            for (int i = 0; i < resultCnt; i++)
            {
                PresInfo.AllergicHistory allergic = new PresInfo.AllergicHistory();
                if (pipatAlLength > i)
                {
                    allergic.Case_code = pipatAls[i].Mm_code;
                    allergic.Case_name = pipatAls[i].Mm_name;
                }
                else
                {
                    allergic.Case_code = "";
                    allergic.Case_name = "";
                }
                allergicHistory.Add(allergic);
            }

            presInfo.AllergicHistories = allergicHistory;
        }
        /// <summary>
        /// 获取过敏史集合
        /// </summary>
        /// <returns></returns>
        private List <PresInfo.AllergicHistory> GetAllergicHistory()
        {
            List <PresInfo.AllergicHistory> allergicHistory = new List <PresInfo.AllergicHistory>();

            PresInfo.AllergicHistory allergic = new PresInfo.AllergicHistory();

            allergicHistory.Add(allergic);
            return(allergicHistory);
        }