Example #1
0
        /// <summary>
        /// 字典转化为model
        /// </summary>
        /// <returns></returns>
        public Model.NormalLisItems DicToNormalLisItemsModel(Dictionary <string, string> dic)
        {
            string str = JsonConvert.SerializeObject(dic);

            Model.NormalLisItems NormalLisItems = JsonConvert.DeserializeObject <Model.NormalLisItems>(str);
            return(NormalLisItems);
        }
Example #2
0
        private List <Model.NormalLisItems> GetList(string xmlStr, out string Msg)
        {
            List <Model.NormalLisItems> list = new List <Model.NormalLisItems>();
            XmlDocument xd = HospitalXmlStrHelper.HospitalXmlStrToXmlDoc(xmlStr);

            Msg = "无数据";
            if (xd == null)
            {
            }
            else
            {
                if (xd.HasChildNodes)
                {
                    XmlNode xn = xd.SelectSingleNode("//ResultCode");
                    if (xn != null)
                    {
                        if (xn.InnerText == "0")
                        {
                            //  有数据
                            XmlNodeList xnl = xd.SelectNodes("//reocrd");
                            if (xnl.Count > 0)
                            {
                                foreach (XmlNode item in xnl)
                                {
                                    Model.NormalLisItems nn = this.XmlTomModel(item);
                                    //&& Common.MatchDic.NeedRecordDic.Values.Contains(nn.ext_mthd)
                                    if (nn.ext_mthd != null)
                                    {
                                        if (!string.IsNullOrEmpty(nn.ext_mthd))
                                        {
                                            if (!this.CheckData(nn))
                                            {
                                                list.Add(nn);
                                            }
                                        }
                                    }
                                }
                                if (list.Count > 0)
                                {
                                    Msg = "";
                                }
                            }
                        }
                        else
                        {
                            //  查询数据出错,联接无问题
                            Msg = xd.SelectSingleNode("//ErrorMsg").InnerText;
                        }
                    }
                    else
                    {
                        // 查询数据出错,联接无问题
                        Msg = xd.InnerText;
                        //保存查询记录
                    }
                }
            }
            return(list);
        }
Example #3
0
        private bool CheckData(Model.NormalLisItems data)
        {
            bool result = false;

            if (data != null)
            {
                string whereStr = string.Format("ext_mthd ='{0}' and hospnum ='{1}' and check_date ='{2}' and patname='{3}'", data.ext_mthd, data.hospnum, data.check_date, data.patname);
                List <Model.NormalLisItems> list = this.GetModelList(whereStr);
                if (list != null && list.Count > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Example #4
0
        private List <Dictionary <string, string> > GetClinicalInfoDgDicList_Q(string dataStr)
        {
            List <Model.NormalLisItems> pageClinicalInfoList = new List <Model.NormalLisItems>();

            Model.NormalLisItems cl = new Model.NormalLisItems();
            List <Dictionary <string, string> > ClinicalInfoDgDicList = new List <Dictionary <string, string> >();

            if (!string.IsNullOrEmpty(dataStr) && dataStr != "[]")
            {
                //转换页面上的clinicalInfoDg为对象集合
                pageClinicalInfoList = FreezerProUtility.Fp_Common.FpJsonHelper.JsonStrToObject <List <Model.NormalLisItems> >(dataStr);//转换ok
            }
            foreach (Model.NormalLisItems item in pageClinicalInfoList)
            {
                //给对象拼接--临床数据中需要添加基本信息中的RegisterID,InPatientID
                ClinicalInfoDgDicList.Add(FormToDic.ConvertModelToDic(item));
            }
            return(ClinicalInfoDgDicList);
        }
Example #5
0
 private List<Dictionary<string, string>> GetClinicalInfoDgDicList_Q(string dataStr)
 {
     List<Model.NormalLisItems> pageClinicalInfoList = new List<Model.NormalLisItems>();
     Model.NormalLisItems cl = new Model.NormalLisItems();
     List<Dictionary<string, string>> ClinicalInfoDgDicList = new List<Dictionary<string, string>>();
     if (!string.IsNullOrEmpty(dataStr) && dataStr != "[]")
     {
         //转换页面上的clinicalInfoDg为对象集合
         pageClinicalInfoList = FreezerProUtility.Fp_Common.FpJsonHelper.JsonStrToObject<List<Model.NormalLisItems>>(dataStr);//转换ok
     }
     foreach (Model.NormalLisItems item in pageClinicalInfoList)
     {
         //给对象拼接--临床数据中需要添加基本信息中的RegisterID,InPatientID
         ClinicalInfoDgDicList.Add(FormToDic.ConvertModelToDic(item));
     }
     return ClinicalInfoDgDicList;
 }