private static Encntr_Plan_Reltn LoadEncPlans(DataRow row)
        {
            Encntr_Plan_Reltn plan = new Encntr_Plan_Reltn();

            plan.InsuranceCode          = row["health_plan_id"].ToString().Trim();
            plan.InsuranceName          = Health_PlanDAL.HealthPlanName(row["health_plan_id"].ToString().Trim()).Trim();
            plan.Address                = AddressDAL.GetAddress_Org(row["organization_id"].ToString().Trim());
            plan.InsurancePhone         = PhoneDAL.GetWorkPhoneOrganization(row["organization_id"].ToString().Trim());
            plan.GroupName              = row["group_name"].ToString().Trim();
            plan.GroupNbr               = row["group_nbr"].ToString().Trim();
            plan.SequenceNbr            = row["priority_seq"].ToString().Trim();
            plan.PolicyNbr              = row["policy_nbr"].ToString().Trim();
            plan.SubscriberPhone        = PhoneDAL.GetHomePhone(row["person_id"].ToString().Trim());
            plan.SubscriberAddress      = AddressDAL.GetHomeAddress(row["person_id"].ToString().Trim());
            plan.EffectiveDate          = row["Beg_Effective_Dt_Tm"].ToString().Trim();
            plan.SubscriberPerson       = PersonDAL.GetPerson(row["person_id"].ToString().Trim());
            plan.SubPolicyNbr           = "";// row["subs_member_nbr"].ToString().Trim();
            plan.SubscriberEmailAddress = AddressDAL.GetEmailAddress(row["person_id"].ToString().Trim());
            plan.StatusDate             = row["verify_dt_tm"].ToString().Trim();
            plan.InsEligibilitySts      = row["verify_status_cd"].ToString().Trim();
            plan.Relationship           = PersonPersonReltDAL.GetRelationship(row["person_id"].ToString().Trim());
            plan.CoverageNbr            = row["member_nbr"].ToString().Trim();
            plan.Authorizations         = AuthorizationDAL.GetAuthorizations(row["encntr_id"].ToString().Trim(), row["health_plan_id"].ToString().Trim(), 1);
            return(plan);
        }
        private static Person LoadPerson(DataRow row)
        {
            Person person = new Person();

            person.PersonId       = row["Person_Id"].ToString();
            person.Birth_Dt_Tm    = row["Birth_Dt_Tm"].ToString();
            person.Deceased_Dt_Tm = row["Deceased_Dt_Tm"].ToString();
            person.Deceased_Tz    = row["Deceased_Tz"].ToString();

            string languageCd = CernerCommon.StripDecimalsForMap(row["Language_Cd"].ToString());

            person.Language_Cd = CernerMapDAL.GetMap("CERNER_LANGUAGE", languageCd, languageCd);

            string maritalStatus = CernerCommon.StripDecimalsForMap(row["Marital_Type_Cd"].ToString());

            person.Marital_Type_Cd = CernerMapDAL.GetMap("CERNER_MARITALSTATUS", maritalStatus, maritalStatus);


            person.Mother_Maiden_Name  = row["Mother_Maiden_Name"].ToString();
            person.Name_Full_Formatted = row["Name_Full_Formatted"].ToString();

            string raceCd = CernerCommon.StripDecimalsForMap(row["Race_Cd"].ToString());

            person.Race_Cd = CernerMapDAL.GetMap("CERNER_RACE", raceCd, raceCd);

            string religionCd = CernerCommon.StripDecimalsForMap(row["Religion_Cd"].ToString());

            person.Religion_Cd = CernerMapDAL.GetMap("CERNER_RELIGION", religionCd, religionCd);

            string sexCd = CernerCommon.StripDecimalsForMap(row["Sex_Cd"].ToString());

            person.Sex_Cd = CernerMapDAL.GetMap("CERNER_GENDER", sexCd, sexCd);

            person.Vip_Cd = CernerCommon.StripDecimalsForMap(row["Vip_Cd"].ToString());

            person.SocialSecurityNumber = PersonAliasDAL.GetPersonAlias_SSN(person.PersonId);

            person.HomeAddress  = AddressDAL.GetHomeAddress(person.PersonId);
            person.EmailAddress = AddressDAL.GetEmailAddress(person.PersonId);

            person.HomePhone = PhoneDAL.GetHomePhone(person.PersonId);
            //person.OtherPhone = PhoneDAL.GetOtherPhone(person.PersonId);
            person.MobilePhone = PhoneDAL.GetMobilePhone(person.PersonId);
            person.WorkPhone   = PhoneDAL.GetWorkPhone(person.PersonId);

            person.Name_First  = row["Name_First"].ToString().ToUpper();
            person.Name_Last   = row["Name_Last"].ToString().ToUpper();
            person.Name_Middle = CheckCode(row["Name_Middle"].ToString().ToUpper());

            string ethnicGroupCd = CernerCommon.StripDecimalsForMap(row["ethnic_grp_cd"].ToString());

            person.Ethnic_Group_Cd = CernerMapDAL.GetMap("CERNER_ETHNIC_GROUP_CD", ethnicGroupCd, ethnicGroupCd);

            person.PrimaryCarePhysician     = ""; // Person_Prsnl_ReltnDAL.GetPrimaryCarePhysician(person.PersonId);
            person.PrimaryCarePhysicianName = ""; // Person_Prsnl_ReltnDAL.GetPrimaryCarePhysicianName(person.PersonId);
            return(person);
        }
Example #3
0
        private static Employer LoadEmpData(DataTable dt)
        {
            Employer emp = new Employer();

            foreach (DataRow row in dt.Rows)
            {
                string orgId = row["Organization_ID"].ToString() + ".0000";

                emp.EmploymentStatus = row["EMPL_STATUS_CD"].ToString().Replace(".0000", "");
                emp.Occupation       = row["EMPL_TITLE"].ToString();
                emp.EmployerName     = OrganizationDAL.GetOrganizationName(orgId);
                emp.WorkAddress      = AddressDAL.GetAddress_Org(orgId);
                emp.EmployerPhone    = PhoneDAL.GetWorkPhoneOrganization(orgId);
                emp.EmployeeID       = "";
            }
            return(emp);
        }
        private static Employer LoadEmpData(DataTable dt)
        {
            Employer emp = new Employer();

            foreach (DataRow row in dt.Rows)
            {
                string orgId   = row["Organization_ID"].ToString();
                string workpos = row["EMPL_OCCUPATION_TEXT"].ToString();
                if (workpos == "null")
                {
                    workpos = "";
                }
                emp.EmploymentStatus = row["EMPL_STATUS_CD"].ToString();
                emp.Occupation       = workpos;
                emp.EmployerName     = OrganizationDAL.GetOrganizationName(orgId);
                emp.WorkAddress      = AddressDAL.GetAddress_Org(orgId);
                emp.EmployerPhone    = PhoneDAL.GetWorkPhoneOrganization(orgId);
                emp.EmployeeID       = "";
            }
            return(emp);
        }