Пример #1
0
        public void Process(HealthRiskCreated @event)
        {
            var healthRisk = new HealthRisk
            {
                Id             = @event.Id,
                Name           = @event.Name,
                CaseDefinition = @event.CaseDefinition
            };

            _repository.Insert(healthRisk);
        }
Пример #2
0
        public void Process(CaseReportReceived @event)
        {
            var alertCount = @event.NumberOfFemalesAged5AndOlder + @event.NumberOfFemalesUnder5 + @event.NumberOfMalesAged5AndOlder + @event.NumberOfMalesUnder5;
            var weekNumber = GetWeekFromDate(@event.Timestamp.DateTime);

            var nationalSociety = new AlertsByWeek()
            {
                Year       = (short)@event.Timestamp.DateTime.Year,
                Week       = (short)weekNumber,
                AlertCount = alertCount
            };

            _repository.Insert(nationalSociety);
        }
Пример #3
0
        public void Process(HealthRiskCreated @event)
        {
            var healthRisk = new HealthRisk
            {
                Id             = @event.Id,
                Name           = @event.Name,
                ReadableId     = @event.ReadableId,
                CaseDefinition = @event.CaseDefinition,
                //ConfirmedCase = @event.ConfirmedCase,
                Note = @event.Note,
                //ProbableCase = @event.ProbableCase,
                CommunityCase = @event.CommunityCase,
                //SuspectedCase = @event.SuspectedCase,
                KeyMessage = @event.KeyMessage
            };

            _repository.Insert(healthRisk);
        }