Exemplo n.º 1
0
        private static List <Person> LoadPersons(DataTable dt)
        {
            List <Person> persons = new List <Person>();

            foreach (DataRow row in dt.Rows)
            {
                string personId     = row["related_person_id"].ToString();
                string relationship = CernerCommon.StripDecimalsForMap(row["related_person_reltn_cd"].ToString());

                Person person = PersonDAL.GetPerson(personId);
                if (person != null)
                {
                    person.Cerner_Relationship = CodeValueDAL.GetCodeValueDisplay(relationship);
                    person.RelationShip        = CernerMapDAL.GetMap("CERNER_RELATIONSHIP", relationship, relationship);
                    persons.Add(person);
                }
            }
            return(persons);
        }
        private static Value_Code LoadValueCode(DataRow row)
        {
            string vcode = "";

            string[]   items;
            Value_Code code = new Value_Code();

            vcode          = CodeValueDAL.GetCodeValueDisplay(row["value_cd"].ToString().Trim());
            items          = vcode.Split(' ');
            code.ValueCode = items[0].Trim();
            string amt = row["amount"].ToString();

            if (amt.Trim().Length > 0)
            {
                if (amt.Trim() != "null")
                {
                    code.ValueAmount = Convert.ToDecimal(amt);
                }
            }
            return(code);
        }