Exemple #1
0
        public void updateMBIforHICN()
        {
            Console.WriteLine("Starting  : Update MBI Process");
            _lCurrentMasterUserId = 1;
            try
            {
                List <DOGEN_Queue> lstGenQueues;
                BLCommon           objBLCommon = new BLCommon();
                ExceptionTypes     result      = objBLCommon.GetCasesToMask(out lstGenQueues);
                if (result == ExceptionTypes.Success && lstGenQueues.Count > 0)
                {
                    //Parallel.ForEach(lstGenQueues, item =>
                    //{

                    //});
                    Console.WriteLine("Total Records : " + lstGenQueues.Count);
                    foreach (var item in lstGenQueues)
                    {
                        if (item.GEN_QueueId.HasValue && item.GEN_QueueId.Value != 0 && !item.MemberCurrentHICN.IsNullOrEmpty())
                        {
                            Console.WriteLine("Processing : Gen_QueueId - " + item.GEN_QueueId + ", Household Id - " + item.GPSHouseholdID);
                            GetMemberEligibility(item.GPSHouseholdID, out string MBI);

                            if (!string.IsNullOrEmpty(MBI))
                            {
                                result = objBLCommon.UpdateMBIValue(item.GEN_QueueId.Value, MBI);
                                Console.WriteLine("Gen_QueueId - " + item.GEN_QueueId.Value + " Result : Success");
                            }
                        }
                    }
                    //});
                }
                else
                {
                    Console.WriteLine("Error : ");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.Message);
            }
        }
Exemple #2
0
        public void MaskPHIData()
        {
            string notprocessed = "";

            try
            {
                List <DOGEN_Queue> lstGenQueues;
                BLCommon           objBLCommon = new BLCommon();
                ExceptionTypes     result      = objBLCommon.GetCasesToMask(out lstGenQueues);
                if (result == ExceptionTypes.Success && lstGenQueues.Count > 0)
                {
                    //Parallel.ForEach(lstGenQueues, item =>
                    //{

                    //});
                    Console.WriteLine("Total Records : " + lstGenQueues.Count);
                    foreach (var item in lstGenQueues)
                    {
                        if (item.GEN_QueueId.HasValue && item.GEN_QueueId.Value != 0 && !item.MemberCurrentHICN.IsNullOrEmpty())
                        {
                            Console.WriteLine("Processing : Gen_QueueId - " + item.GEN_QueueId + ", HICN - " + item.MemberCurrentHICN);
                            DOGEN_GPSData objDOGEN_GPSData = new DOGEN_GPSData();
                            GetMemberDemographicalDetails(new DOGEN_GPSServiceRequestParameter {
                                MedicareClaimNumber = item.MemberCurrentHICN
                            }, out List <DOGEN_GPSData> lstDOGEN_GPSData, out string errorMessage);

                            if (lstDOGEN_GPSData.Count > 0)
                            {
                                if (lstDOGEN_GPSData.Count > 1 && item.GPSHouseholdID != null)
                                {
                                    objDOGEN_GPSData = lstDOGEN_GPSData.FirstOrDefault(x => x.HouseholdId == item.GPSHouseholdID);
                                }
                                else
                                {
                                    objDOGEN_GPSData = lstDOGEN_GPSData.FirstOrDefault();
                                }

                                if (objDOGEN_GPSData != null)
                                {
                                    result = objBLCommon.MaskPHIData(item.GEN_QueueId.Value, objDOGEN_GPSData);
                                    Console.WriteLine("Gen_QueueId - " + item.GEN_QueueId.Value + " Result : Success");
                                }
                            }
                            else
                            {
                                BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Not Masked GenQueueId : " + item.GEN_QueueId, "Logging not masked GenqueueId");
                            }
                        }
                        else
                        {
                            notprocessed = notprocessed + "," + item.GEN_QueueId;
                        }
                    }
                    //});
                }
                BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "Not Masked GenQueueIds : " + notprocessed, "Logging not masked GenqueueIds");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error : " + ex.Message);
                BLCommon.LogError(0, MethodBase.GetCurrentMethod().Name, (long)ErrorModuleName.BGPMQProcess, (long)ExceptionTypes.Uncategorized, "", ex.ToString());
            }
        }