Skip to content

Commit

Permalink
Added more fields to HealthRisk objects, ref IFRCGo#33
Browse files Browse the repository at this point in the history
  • Loading branch information
roarfred committed Oct 1, 2017
1 parent 73e6c36 commit e5cf382
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 575 deletions.
7 changes: 7 additions & 0 deletions Source/Admin/Events/HealthRiskCreated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,12 @@ public class HealthRiskCreated : IEvent
{
public Guid Id { get; set; }
public string Name { get; set; }
public int ReadableId { get; set; }
public int? Threshold { get; set; }
public string ConfirmedCase { get; set; }
public string Note { get; set; }
public string SuspectedCase { get; set; }
public string ProbableCase { get; set; }
public string CommunityCase { get; set; }
}
}
7 changes: 7 additions & 0 deletions Source/Admin/Read/HealthRisk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@ public class HealthRisk
{
public Guid Id { get; set; }
public string Name { get; set; }
public int ReadableId { get; set; }
public int? Threshold { get; set; }
public string ConfirmedCase { get; set; }
public string Note { get; set; }
public string SuspectedCase { get; set; }
public string ProbableCase { get; set; }
public string CommunityCase { get; set; }
}
}
9 changes: 8 additions & 1 deletion Source/Admin/Read/HealthRiskCreatedProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ public void Process(HealthRiskCreated @event)
var healthRisk = new HealthRisk()
{
Id = @event.Id,
Name = @event.Name
Name = @event.Name,
ReadableId = @event.ReadableId,
Threshold = @event.Threshold,
ConfirmedCase = @event.ConfirmedCase,
Note = @event.Note,
ProbableCase = @event.ProbableCase,
CommunityCase = @event.CommunityCase,
SuspectedCase = @event.SuspectedCase
};
_healthRisks.Save(healthRisk);
}
Expand Down
Loading

0 comments on commit e5cf382

Please sign in to comment.