Ejemplo n.º 1
0
        public static List <CardDataSourceEntrust> GetEntrust()
        {
            if (PrescripttionDbHelper != null)
            {
                return(PrescripttionDbHelper.GetEntrust());
            }
            else
            {
                string    strsql = @"SELECT ID, DeptCode, RangEnum,HelpCode, MsgContent,Uploader,WBCode,PYCode
	                            FROM emrdb..BASE_Memo 
	                            WHERE HospitalID = 33"    ;
                DataTable dt     = MidDbHelper.ExecuteDataTable(MidDbHelper.EmrHandle, strsql);

                List <CardDataSourceEntrust> list_entrust = new List <CardDataSourceEntrust>();
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    CardDataSourceEntrust mentrust = new CardDataSourceEntrust();
                    mentrust.Id   = Convert.ToInt32(dt.Rows[i]["ID"]);
                    mentrust.Name = dt.Rows[i]["MsgContent"].ToString();
                    mentrust.Pym  = dt.Rows[i]["PYCode"].ToString();
                    mentrust.Wbm  = dt.Rows[i]["WBCode"].ToString();
                    mentrust.Szm  = "";

                    list_entrust.Add(mentrust);
                }
                return(list_entrust);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 刷新重新获取嘱托
        /// </summary>
        /// <returns>嘱托信息</returns>
        public DataTable GetRefreshEntrust()
        {
            ServiceResponseData          retdata = InvokeWcfService("IPProject.Service", "OrderManagerController", "GetEntrustData");
            List <Basic_Entrust>         listE   = retdata.GetData <List <Basic_Entrust> >(0);
            List <CardDataSourceEntrust> listEs  = new List <CardDataSourceEntrust>();

            foreach (Basic_Entrust entrust in listE)
            {
                CardDataSourceEntrust myEnturst = new CardDataSourceEntrust();
                myEnturst.Name = entrust.EntrustName;
                myEnturst.Id   = entrust.EntrustID;
                myEnturst.Pym  = entrust.PYCode;
                myEnturst.Wbm  = entrust.WBCode;
                listEs.Add(myEnturst);
            }

            DataTable dtEntrust = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable(listEs);

            dtEntrust.TableName = "entrustdic";
            return(dtEntrust);
        }
        public List <CardDataSourceEntrust> GetEntrust()
        {
            string    strsql = @"SELECT ID, DeptCode,HelpCode, MsgContent,Uploader,WBCode,PYCode
	                            FROM Clinic_Memo "    ;
            DataTable dt     = oleDb.GetDataTable(strsql);

            List <CardDataSourceEntrust> list_entrust = new List <CardDataSourceEntrust>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                CardDataSourceEntrust mentrust = new CardDataSourceEntrust();
                mentrust.Id   = Convert.ToInt32(dt.Rows[i]["ID"]);
                mentrust.Name = dt.Rows[i]["MsgContent"].ToString();
                mentrust.Pym  = dt.Rows[i]["PYCode"].ToString();
                mentrust.Wbm  = dt.Rows[i]["WBCode"].ToString();
                mentrust.Szm  = "";

                list_entrust.Add(mentrust);
            }
            return(list_entrust);
        }
        /// <summary>
        /// 嘱托
        /// </summary>
        /// <returns>嘱托列表实体</returns>
        public List <CardDataSourceEntrust> GetEntrust()
        {
            if (ltEntrust == null || ltEntrust.Count == 0)
            {
                ServiceResponseData  retEntrustData = InvokeWcfService("OPProject.Service", "PresManageController", "GetEntrustData");
                List <Basic_Entrust> listEntrust    = retEntrustData.GetData <List <Basic_Entrust> >(0);
                ltEntrust = listEntrust;
            }

            List <CardDataSourceEntrust> lists = new List <CardDataSourceEntrust>();

            foreach (Basic_Entrust entrust in ltEntrust)
            {
                CardDataSourceEntrust mEnturst = new CardDataSourceEntrust();
                mEnturst.Name = entrust.EntrustName;
                mEnturst.Id   = entrust.EntrustID;
                mEnturst.Pym  = entrust.PYCode;
                mEnturst.Wbm  = entrust.WBCode;
                lists.Add(mEnturst);
            }

            return(lists);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 医嘱控件数据集获取
        /// </summary>
        /// <param name="orderCategory">医嘱类别0长嘱1临嘱</param>
        /// <param name="pageNo">页号</param>
        /// <param name="pageSize">页大小</param>
        /// <param name="filter">过滤条件</param>
        /// <returns>DataSet usagedic用法数据源 frequencydic频次数据源 entrustdic嘱托数据源 itemdrug药品项目数据源</returns>
        public DataSet OrderDataInit(int orderCategory, int pageNo, int pageSize, string filter)
        {
            //药品项目选项卡数据源
            if (dataset == null || dataset.Tables.Count == 0)
            {
                dataset = new DataSet();

                Action <ClientRequestData> requestAction = ((ClientRequestData request) =>
                {
                    request.AddData(orderCategory);
                });
                ServiceResponseData retdata = InvokeWcfService("IPProject.Service", "OrderManagerController", "OrderDataInit", requestAction);
                alldtItemDrug = retdata.GetData <DataTable>(0);

                //用法数据源
                List <Basic_Channel>       list  = retdata.GetData <List <Basic_Channel> >(1);
                List <CardDataSourceUsage> lists = new List <CardDataSourceUsage>();
                foreach (Basic_Channel entrust in list)
                {
                    CardDataSourceUsage myEnturst = new CardDataSourceUsage();
                    myEnturst.UsageName = entrust.ChannelName;
                    myEnturst.UsageId   = entrust.ID;
                    myEnturst.Pym       = entrust.PYCode;
                    myEnturst.Wbm       = entrust.WBCode;
                    lists.Add(myEnturst);
                }

                DataTable dtUsage = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable(lists);
                dtUsage.TableName = "usagedic";
                dataset.Tables.Add(dtUsage);
                //频次数据源
                List <Basic_Frequency>         listF  = retdata.GetData <List <Basic_Frequency> >(2);
                List <CardDataSourceFrequency> listFs = new List <CardDataSourceFrequency>();
                foreach (Basic_Frequency entrust in listF)
                {
                    CardDataSourceFrequency myEnturst = new CardDataSourceFrequency();
                    myEnturst.Name        = entrust.FrequencyName;
                    myEnturst.FrequencyId = entrust.FrequencyID;
                    myEnturst.Pym         = entrust.PYCode;
                    myEnturst.Wbm         = entrust.WBCode;
                    myEnturst.ExecNum     = 2;
                    listFs.Add(myEnturst);
                }

                DataTable dtFrequency = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable(listFs);
                dtFrequency.TableName = "frequencydic";
                dataset.Tables.Add(dtFrequency);
                //嘱托数据源
                List <Basic_Entrust>         listE  = retdata.GetData <List <Basic_Entrust> >(3);
                List <CardDataSourceEntrust> listEs = new List <CardDataSourceEntrust>();
                foreach (Basic_Entrust entrust in listE)
                {
                    CardDataSourceEntrust myEnturst = new CardDataSourceEntrust();
                    myEnturst.Name = entrust.EntrustName;
                    myEnturst.Id   = entrust.EntrustID;
                    myEnturst.Pym  = entrust.PYCode;
                    myEnturst.Wbm  = entrust.WBCode;
                    listEs.Add(myEnturst);
                }

                DataTable dtEntrust = EFWCoreLib.CoreFrame.Common.ConvertExtend.ToDataTable(listEs);
                dtEntrust.TableName = "entrustdic";
                dataset.Tables.Add(dtEntrust);
            }

            if (orderCategory == 0)
            {
                //长嘱不能开中草药和材料
                DataTable dtCopy = alldtItemDrug.Clone();
                dtCopy.Clear();
                DataRow[] rows = alldtItemDrug.Select(" statid<>102 and itemClass<>2");
                foreach (DataRow dr in rows)
                {
                    dtCopy.Rows.Add(dr.ItemArray);
                }

                dtCopy.TableName = "itemdrug";
                if (dataset.Tables.Contains("itemdrug"))
                {
                    dataset.Tables.Remove("itemdrug");
                }

                dataset.Tables.Add(dtCopy);
                return(dataset);
            }
            else
            {
                alldtItemDrug.TableName = "itemdrug";
                if (dataset.Tables.Contains("itemdrug"))
                {
                    dataset.Tables.Remove("itemdrug");
                }

                dataset.Tables.Add(alldtItemDrug);
                return(dataset);
            }
        }