-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #799 from CareTogether/date-only-monitoring-requir…
…ements Calculate monitoring requirements as dateonly (Fixes #558)
- Loading branch information
Showing
19 changed files
with
1,936 additions
and
1,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": 1, | ||
"isRoot": true, | ||
"tools": { | ||
"csharpier": { | ||
"version": "0.29.2", | ||
"commands": [ | ||
"dotnet-csharpier" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"useTabs": false, | ||
"tabWidth": 4, | ||
"endOfLine": "auto" | ||
} |
21 changes: 21 additions & 0 deletions
21
src/CareTogether.Core/Engines/PolicyEvaluation/ChildLocation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
|
||
namespace CareTogether.Engines.PolicyEvaluation; | ||
|
||
public sealed record ChildLocation( | ||
Guid ChildLocationFamilyId, | ||
DateOnly Date, | ||
bool Paused // means "from now on, we stop checking for completion until resuming" | ||
) | ||
: IComparable<ChildLocation> | ||
{ | ||
public int CompareTo(ChildLocation? other) | ||
{ | ||
return other == null | ||
? 1 | ||
: DateTime.Compare( | ||
new DateTime(Date, new TimeOnly()), | ||
new DateTime(other.Date, new TimeOnly()) | ||
); | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/CareTogether.Core/Engines/PolicyEvaluation/DateOfInterest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using System; | ||
|
||
//NOTE: If there are ever more than two options, IsMissing should become an enum. | ||
public sealed record DateOfInterest(DateOnly Date, bool IsMissing); |
1,156 changes: 716 additions & 440 deletions
1,156
src/CareTogether.Core/Engines/PolicyEvaluation/ReferralCalculations.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.