/// <summary> /// Gets the claim field and tables. /// </summary> /// <param name="contractId">The contract identifier.</param> /// <param name="serviceTypeId">The service type identifier.</param> /// <param name="moduleId"></param> /// <returns></returns> public JsonResult GetClaimFieldAndTables(long?contractId, long?serviceTypeId, int?moduleId) { ContractServiceLineTableSelectionViewModel contractServiceLineTableSelectionViewModel = new ContractServiceLineTableSelectionViewModel { ContractId = contractId, ContractServiceTypeId = serviceTypeId }; // Get Claim field from DB based on module id List <ClaimField> contractClaimFeild = GetApiResponse <List <ClaimField> >("ClaimField", "GetClaimFieldsByModule", moduleId); List <EnumHelper> fieldInfoFromEnum = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.TableSelectionClaimType>(); List <ClaimField> claimFields = (contractClaimFeild.Where( element => fieldInfoFromEnum.Select(x => x.FieldIdentityNumber).Contains(element.ClaimFieldId))).ToList(); List <SelectListItem> contractServiceClaims = new List <SelectListItem>(); if (claimFields.Count > 0) { contractServiceClaims.AddRange(claimFields.Select(item => new SelectListItem { Text = item.Text, Value = item.ClaimFieldId.ToString(CultureInfo.InvariantCulture) })); } //Removing ClaimID,Adjudication Request Name as user should not ab able to select ClaimID,Adjudication Request Name for adjudication contractServiceClaims.RemoveAll(a => a.Text == "Adjudication Request Name" || a.Text == "ClaimID"); //Get the Name of User logged in contractServiceLineTableSelectionViewModel.UserName = GetCurrentUserName(); return(Json(new { claimFeilds = contractServiceClaims }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Gets the udf fields. /// </summary> /// <returns></returns> public JsonResult GetUdfFields() { List <EnumHelper> udfFields = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.ClaimFieldTypes>(); if (udfFields != null && udfFields.Any()) { udfFields = udfFields.Where( a => a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField1.ToString())) || a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField2.ToString())) || a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField3.ToString())) || a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField4.ToString())) || a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField5.ToString())) || a.FieldIdentityNumber == Convert.ToByte(Enum.Parse(typeof(Enums.ClaimFieldTypes), Enums.ClaimFieldTypes.CustomField6.ToString()))).ToList(); } return(Json(new { udfFields }, JsonRequestBehavior.AllowGet)); }
public ActionResult ContractServiceLineClaimFieldSelection(long?contractId, long?serviceTypeId, long serviceLineTypeId, bool isEdit) { ContractServiceLineClaimFieldSelectionViewModel modelContractServiceLineClaimFieldSelection = new ContractServiceLineClaimFieldSelectionViewModel(); if (isEdit) { ContractServiceLineClaimFieldSelection contractServiceLineClaimFieldSelectionforPost = new ContractServiceLineClaimFieldSelection { ContractId = contractId, ServiceLineTypeId = serviceLineTypeId, ContractServiceTypeId = serviceTypeId, UserName = GetCurrentUserName() }; //Get the Name of User logged in List <ContractServiceLineClaimFieldSelection> contractServiceLineClaimFieldSelectionViewModelInfo = PostApiResponse <List <ContractServiceLineClaimFieldSelection> >("ContractServiceLineClaimFieldSelection", "GetClaimFieldSelection", contractServiceLineClaimFieldSelectionforPost); List <ContractServiceLineClaimFieldSelectionViewModel> serviceLineClaimFieldSelection = AutoMapper.Mapper.Map <List <ContractServiceLineClaimFieldSelection>, List <ContractServiceLineClaimFieldSelectionViewModel> >(contractServiceLineClaimFieldSelectionViewModelInfo); modelContractServiceLineClaimFieldSelection.ContractServiceLineClaimFieldSelectionList = serviceLineClaimFieldSelection; } modelContractServiceLineClaimFieldSelection.ContractId = contractId; modelContractServiceLineClaimFieldSelection.ContractServiceTypeId = serviceTypeId; modelContractServiceLineClaimFieldSelection.ServiceLineTypeId = serviceLineTypeId; modelContractServiceLineClaimFieldSelection.IsEdit = isEdit; modelContractServiceLineClaimFieldSelection.ModuleId = Convert.ToByte(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.ClaimToolClaimField).FieldIdentityNumber); return(View(modelContractServiceLineClaimFieldSelection)); }
public ActionResult PaymentTypeCustomTable(long?contractId, long?serviceTypeId, int paymentTypeId, bool isEdit) { PaymentTypeCustomTableViewModel paymentTypeCustomTableViewModel = new PaymentTypeCustomTableViewModel(); if (isEdit) { PaymentTypeCustomTable paymentTypeCustomTableForPost = new PaymentTypeCustomTable { ServiceTypeId = serviceTypeId, ContractId = contractId, PaymentTypeId = paymentTypeId, UserName = GetCurrentUserName() }; //Get the Name of User logged in PaymentTypeCustomTable customPaymentTypeInfo = PostApiResponse <PaymentTypeCustomTable>(Constants.PaymentTypeCustomTable, Constants.GetPaymentTypeCustomTable, paymentTypeCustomTableForPost); paymentTypeCustomTableViewModel = AutoMapper.Mapper.Map <PaymentTypeCustomTable, PaymentTypeCustomTableViewModel>(customPaymentTypeInfo); } paymentTypeCustomTableViewModel.ContractId = contractId; paymentTypeCustomTableViewModel.ServiceTypeId = serviceTypeId; paymentTypeCustomTableViewModel.PaymentTypeId = paymentTypeId; paymentTypeCustomTableViewModel.IsEdit = isEdit; paymentTypeCustomTableViewModel.ModuleId = Convert.ToByte(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.CustomPaymentModeling).FieldIdentityNumber); return(View(paymentTypeCustomTableViewModel)); }
public ActionResult Index() { ClaimSelector claimSelectorInfo = new ClaimSelector { ModuleId = Convert.ToInt32(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.Reporting).FieldIdentityNumber) }; SelectClaimsViewModel denialSelectClaimsViewModel = AutoMapper.Mapper.Map <ClaimSelector, SelectClaimsViewModel>(claimSelectorInfo); return(View("~/Areas/Report/Views/DenialManagementReport/Index.cshtml", denialSelectClaimsViewModel)); }
// // GET: /ReportContainer/ public ActionResult Index() { ClaimSelector claimSelectorInfo = new ClaimSelector { ModuleId = Convert.ToInt32(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.Reporting).FieldIdentityNumber) }; SelectClaimsViewModel selectClaimViewModel = AutoMapper.Mapper.Map <ClaimSelector, SelectClaimsViewModel>(claimSelectorInfo); return(View(selectClaimViewModel)); }
/// <summary> /// Gets the contract log list. /// </summary> /// <param name="paymentResultDictionary">The payment result dictionary.</param> /// <param name="contractList">The contract list.</param> /// <returns></returns> private static List <ContractLog> GetContractLogList(Dictionary <long, List <PaymentResult> > paymentResultDictionary, List <Contract> contractList) { List <ContractLog> contractLogs = new List <ContractLog>(); if (paymentResultDictionary != null && paymentResultDictionary.Count > 0) { foreach (var paymentResultKeyValuePair in paymentResultDictionary.Where(q => q.Value != null)) { ContractLog contractLog = new ContractLog { ClaimId = paymentResultKeyValuePair.Key }; PaymentResult overAllClaimPaymentResult = paymentResultKeyValuePair.Value.FirstOrDefault( payment => payment.Line == null && payment.ServiceTypeId == null); //Get ContractId and Contract Name long? matchedContractId = null; string matchedContractName = string.Empty; Contract matchedContract = null; if (overAllClaimPaymentResult != null) { if (overAllClaimPaymentResult.ContractId.HasValue) { matchedContractId = overAllClaimPaymentResult.ContractId; matchedContract = contractList.FirstOrDefault( q => matchedContractId != null && q.ContractId == overAllClaimPaymentResult.ContractId); if (matchedContract != null) { matchedContractName = matchedContract.ContractName; } } EnumHelper enumHelper = EnumHelperLibrary.GetFieldInfoFromEnum((Enums.AdjudicationOrVarianceStatuses)overAllClaimPaymentResult.ClaimStatus); contractLog.StatusCode = enumHelper.FieldName; } contractLog.ContractId = matchedContractId; contractLog.ContractName = matchedContractName; contractLog.InsertDate = DateTime.UtcNow; contractLogs.Add(contractLog); //Add log for claim level adjudicated data contractLogs.AddRange(GetClaimLevelContractLogList(paymentResultKeyValuePair, contractList, matchedContract)); //Add log for line level adjudicated data contractLogs.AddRange(GetLineLevelContractLogList(paymentResultKeyValuePair, matchedContract)); } } contractLogs = UpdateLogContent(contractLogs); return(contractLogs); }
/// <summary> /// Index /// </summary> /// <returns></returns> public ActionResult Index() { // Fetching ServiceLines and PaymentTypes Information from Enums List <EnumHelper> serviceLineCodes = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.ServiceLineCodes>(); List <EnumHelper> paymentTypeCodes = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.PaymentTypeCodes>(); AutomationTool automationToolData = new AutomationTool { ServiceLineTypes = serviceLineCodes, PaymentTypes = paymentTypeCodes }; return(View(automationToolData)); }
public ActionResult ModelComparisonReport(int dateType, DateTime?startDate, DateTime?endDate, string criteria) { ModelComparisonReportViewModel reportview = new ModelComparisonReportViewModel { DateType = dateType, FacilityId = GetCurrentFacilityId(), StartDate = Convert.ToDateTime(startDate), EndDate = Convert.ToDateTime(endDate), ClaimSearchCriteria = criteria, ModuleId = Convert.ToInt32(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.ModelComparisonReport).FieldIdentityNumber), }; return(View(reportview)); }
/// <summary> /// Gets the line level contract log list. /// </summary> /// <param name="paymentResultKeyValuePair">The payment result key value pair.</param> /// <param name="contract">The contract.</param> /// <returns></returns> private static IEnumerable <ContractLog> GetLineLevelContractLogList(KeyValuePair <long, List <PaymentResult> > paymentResultKeyValuePair, Contract contract) { List <ContractLog> contractLogs = new List <ContractLog>(); List <PaymentResult> paymentResults = paymentResultKeyValuePair.Value.Where(q => q.Line != null).ToList(); if (paymentResults.Any()) { long? contractId = contract != null ? contract.ContractId : (long?)null; string contractName = contract != null ? contract.ContractName : string.Empty; foreach (PaymentResult paymentResult in paymentResults) { ContractLog contractLog = new ContractLog { ClaimId = paymentResult.ClaimId, ContractId = contractId, ContractName = contractName, ServiceLine = paymentResult.Line }; EnumHelper enumHelperClaimCharge = EnumHelperLibrary.GetFieldInfoFromEnum((Enums.AdjudicationOrVarianceStatuses)paymentResult.ClaimStatus); contractLog.StatusCode = enumHelperClaimCharge.FieldName; if (contract != null && paymentResult.ServiceTypeId.HasValue) { ContractServiceType contractServiceType = contract.ContractServiceTypes.FirstOrDefault( q => q.ContractServiceTypeId == paymentResult.ServiceTypeId); if (contractServiceType != null) { contractLog.ServiceTypeName = contractServiceType.ContractServiceTypeName; contractLogs.Add(GetLineItemFoundLog(paymentResult, contractId, contractName, contractServiceType.ContractServiceTypeName)); if (paymentResult.PaymentTypeId.HasValue) { EnumHelper enumHelperPaymentType = EnumHelperLibrary.GetFieldInfoFromEnum((Enums.PaymentTypeCodes)paymentResult.PaymentTypeId.Value); contractLog.PaymentType = enumHelperPaymentType.FieldName; } } } contractLog.InsertDate = DateTime.UtcNow; contractLogs.Add(contractLog); } } return(contractLogs); }
/// <summary> /// Gets the job status. /// </summary> /// <returns></returns> public ActionResult GetJobStatus() { List <EnumHelper> jobStatus = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.JobStatus>(); if (jobStatus != null && jobStatus.Any()) { jobStatus.RemoveAll( a => a.FieldIdentityNumber == Convert.ToInt16(Enum.Parse(typeof(Enums.JobStatus), Enums.JobStatus.Cancelled.ToString())) || a.FieldIdentityNumber == Convert.ToInt16(Enum.Parse(typeof(Enums.JobStatus), Enums.JobStatus.Debug.ToString()))); } return(Json(new { jobStatus }, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Gets the line item found log. /// </summary> /// <param name="lineLevelPaymentResult">The line level payment result.</param> /// <param name="contractId">The contract identifier.</param> /// <param name="contractName">Name of the contract.</param> /// <param name="serviceTypeName">Name of the service type.</param> /// <returns></returns> private static ContractLog GetLineItemFoundLog(PaymentResult lineLevelPaymentResult, long?contractId, string contractName, string serviceTypeName) { EnumHelper enumHelperClaimChargeLineItemFound = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.AdjudicationOrVarianceStatuses.LineItemMatchesAServiceLine); ContractLog contractLog = new ContractLog { ClaimId = lineLevelPaymentResult.ClaimId, ServiceLine = lineLevelPaymentResult.Line, StatusCode = enumHelperClaimChargeLineItemFound.FieldName, ContractId = contractId, ContractName = contractName, ServiceTypeName = serviceTypeName, InsertDate = DateTime.UtcNow, }; return(contractLog); }
/// <summary> /// Get TableName Selection basing on claimFieldId & contractId /// </summary> public JsonResult GetTableNames(long paymentTypeId, string userText) { PaymentTypeAscFeeSchedule modelPaymentTypeAscFeeSchedule = new PaymentTypeAscFeeSchedule { FacilityId = GetCurrentFacilityId(), UserName = GetCurrentUserName(), UserText = userText }; switch ((Enums.PaymentTypeCodes)paymentTypeId) { case Enums.PaymentTypeCodes.AscFeeSchedule: modelPaymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.AscFeeSchedule).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.DrgPayment: modelPaymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.DrgWeightTable).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.FeeSchedule: modelPaymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.FeeSchedule).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.CustomTableFormulas: modelPaymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.CustomPaymentType) .FieldIdentityNumber; break; default: modelPaymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.None).FieldIdentityNumber; break; } List <PaymentTypeTableSelection> paymentTypeTableSelection = PostApiResponse <List <PaymentTypeTableSelection> >("PaymentTypeASCFeeSchedule", "GetTableNameSelection", modelPaymentTypeAscFeeSchedule); List <SelectListItem> paymentTableSelection = new List <SelectListItem>(); if (paymentTypeTableSelection != null && paymentTypeTableSelection.Count > 0) { paymentTableSelection.AddRange(paymentTypeTableSelection.Select(item => new SelectListItem { Text = item.TableName, Value = item.ClaimFieldDocId.ToString(CultureInfo.InvariantCulture) })); } return(Json(paymentTableSelection, JsonRequestBehavior.AllowGet)); }
/// <summary> /// Get the all Claim Fields and Operator Values /// </summary> /// <exception cref="System.NotImplementedException"></exception> public JsonResult GetClaimFieldsandOperatorValues(int moduleId) { List <SelectListItem> operatorValues = new List <SelectListItem>(); List <SelectListItem> contractServiceClaims = new List <SelectListItem>(); List <ClaimFieldOperator> claimFieldOperators = GetApiResponse <List <ClaimFieldOperator> >(Constants.ReportSelection, Constants.GetAllClaimFieldsOperators); if (claimFieldOperators != null && claimFieldOperators.Count > 0) { operatorValues.AddRange(claimFieldOperators.Select(item => new SelectListItem { Text = item.OperatorType, Value = item.OperatorId.ToString(CultureInfo.InvariantCulture) })); } ClaimSelector reportClaimSelectorInfo = new ClaimSelector { ModuleId = moduleId }; // Get Claim field from DB List <ClaimField> claimFields = PostApiResponse <List <ClaimField> >(Constants.ReportSelection, Constants.GetAllClaimFields, reportClaimSelectorInfo); if (claimFields != null && claimFields.Count > 0) { contractServiceClaims.AddRange(claimFields.Select(item => new SelectListItem { Text = item.Text, Value = item.ClaimFieldId.ToString(CultureInfo.InvariantCulture) })); } List <EnumHelper> reportNames = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.ReportTypeFilter>(); List <EnumHelper> reportLevels = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.ReportLevelFilter>(); List <EnumHelper> dateTypes = EnumHelperLibrary.GetFieldInfoFromEnum <Enums.DateTypeFilter>(); return(Json( new { claimFeildOperatorList = operatorValues, claimFields = contractServiceClaims, reportNamesAvailable = reportNames, reportLevelsAvailable = reportLevels, dateTypesAvailable = dateTypes }, JsonRequestBehavior.AllowGet)); }
// // GET: /ServiceLineTableSelection/ public ActionResult ContractServiceLineTableSelection(long?contractId, long?serviceTypeId, long serviceLineTypeId, bool isEdit) { ContractServiceLineTableSelectionViewModel contractServiceLineTable = new ContractServiceLineTableSelectionViewModel(); if (isEdit) { ContractServiceLineTableSelection contractServiceLineTableSelection = new ContractServiceLineTableSelection { ContractServiceTypeId = serviceTypeId, ContractId = contractId, ServiceLineTypeId = serviceLineTypeId, UserName = GetCurrentUserName() }; //Get the Name of User logged in List <ContractServiceLineTableSelection> serviceLineTableList = PostApiResponse <List <ContractServiceLineTableSelection> >("ContractServiceLineTableSelection", "GetServiceLineTableSelection", contractServiceLineTableSelection); List <ContractServiceLineTableSelectionViewModel> tableList = AutoMapper.Mapper .Map <List <ContractServiceLineTableSelection>, List <ContractServiceLineTableSelectionViewModel> >( serviceLineTableList); contractServiceLineTable.TableselectionList = tableList; contractServiceLineTable.ContractServiceLineId = tableList[0].ContractServiceLineId; } contractServiceLineTable.ModuleId = Convert.ToByte(EnumHelperLibrary.GetFieldInfoFromEnum(Enums.Modules.ClaimToolTableSelection).FieldIdentityNumber); contractServiceLineTable.ContractId = contractId; contractServiceLineTable.ContractServiceTypeId = serviceTypeId; contractServiceLineTable.ServiceLineTypeId = serviceLineTypeId; contractServiceLineTable.IsEdit = isEdit; return(View(contractServiceLineTable)); }
public JsonResult GetTableNameSelection(long paymentTypeId, long?nodeId) { PaymentTypeAscFeeSchedule paymentTypeAscFeeSchedule = new PaymentTypeAscFeeSchedule(); switch ((Enums.PaymentTypeCodes)paymentTypeId) { case Enums.PaymentTypeCodes.AscFeeSchedule: paymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.AscFeeSchedule).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.DrgPayment: paymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.DrgWeightTable).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.FeeSchedule: paymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.FeeSchedule).FieldIdentityNumber; break; case Enums.PaymentTypeCodes.CustomTableFormulas: paymentTypeAscFeeSchedule.ClaimFieldId = EnumHelperLibrary.GetFieldInfoFromEnum(Enums.ClaimFieldTypes.CustomPaymentType).FieldIdentityNumber; break; } paymentTypeAscFeeSchedule.NodeId = nodeId; //Get the Name of User logged in paymentTypeAscFeeSchedule.UserName = GetCurrentUserName(); List <PaymentTypeTableSelection> paymentTypeTableSelection = PostApiResponse <List <PaymentTypeTableSelection> >(Constants.PaymentTypeAscFeeSchedule, Constants.GetTableNameSelection, paymentTypeAscFeeSchedule); List <SelectListItem> paymentTableSelection = new List <SelectListItem>(); if (paymentTypeTableSelection != null && paymentTypeTableSelection.Count > 0) { paymentTableSelection.AddRange(paymentTypeTableSelection.Select(item => new SelectListItem { Text = item.TableName, Value = Convert.ToString(item.ClaimFieldDocId) })); } return(Json(new { tableSelectionList = paymentTableSelection })); }
/// <summary> /// Resumes the paused requests. /// </summary> /// <param name="allJobs">All jobs.</param> /// <param name="connectionString">The connection string.</param> private void ResumePausedRequests(IEnumerable <TrackTask> allJobs, string connectionString) { if (GlobalConfigVariable.IsLogEvent) { Log.LogInfo("Resume Request", ConfigurationManager.AppSettings["EventSource"]); } if (allJobs != null) { IEnumerable <TrackTask> resumedTasks = allJobs.Where( pauseJob => EnumHelperLibrary.GetEnumValueByFieldName <Enums.JobStatus>(pauseJob.Status) == Enums.JobStatus.Resumed); IEnumerable <TrackTask> trackTasks = resumedTasks as TrackTask[] ?? resumedTasks.ToArray(); if (GlobalConfigVariable.IsLogEvent) { Log.LogInfo("No of jobs :" + trackTasks.Count(), string.Empty); } foreach (TrackTask pauseJob in trackTasks) { _job = new Job(Convert.ToInt64(pauseJob.TaskId)); _job.RunJob(Convert.ToInt64(pauseJob.TaskId), pauseJob.FacilityId, connectionString); } } else { if (GlobalConfigVariable.IsLogEvent) { Log.LogInfo("No Jobs found", string.Empty); } } }