Exemple #1
0
        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);
            }
        }
Exemple #3
0
 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;
 }
Exemple #5
0
 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;
 }
Exemple #9
0
 public ElectionsController(IElectionsReadModel electionsReadModel, ICompaniesReadModel companiesReadModel, ISendCommandsAndWaitForAResponse commandSender)
 {
     _electionsReadModel = electionsReadModel;
     _companiesReadModel = companiesReadModel;
     _commandSender      = commandSender;
 }