private static Person LoadPersons(DataRow row)
        {
            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 + ".0000");
                person.RelationShip        = CernerMapDAL.GetMap("CERNER_RELATIONSHIP", relationship, relationship);
            }
            return(person);
        }
        private static Address LoadAddress(DataRow row)
        {
            Address address = new Address();

            address.Street_Addr  = row["street_addr"].ToString();
            address.Street_Addr2 = row["street_addr2"].ToString();
            address.Street_Addr2 = row["street_addr2"].ToString();
            address.City         = row["city"].ToString();
            address.Country      = row["country_cd"].ToString();

            string stateCd = CernerCommon.StripDecimalsForMap(row["state_cd"].ToString());

            address.State_Cd = CernerMapDAL.GetMap("CERNER_STATE", stateCd, stateCd);
            address.ZipCode  = row["zipcode"].ToString();
            return(address);
        }
Exemple #3
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 Charge LoadCharge(DataRow row, string facility)
        {
            string phys   = "";
            string npi    = "";
            Charge charge = new Charge();

            charge.Charge_Description  = row["charge_description"].ToString();
            charge.Charge_Item_Id      = row["charge_item_id"].ToString();
            charge.Item_Extended_Price = row["item_extended_price"].ToString();
            charge.Posted_Dt_Tm        = row["posted_dt_tm"].ToString();
            charge.Service_Dt_Tm       = row["service_dt_tm"].ToString();
            charge.Charge_Type_Cd      = row["charge_type_cd"].ToString();

            phys = row["perf_phys_id"].ToString();
            if (phys != "0")
            {
                npi = PrsnlAliasDAL.GetPrsnlAlias(phys);
                charge.Perf_Phy_Id = CernerMapDAL.GetMapDR(npi, facility, "Z.CONVPROV"); //row["perf_phys_id"].ToString();
            }
            else
            {
                charge.Perf_Phy_Id = "";
            }

            charge.Payor_Id = row["payor_id"].ToString();

            phys = row["ord_phys_id"].ToString();
            if (phys != "0")
            {
                npi = PrsnlAliasDAL.GetPrsnlAlias(phys);
                charge.Ord_Phy_Id = CernerMapDAL.GetMapDR(npi, facility, "Z.CONVPROV"); //row["ord_phys_id"].ToString();
            }
            else
            {
                charge.Ord_Phy_Id = "";
            }

            charge.Quantity     = row["item_quantity"].ToString();
            charge.User_Id      = row["posted_id"].ToString();
            charge.BILL_ITEM_ID = row["BILL_ITEM_ID"].ToString();
            return(charge);
        }