Ejemplo n.º 1
0
        /// <summary>
        /// 静态方法:将表结构数据转换成实体类
        /// </summary>
        public static SignInfoModel CreateModel(MED_VITAL_SIGN vitalSign)
        {
            SignInfoModel infoModel = null;

            if (null != vitalSign)
            {
                infoModel           = new SignInfoModel();
                infoModel.ItemCode  = vitalSign.ITEM_CODE;
                infoModel.ItemName  = vitalSign.ITEM_NAME;
                infoModel.ItemValue = vitalSign.ITEM_VALUE;
            }

            return(infoModel);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 根据舒张压和舒缩压组合血压
        /// </summary>
        public static SignInfoModel AssembleBloodPressure(IEnumerable <MED_VITAL_SIGN> vitalSignList, ref List <SignInfoModel> list)
        {
            SignInfoModel infoModel = null;

            if (null != vitalSignList)
            {
                // 收缩压
                IEnumerable <MED_VITAL_SIGN> ssSign = vitalSignList.Where <MED_VITAL_SIGN>(x => x.ITEM_CODE.Equals("89"));
                // 舒张压
                IEnumerable <MED_VITAL_SIGN> szSign = vitalSignList.Where <MED_VITAL_SIGN>(x => x.ITEM_CODE.Equals("90"));

                if (szSign.Count <MED_VITAL_SIGN>() > 0 && ssSign.Count <MED_VITAL_SIGN>() > 0)
                {
                    infoModel           = new SignInfoModel();
                    infoModel.ItemCode  = string.Format("{0}/{1}", ssSign.First <MED_VITAL_SIGN>().ITEM_CODE, szSign.First <MED_VITAL_SIGN>().ITEM_CODE);
                    infoModel.ItemName  = "血压";
                    infoModel.ItemValue = string.Format("{0}/{1}", ssSign.First <MED_VITAL_SIGN>().ITEM_VALUE, szSign.First <MED_VITAL_SIGN>().ITEM_VALUE);
                    list.Add(infoModel);
                }
            }

            return(infoModel);
        }