public void SubmitClaimRequest(SubmitClaimRequest command, ICompaniesReadModel companyService) { //if claim amount does not match co-pay amount, then hold pending //verification (receive supporting documentation) from the participant. IEnumerable <CopayInfo> copayList = companyService.GetCopayBy(command.CompanyId); if (copayList.Any(copay => copay.CopayAmount.Dollars() == command.Amount.Dollars() && copay.ClaimType == command.ClaimType)) { //then this is a recognized copay - we dont need any substantiation RaiseClaimRequestAutoSubstantiatedEvent(command); } else { //else, we need some substantiation from the participant RaiseClaimRequestCreatedPendingVerificationEvent(command); } }
public void SubmitClaimRequest(SubmitClaimRequest command, ICompaniesReadModel companyService) { //if claim amount does not match co-pay amount, then hold pending //verification (receive supporting documentation) from the participant. IEnumerable<CopayInfo> copayList = companyService.GetCopayBy(command.CompanyId); if (copayList.Any(copay => copay.CopayAmount.Dollars() == command.Amount.Dollars() && copay.ClaimType == command.ClaimType)) { //then this is a recognized copay - we dont need any substantiation RaiseClaimRequestAutoSubstantiatedEvent(command); } else { //else, we need some substantiation from the participant RaiseClaimRequestCreatedPendingVerificationEvent(command); } }
public SubmitClaimRequestCommandHandler(IRepository <ClaimRequest> repository, ICompaniesReadModel companiesService) : base(command => Guid.Parse(command.ClaimRequestId)) { _repository = repository; _companiesService = companiesService; }
public BenefitsController(ISendCommandsAndWaitForAResponse commandSender, IBenefitsReadModel benefitsReadModel, ICompaniesReadModel companiesReadModel) { _commandSender = commandSender; _benefitsReadModel = benefitsReadModel; _companiesReadModel = companiesReadModel; }
public PlansController(ICompaniesReadModel companiesReadModel, ISendCommandsAndWaitForAResponse commandSender) { _companiesReadModel = companiesReadModel; _commandSender = commandSender; }
public ElectionsController(IElectionsReadModel electionsReadModel, ICompaniesReadModel companiesReadModel, ISendCommandsAndWaitForAResponse commandSender) { _electionsReadModel = electionsReadModel; _companiesReadModel = companiesReadModel; _commandSender = commandSender; }
public PlansController(ICompaniesReadModel companiesReadModel, ISendCommandsAndWaitForAResponse commandSender) { _companiesReadModel = companiesReadModel; _commandSender = commandSender; }
public BenefitsController(ISendCommandsAndWaitForAResponse commandSender, IBenefitsReadModel benefitsReadModel, ICompaniesReadModel companiesReadModel) { _commandSender = commandSender; _benefitsReadModel = benefitsReadModel; _companiesReadModel = companiesReadModel; }
public ElectionsController(IElectionsReadModel electionsReadModel, ICompaniesReadModel companiesReadModel, ISendCommandsAndWaitForAResponse commandSender) { _electionsReadModel = electionsReadModel; _companiesReadModel = companiesReadModel; _commandSender = commandSender; }