public void GetData(string ConnectionString, CCHEncrypt ce) { base.GetData(ConnectionString); ce.Add("TaxID", ""); if (this.Tables.Count >= 1 && this.Tables[0].Rows.Count > 0) { _totalDocs = (this.Tables[0] != null ? this.Tables[0].Rows.Count : 0); // lam, 20130730, MOB-33 doctors = (from docRow in this.Tables[0].AsEnumerable() select new DoctorResult { ServiceName = docRow.GetData("ServiceName"), TaxId = docRow.EncryptTaxID(ce), NPI = docRow.GetData("NPI"), PracticeName = docRow.GetData("PracticeName"), OrganizationLocationID = docRow.GetData("OrganizationLocationID"), ProviderName = docRow.GetData("ProviderName"), RangeMin = docRow.GetData <int>("RangeMin"), RangeMax = docRow.GetData <int>("RangeMax"), Latitude = docRow.GetData <double>("Latitude"), Longitude = docRow.GetData <double>("Longitude"), LocationAddress1 = docRow.GetData("LocationAddress1"), YourCostMin = docRow.GetData <int>("YourCostMin"), YourCostMax = docRow.GetData <int>("YourCostMax"), LocationCity = docRow.GetData("LocationCity"), LocationState = docRow.GetData("LocationState"), LocationZip = docRow.GetData("LocationZip"), LocationPhone = docRow.GetData("LocationTelephone"), RowNumber = docRow.GetData <int>("RowNumber"), Distance = docRow.GetData("Distance"), NumericDistance = docRow.GetData <decimal>("NumericDistance"), FairPrice = docRow.GetData <bool>("FairPrice"), HGRecognized = docRow.GetData <int>("HGRecognized"), LatLong = docRow.GetData("LatLong"), HGOverallRating = docRow.GetData <double>("HGOverallRating"), HGPatientCount = docRow.GetData <int>("HGPatientCount"), RowOrderKey = docRow.GetData <int>("RowOrderKey"), AntiTransparency = docRow.GetData <bool>("AntiTransparency") }).ToList <DoctorResult>(); } if (this.Tables.Count >= 2 && this.Tables[1].Rows.Count > 0) { description = (from desc in this.Tables[1].AsEnumerable() select new DescriptionResult { Description = desc.GetData("Description") }).ToList <DescriptionResult>(); } if (this.Tables.Count >= 3 && this.Tables[2].Rows.Count > 0) { specialties = (from specs in this.Tables[2].AsEnumerable() select new SpecialtyResult { FindADoc = specs.GetData <int>("FindADoc"), Specialty = specs.GetData("Specialty"), Description = specs.GetData("Description"), Title = specs.GetData("Title"), DoctorTitleText = specs.GetData("DoctorTitleText"), LearnMore = specs.GetData("LearnMore") }).ToList <SpecialtyResult>(); } if (this.Tables.Count >= 4 && this.Tables[3].Rows.Count > 0) { thinData = (from td in this.Tables[3].AsEnumerable() select new ThinDataResult { ThinData = td.GetData <bool>("ThinData") }).ToList <ThinDataResult>(); alternateProviderResult = (from specs in this.Tables[3].AsEnumerable() select new AlternateProviderResult { AlternateProviderData = specs.GetData <bool>("AltFlg") }).First <AlternateProviderResult>(); } if (this.Tables.Count >= 5 && this.Tables[4].Rows.Count > 0) { if (fromRow == 0) { preferredDocs = (from prefDocRow in this.Tables[4].AsEnumerable() where prefDocRow.GetData("ServiceName") != null select new DoctorResult { ServiceName = prefDocRow.GetData("ServiceName"), TaxId = prefDocRow.EncryptTaxID(ce), NPI = prefDocRow.GetData("NPI"), PracticeName = prefDocRow.GetData("PracticeName"), OrganizationLocationID = prefDocRow.GetData("OrganizationLocationID"), ProviderName = prefDocRow.GetData("ProviderName"), RangeMin = prefDocRow.GetData <int>("RangeMin"), RangeMax = prefDocRow.GetData <int>("RangeMax"), Latitude = prefDocRow.GetData <double>("Latitude"), Longitude = prefDocRow.GetData <double>("Longitude"), LocationAddress1 = prefDocRow.GetData("LocationAddress1"), YourCostMin = prefDocRow.GetData <int>("YourCostMin"), YourCostMax = prefDocRow.GetData <int>("YourCostMax"), LocationCity = prefDocRow.GetData("LocationCity"), LocationState = prefDocRow.GetData("LocationState"), LocationZip = prefDocRow.GetData("LocationZip"), LocationPhone = prefDocRow.GetData("LocationTelephone"), RowNumber = prefDocRow.GetData <int>("RowNumber"), Distance = prefDocRow.GetData("Distance"), NumericDistance = prefDocRow.GetData <decimal>("NumericDistance"), FairPrice = prefDocRow.GetData <bool>("FairPrice"), HGRecognized = prefDocRow.GetData <int>("HGRecognized"), LatLong = prefDocRow.GetData("LatLong"), HGOverallRating = prefDocRow.GetData <double>("HGOverallRating"), HGPatientCount = prefDocRow.GetData <int>("HGPatientCount"), RowOrderKey = prefDocRow.GetData <int>("RowOrderKey"), AntiTransparency = prefDocRow.GetData <bool>("AntiTransparency") }).ToList <DoctorResult>(); _totalDocs += (preferredDocs != null && preferredDocs.Count > 0 ? preferredDocs.Count : 0); } } }
public void GetData(string ConnectionString, CCHEncrypt ce) { base.GetData(ConnectionString); ce.Add("TaxID", ""); //Regular results if (this.Tables.Count >= 1 && this.Tables[0].Rows.Count > 0) { Int32 rangeStart = 0, rangeCount = this.Tables[0].Rows.Count; if (ToRow - FromRow <= rangeCount) { if (FromRow > 0) { rangeStart = FromRow; } if (ToRow > 0 && ToRow < rangeCount) { rangeCount = ToRow - FromRow + 1; } } resultData = (from result in this.Tables[0].AsEnumerable() select new FacilityResult { ServiceName = result.GetData("ServiceName"), TaxId = result.EncryptTaxID(ce), NPI = result.GetData("NPI"), PracticeName = result.GetData("PracticeName"), OrganizationLocationID = result.GetData("OrganizationLocationID"), ProviderName = result.GetData("ProviderName"), RangeMin = result.GetData <int>("RangeMin"), RangeMax = result.GetData <int>("RangeMax"), Latitude = result.GetData <double>("Latitude"), Longitude = result.GetData <double>("Longitude"), LocationAddress1 = result.GetData("LocationAddress1"), YourCostMin = result.GetData <int>("YourCostMin"), YourCostMax = result.GetData <int>("YourCostMax"), LocationCity = result.GetData("LocationCity"), LocationState = result.GetData("LocationState"), LocationZip = result.GetData("LocationZip"), LocationPhone = result.GetData("LocationTelephone"), RowNumber = result.GetData <int>("RowNumber"), Distance = result.GetData("Distance"), NumericDistance = result.GetData <decimal>("NumericDistance"), FairPrice = result.GetData <bool>("FairPrice"), HGRecognized = result.GetData <int>("HGRecognized"), LatLong = result.GetData("LatLong"), HGOverallRating = result.GetData <double>("HGOverallRating"), HGPatientCount = result.GetData <int>("HGPatientCount"), RowOrderKey = result.GetData <int>("RowOrderKey"), HGRecognizedDocCount = result.GetData <int>("HGRecognizedDocCount"), HGDocCount = result.GetData <int>("HGDocCount"), HGOfficeID = result.GetData("HGOfficeID"), AntiTransparency = result.GetData <bool>("AntiTransparency"), LSN = result.GetData("LSN") }).ToList <FacilityResult>(); //.GetRange(rangeStart, rangeCount); } // Description Info if (this.Tables.Count >= 2 && this.Tables[1].Rows.Count > 0) { learnMoreData = (from desc in this.Tables[1].AsEnumerable() select new DescriptionResult { Description = desc.GetData("Description") }).ToList <DescriptionResult>(); } // Thin Data Info if (this.Tables.Count >= 3 && this.Tables[2].Rows.Count > 0) { thinDataData = (from specs in this.Tables[2].AsEnumerable() select new ThinDataResult { ThinData = specs.GetData <bool>("ThinData") }).ToList <ThinDataResult>(); alternateProviderResult = (from specs in this.Tables[2].AsEnumerable() select new AlternateProviderResult { AlternateProviderData = specs.GetData <bool>("AltFlg") }).First <AlternateProviderResult>(); healthGradeDisplayTypeResult = (from specs in this.Tables[2].AsEnumerable() select new HealthGradeDisplayTypeResult { HealthGradeResultTypeData = specs.GetData("NCCTFaSHGResultsDisplayType") }).FirstOrDefault <HealthGradeDisplayTypeResult>(); } // Preferred Providers if (this.Tables.Count >= 5 && this.Tables[4].Rows.Count > 0) { if (FromRow == 0) { preferredData = (from result in this.Tables[4].AsEnumerable() select new FacilityResult { ServiceName = result.GetData("ServiceName"), TaxId = result.EncryptTaxID(ce), NPI = result.GetData("NPI"), PracticeName = result.GetData("PracticeName"), OrganizationLocationID = result.GetData("OrganizationLocationID"), ProviderName = result.GetData("ProviderName"), RangeMin = result.GetData <int>("RangeMin"), RangeMax = result.GetData <int>("RangeMax"), Latitude = result.GetData <double>("Latitude"), Longitude = result.GetData <double>("Longitude"), LocationAddress1 = result.GetData("LocationAddress1"), YourCostMin = result.GetData <int>("YourCostMin"), YourCostMax = result.GetData <int>("YourCostMax"), LocationCity = result.GetData("LocationCity"), LocationState = result.GetData("LocationState"), LocationZip = result.GetData("LocationZip"), LocationPhone = result.GetData("LocationTelephone"), RowNumber = result.GetData <int>("RowNumber"), Distance = result.GetData("Distance"), NumericDistance = result.GetData <decimal>("NumericDistance"), FairPrice = result.GetData <bool>("FairPrice"), HGRecognized = result.GetData <int>("HGRecognized"), LatLong = result.GetData("LatLong"), HGOverallRating = result.GetData <double>("HGOverallRating"), HGPatientCount = result.GetData <int>("HGPatientCount"), RowOrderKey = result.GetData <int>("RowOrderKey"), HGRecognizedDocCount = result.GetData <int>("HGRecognizedDocCount"), HGDocCount = result.GetData <int>("HGDocCount"), HGOfficeID = result.GetData("HGOfficeID"), AntiTransparency = result.GetData <bool>("AntiTransparency"), LSN = result.GetData("LSN") }).ToList <FacilityResult>(); } } }