示例#1
0
        public List <TextValuePair> GetStrengthSelections(List <MedicationMap> matches)
        {
            try
            {
                var vals = new List <TextValuePair>();
                matches.ForEach(
                    m =>
                {
                    var val  = m.Strength;    //FormatStrengthDisplay(m.Strength, m.Unit);
                    var pair = new TextValuePair
                    {
                        Text  = val,
                        Value = val
                    };

                    if (m.Strength != null)
                    {
                        var rec = vals.Find(f => f.Text == val);
                        if (rec == null)
                        {
                            vals.Add(pair);
                        }
                    }
                });
                SortSelections(vals);
                return(vals);
            }
            catch (WebServiceException ex)
            {
                throw new WebServiceException("AD:GetStrengthSelections()::" + ex.Message, ex.InnerException);
            }
        }
示例#2
0
        public List <TextValuePair> GetFormSelections(List <MedicationMap> matches)
        {
            try
            {
                var vals = new List <TextValuePair>();
                matches.ForEach(
                    m =>
                {
                    var pair = new TextValuePair {
                        Text = m.Form, Value = m.Form
                    };

                    if (m.Form != null)
                    {
                        var rec = vals.Find(f => f.Value == m.Form);
                        if (rec == null)
                        {
                            vals.Add(pair);
                        }
                    }
                });

                SortSelections(vals);
                return(vals);
            }
            catch (WebServiceException ex)
            {
                throw new WebServiceException("AD:GetFormSelections()::" + ex.Message, ex.InnerException);
            }
        }