public void FeeScheduleModelTest1() { var data = new FeeScheduleData { FeeScheduleKey = 1, CompanyKey = 1, AccountKey = 1, ProductKey = 1, FeeScheduleStartDate = new System.DateTime(2018, 1, 1), FeeScheduleEndDate = new System.DateTime(2018, 1, 1), FeeScheduleType = "TEST", FeeScheduleValue = 1, AuditAddUserId = "TEST", AuditAddDatetime = new System.DateTime(2018, 1, 1), AuditUpdateUserId = "TEST", AuditUpdateDatetime = new System.DateTime(2018, 1, 1), }; var sut = new FeeSchedule(data); Assert.True(sut.FeeScheduleKey == 1); Assert.True(sut.CompanyKey == 1); Assert.True(sut.AccountKey == 1); Assert.True(sut.ProductKey == 1); Assert.True(sut.FeeScheduleStartDate == new System.DateTime(2018, 1, 1)); Assert.True(sut.FeeScheduleEndDate == new System.DateTime(2018, 1, 1)); Assert.True(sut.FeeScheduleTypeCode == "TEST"); Assert.True(sut.FeeScheduleValue == 1); }
private void DoSave() { FeeSchedule.AcceptChanges(); notification.EditibleObject = FeeSchedule.Model; notification.Confirmed = true; FinishInteraction(); }
public void PopulateProductInfo() { if (this.ProductList != null) { //OrderItem var = SelectedOrderItem as OrderItem; FeeSchedule var = Account.FeeSchedules[FeeSelectedIndex].Model; if (var != null && var.ProductKey > 0) { var sp = ProductList.Where(item => item.ProductKey == var.ProductKey).FirstOrDefault(); if (sp.ProductName != "") { var rp = sp.ProductAttributes.Where(item => item.AttributeType == QIQOAttributeType.Product_PRODBASE).FirstOrDefault(); //var dq = sp[0].ProductAttributes.Where(item => item.AttributeType == QIQOAttributeType.Product_PRODDFQTY).ToList(); //var.ProductKey = sp[0].ProductKey; //var.Product = sp; var.AccountKey = Account.AccountKey; var.FeeScheduleTypeCode = "F"; var.FeeScheduleValue = decimal.Parse(rp.AttributeValue); var.FeeScheduleStartDate = DateTime.Today; var.FeeScheduleEndDate = DateTime.Today.AddYears(2); var.ProductCode = sp.ProductCode; var.ProductDesc = sp.ProductDesc; } } } }
public static Biller updateFeeSchdule(BizPortalSessionContext context, Biller biller, IList <FeeBracket> updateBrackets) { FeeSchedule feeSchedule = biller.CurrentFeeSchedule.FeeSchedule; foreach (FeeBracket orginalBracket in feeSchedule.Brackets) { foreach (FeeBracket updateBracket in updateBrackets) { if (orginalBracket.BracketedRateID == updateBracket.BracketedRateID) { orginalBracket.LowerBound = updateBracket.LowerBound; orginalBracket.UpperBound = updateBracket.UpperBound; orginalBracket.Rate.SenderFeeRate.FixedAmount = updateBracket.Rate.SenderFeeRate.FixedAmount; orginalBracket.Rate.SenderFeeRate.PercentageRate = updateBracket.Rate.SenderFeeRate.PercentageRate; orginalBracket.Rate.SenderFeeRate.MinAmount = updateBracket.Rate.SenderFeeRate.MinAmount; orginalBracket.Rate.SenderFeeRate.MaxAmount = updateBracket.Rate.SenderFeeRate.MaxAmount; orginalBracket.Rate.ReceiverFeeRate.FixedAmount = updateBracket.Rate.ReceiverFeeRate.FixedAmount; orginalBracket.Rate.ReceiverFeeRate.PercentageRate = updateBracket.Rate.ReceiverFeeRate.PercentageRate; orginalBracket.Rate.ReceiverFeeRate.MinAmount = updateBracket.Rate.ReceiverFeeRate.MinAmount; orginalBracket.Rate.ReceiverFeeRate.MaxAmount = updateBracket.Rate.ReceiverFeeRate.MaxAmount; break; } } } biller.Persist(context); return(biller); }
private void EditFeeSchedule() { if (FeeSelectedItem is FeeScheduleWrapper fee_to_edit) { FeeSchedule fee_copy = fee_to_edit.Model.Copy(); ChangeFeeSchedule(fee_copy, ApplicationStrings.NotificationEdit); } }
public bool FeeScheduleDelete(FeeSchedule fee_schedule) { return(ExecuteFaultHandledOperation(() => { var fee_schedule_data = _fee_sched_es.Map(fee_schedule); _fee_schedule_repo.Delete(fee_schedule_data); return true; })); }
private void EditFeeSchedule() { var fee_to_edit = FeeSelectedItem as FeeScheduleWrapper; if (fee_to_edit != null) { FeeSchedule fee_copy = fee_to_edit.Model.Copy(); ChangeFeeSchedule(fee_copy, ApplicationStrings.NotificationEdit); } }
public FeeScheduleData Map(FeeSchedule feeSchedule) => new FeeScheduleData() { FeeScheduleKey = feeSchedule.FeeScheduleKey, CompanyKey = feeSchedule.CompanyKey, AccountKey = feeSchedule.AccountKey, ProductKey = feeSchedule.ProductKey, FeeScheduleStartDate = feeSchedule.FeeScheduleStartDate, FeeScheduleEndDate = feeSchedule.FeeScheduleEndDate, FeeScheduleType = feeSchedule.FeeScheduleTypeCode, FeeScheduleValue = feeSchedule.FeeScheduleValue };
/// <inheritdoc/> public string ToDelimitedString() { CultureInfo culture = CultureInfo.CurrentCulture; return(string.Format( culture, StringHelper.StringFormatSequence(0, 44, Configuration.FieldSeparator), Id, SetIdFt1.HasValue ? SetIdFt1.Value.ToString(culture) : null, TransactionId, TransactionBatchId, TransactionDate?.ToDelimitedString(), TransactionPostingDate.HasValue ? TransactionPostingDate.Value.ToString(Consts.DateTimeFormatPrecisionSecond, culture) : null, TransactionType?.ToDelimitedString(), TransactionCode?.ToDelimitedString(), TransactionDescription, TransactionDescriptionAlt, TransactionQuantity.HasValue ? TransactionQuantity.Value.ToString(Consts.NumericFormat, culture) : null, TransactionAmountExtended?.ToDelimitedString(), TransactionAmountUnit?.ToDelimitedString(), DepartmentCode?.ToDelimitedString(), HealthPlanId?.ToDelimitedString(), InsuranceAmount?.ToDelimitedString(), AssignedPatientLocation?.ToDelimitedString(), FeeSchedule?.ToDelimitedString(), PatientType?.ToDelimitedString(), DiagnosisCodeFt1 != null ? string.Join(Configuration.FieldRepeatSeparator, DiagnosisCodeFt1.Select(x => x.ToDelimitedString())) : null, PerformedByCode != null ? string.Join(Configuration.FieldRepeatSeparator, PerformedByCode.Select(x => x.ToDelimitedString())) : null, OrderedByCode != null ? string.Join(Configuration.FieldRepeatSeparator, OrderedByCode.Select(x => x.ToDelimitedString())) : null, UnitCost?.ToDelimitedString(), FillerOrderNumber?.ToDelimitedString(), EnteredByCode != null ? string.Join(Configuration.FieldRepeatSeparator, EnteredByCode.Select(x => x.ToDelimitedString())) : null, ProcedureCode?.ToDelimitedString(), ProcedureCodeModifier != null ? string.Join(Configuration.FieldRepeatSeparator, ProcedureCodeModifier.Select(x => x.ToDelimitedString())) : null, AdvancedBeneficiaryNoticeCode?.ToDelimitedString(), MedicallyNecessaryDuplicateProcedureReason?.ToDelimitedString(), NdcCode?.ToDelimitedString(), PaymentReferenceId?.ToDelimitedString(), TransactionReferenceKey != null ? string.Join(Configuration.FieldRepeatSeparator, TransactionReferenceKey.Select(x => x.ToString(Consts.NumericFormat, culture))) : null, PerformingFacility != null ? string.Join(Configuration.FieldRepeatSeparator, PerformingFacility.Select(x => x.ToDelimitedString())) : null, OrderingFacility?.ToDelimitedString(), ItemNumber?.ToDelimitedString(), ModelNumber, SpecialProcessingCode != null ? string.Join(Configuration.FieldRepeatSeparator, SpecialProcessingCode.Select(x => x.ToDelimitedString())) : null, ClinicCode?.ToDelimitedString(), ReferralNumber?.ToDelimitedString(), AuthorizationNumber?.ToDelimitedString(), ServiceProviderTaxonomyCode?.ToDelimitedString(), RevenueCode?.ToDelimitedString(), PrescriptionNumber, NdcQtyAndUom?.ToDelimitedString() ).TrimEnd(Configuration.FieldSeparator.ToCharArray())); }
public int FeeScheduleSave(FeeSchedule fee_schedule) { if (fee_schedule == null) { throw new ArgumentNullException(nameof(fee_schedule)); } return(ExecuteFaultHandledOperation(() => { var prod_data = _fee_sched_es.Map(fee_schedule); return _fee_schedule_repo.Insert(prod_data); })); }
private void AddFeeSchedule() { var fee_to_edit = new FeeSchedule() { FeeScheduleStartDate = DateTime.Today, FeeScheduleEndDate = DateTime.Today.AddYears(5), FeeScheduleTypeCode = "F", CompanyKey = CurrentCompanyKey, AccountKey = Account.AccountKey }; ChangeFeeSchedule(fee_to_edit, ApplicationStrings.NotificationAdd); }
private void SetFeeSchedule(FeeSchedule feeSchedule) { if (feeSchedule == null) { throw new ArgumentNullException(nameof(feeSchedule)); } var existingSchedule = FeeSchedules.FirstOrDefault(a => a.Product.ProductCode == feeSchedule.Product.ProductCode); if (existingSchedule != null) { FeeSchedules.Remove(existingSchedule); } FeeSchedules.Add(new FeeScheduleViewModel(feeSchedule)); }
public void fee_schedule_insert_new() { FeeSchedule newObject = new FeeSchedule(); Mock <IBusinessEngineFactory> mockBusinessEngineFactory = new Mock <IBusinessEngineFactory>(); mockBusinessEngineFactory.Setup(mock => mock.GetBusinessEngine <IFeeScheduleBusinessEngine>().FeeScheduleSave(newObject)).Returns(123); FeeScheduleService service = new FeeScheduleService(mockBusinessEngineFactory.Object); int update_ret_val = service.CreateFeeSchedule(newObject); Assert.IsTrue(update_ret_val == 123); }
public FeeScheduleViewModel(FeeSchedule feeSchedule) { if (feeSchedule == null) { throw new ArgumentNullException(nameof(feeSchedule)); } FeeScheduleId = feeSchedule.FeeScheduleId; CompanyId = feeSchedule.CompanyId; FeeScheduleStartDate = feeSchedule.FeeScheduleStartDate; FeeScheduleEndDate = feeSchedule.FeeScheduleEndDate; FeeScheduleTypeCode = feeSchedule.FeeScheduleTypeCode; FeeScheduleValue = feeSchedule.FeeScheduleValue; ProductDesc = feeSchedule.ProductDesc; SetProduct(feeSchedule.Product); }
/// <summary> /// Event driven loading for updating the FeeModel and SelectedVersion properties with the currently open record search. /// </summary> private void LoadFeeData() { _isLoaded = false; FeeSchedule fs = Versions.Where(v => v.Version == _rs.CurrentRecordSearch.Fee.FeeVersion).First(); if (fs != null) { SelectedVersion = fs; if (_rs.CurrentRecordSearch != null && _rs.CurrentRecordSearch.Fee != null) { FeeModel = _rs.CurrentRecordSearch.Fee; } } _isLoaded = true; }
private void ChangeFeeSchedule(FeeSchedule schedule, string action) { var fee_to_edit = schedule as FeeSchedule; if (fee_to_edit != null) { ItemEditNotification notification = new ItemEditNotification(fee_to_edit); notification.Title = action + " Fee Schedule"; //+ emp_to_edit.PersonCode + " - " + emp_to_edit.PersonFullNameFML; EditFeeScheduledRequest.Raise(notification, r => { if (r != null && r.Confirmed && r.EditibleObject != null) // { FeeSchedule fee = r.EditibleObject as FeeSchedule; if (fee != null) { // We need to actually add the fee shedule to something if (action == ApplicationStrings.NotificationEdit) { var fee_to_change = FeeSelectedItem as FeeScheduleWrapper; if (fee_to_change != null) { //fee_to_change.CompanyKey = fee.CompanyKey; //fee_to_change.FeeScheduleKey = fee.FeeScheduleKey; fee_to_change.FeeScheduleStartDate = fee.FeeScheduleStartDate; fee_to_change.FeeScheduleEndDate = fee.FeeScheduleEndDate; fee_to_change.FeeScheduleTypeCode = fee.FeeScheduleTypeCode; fee_to_change.FeeScheduleValue = fee.FeeScheduleValue; //fee_to_change.AccountKey = fee.AccountKey; //fee_to_change.Product.ProductCode = fee.Product.ProductCode; //fee_to_change.Product.ProductDesc = fee.Product.ProductDesc; //fee_to_change.Product.ProductKey = fee.Product.ProductKey; fee_to_change.ProductCode = fee.ProductCode; fee_to_change.ProductDesc = fee.ProductDesc; fee_to_change.ProductKey = fee.ProductKey; } } else { Account.FeeSchedules.Add(new FeeScheduleWrapper(fee)); } } } }); } }
public FeeSchedule GetFeeScheduleByID(int fee_schedule_key) { Log.Info("Accessing FeeScheduleBusinessEngine GetFeeScheduleByID function"); return(ExecuteFaultHandledOperation(() => { var fee_schedule_data = _fee_schedule_repo.GetByID(fee_schedule_key); Log.Info("FeeScheduleBusinessEngine GetByID function completed"); if (fee_schedule_data.FeeScheduleKey != 0) { FeeSchedule fee_schedule = _fee_sched_es.Map(fee_schedule_data); return fee_schedule; } else { NotFoundException ex = new NotFoundException($"FeeSchedule with key {fee_schedule_key} is not in database"); throw new FaultException <NotFoundException>(ex, ex.Message); } })); }
/// <summary> /// Gathers the metadata for all fee structure documents in the appropriate directory. /// </summary> public void LoadFeeStructures() { var currentDirectory = Directory.GetCurrentDirectory(); var filePath = Path.Combine(currentDirectory, @"Resources\FeeStructures\"); var feeStructures = Directory.GetFiles(filePath); foreach (string path in feeStructures) { XElement xmlFile = XElement.Load(path); FeeSchedule newItem = (from fs in xmlFile.Descendants("Meta") select new FeeSchedule( path, (string)fs.Element("Version"), (string)fs.Element("Name"), DateTime.Parse((string)fs.Element("Date")) ) ).Single(); Versions.Add(newItem); } }
public List <FeeSchedule> GetFeeSchedulesByProduct(Product product) { if (product == null) { throw new ArgumentNullException(nameof(product)); } return(ExecuteFaultHandledOperation(() => { var fee_schedules = new List <FeeSchedule>(); var prod = new ProductData() { ProductKey = product.ProductKey }; var fee_schedule_data = _fee_schedule_repo.GetAll(prod); foreach (FeeScheduleData fee_sched in fee_schedule_data) { FeeSchedule fee_schedule = _fee_sched_es.Map(fee_sched); fee_schedules.Add(fee_schedule); } return fee_schedules; })); }
public List <FeeSchedule> GetFeeSchedulesByAccount(Account account) { if (account == null) { throw new ArgumentNullException(nameof(account)); } return(ExecuteFaultHandledOperation(() => { var fee_schedules = new List <FeeSchedule>(); var acct = new AccountData() { AccountKey = account.AccountKey }; var fee_schedule_data = _fee_schedule_repo.GetAll(acct); foreach (FeeScheduleData fee_sched in fee_schedule_data) { FeeSchedule fee_schedule = _fee_sched_es.Map(fee_sched); fee_schedules.Add(fee_schedule); } return fee_schedules; })); }
public Task <int> CreateFeeScheduleAsync(FeeSchedule fee_schedule) { return(channel.CreateFeeScheduleAsync(fee_schedule)); }
public int CreateFeeSchedule(FeeSchedule fee_schedule) { return(channel.CreateFeeSchedule(fee_schedule)); }
public FeeSchedule FetchClientFeeScheduleInfo(FeeSchedule getClientFeeScheduleInfo, SafeDataReader dr) { getClientFeeScheduleInfo.ID = dr.GetInt32("ID"); // getClientFeeScheduleInfo.CFMID = dr.GetInt32("CFMID"); getClientFeeScheduleInfo.ClientCode = dr.GetString("ClientCode"); getClientFeeScheduleInfo.FeeCode = dr.GetString("FeeCode"); getClientFeeScheduleInfo.FromDate = dr.GetString("FromDate"); getClientFeeScheduleInfo.ToDate = dr.GetString("ToDate"); getClientFeeScheduleInfo.Amount = dr.GetDecimal("Amount"); getClientFeeScheduleInfo.Status = dr.GetString("Status"); getClientFeeScheduleInfo.FromDateStatus = dr.GetString("FromDateStatus"); getClientFeeScheduleInfo.ToDateStatus = dr.GetString("ToDateStatus"); if (getClientFeeScheduleInfo.FromDateStatus == "1") { getClientFeeScheduleInfo.FDateStatus = true; } else getClientFeeScheduleInfo.FDateStatus = false; if (getClientFeeScheduleInfo.ToDateStatus == "1") { getClientFeeScheduleInfo.TDateStatus = true; } else getClientFeeScheduleInfo.TDateStatus = false; return getClientFeeScheduleInfo; }
public FeeSchedule FetchClientScheduleGapInfo(FeeSchedule getClientScheduleGapInfo, SafeDataReader dr) { getClientScheduleGapInfo.SNO = dr.GetInt32("new_id"); getClientScheduleGapInfo.FromDate = dr.GetDateTime("start_date").ToString("dd MMM yyyy"); getClientScheduleGapInfo.ToDate = dr.GetDateTime("end_date").ToString("dd MMM yyyy"); getClientScheduleGapInfo.Duration = dr.GetInt32("NoofDays"); return getClientScheduleGapInfo; }
/// <summary> /// Description : Gap analysis by FeeCode and ClientCode. /// Created By : Shiva /// Created Date : 15 July 2014 /// Modified By : /// Modified Date: /// </summary> public static BillingInfo GetClientScheduleGapByFeeAndClientCode(string FeeCode, int ClientCode, string SourceID) { var GetGapInfo = new BillingInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[3]; sqlParams[0] = new SqlParameter("@ClientCode", ClientCode); sqlParams[1] = new SqlParameter("@SourceID", @SourceID); sqlParams[2] = new SqlParameter("@FeeCode", FeeCode); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetClientScheduleMapGapAnalysisByCodes_Club", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var GapInfo = new FeeSchedule(); GapInfo.FetchClientScheduleGapInfo(GapInfo, safe); GetGapInfo.ClientFeeScheduleList.Add(GapInfo); } return GetGapInfo; } catch (Exception ex) { log.Error("Error: " + ex); return GetGapInfo; } finally { log.Debug("End: " + methodBase.Name); } }
public void SaveFeeSchedule(FeeSchedule fee_schedule) { ExecuteHandledOperation(() => { return(_feeScheduleRepository.Save(_feeScheduleEntityService.Map(fee_schedule))); }); }
/// <summary> /// Internal constructor, used by the library to create an /// initialized exchange rates object. /// </summary> /// <param name="current">Current Exchange Rate</param> /// <param name="next">Next Exchange Rate</param> internal FeeSchedules(FeeSchedule current, FeeSchedule next) { Current = current; Next = next; }
public Task DeleteFeeScheduleAsync(FeeSchedule fee_schedule) { return(Task.Run(() => DeleteFeeSchedule(fee_schedule))); }
public void DeleteFeeSchedule(FeeSchedule fee_schedule) { ExecuteHandledOperation(() => { _feeScheduleRepository.Delete(_feeScheduleEntityService.Map(fee_schedule)); }); }
public Task SaveFeeScheduleAsync(FeeSchedule fee_schedule) { return(Task.Run(() => SaveFeeSchedule(fee_schedule))); }
public bool DeleteFeeSchedule(FeeSchedule fee_schedule) { return(channel.DeleteFeeSchedule(fee_schedule)); }
public Task <bool> DeleteFeeScheduleAsync(FeeSchedule fee_schedule) { return(channel.DeleteFeeScheduleAsync(fee_schedule)); }
public bool DeleteFeeSchedule(FeeSchedule fee_schedule) { IFeeScheduleBusinessEngine fee_schedule_be = _business_engine_factory.GetBusinessEngine <IFeeScheduleBusinessEngine>(); return(fee_schedule_be.FeeScheduleDelete(fee_schedule)); }