This commit is contained in:
fuenmao
2026-11-12 15:45:52 +08:00
parent 61e25175db
commit 718b138033
30 changed files with 1511 additions and 99 deletions
@@ -4,15 +4,21 @@ namespace Evergreen.Health.Application.Health.Policies;
public sealed record RecommendedRoomRange(int Minimum, int Maximum)
{
public static RecommendedRoomRange Default { get; } = new(22, 25);
public string Display => $"{Minimum}–{Maximum}℃";
public static RecommendedRoomRange ForConstitution(string code) => code switch
{
"yang_deficient" => new(24, 26), "yin_deficient" or "damp_heat" => new(21, 24),
"phlegm_damp" => new(22, 24), "blood_stasis" => new(23, 25), _ => new(22, 25)
"phlegm_damp" => new(22, 24), "blood_stasis" => new(23, 25), _ => Default
};
}
public sealed record IndoorTemperatureSample(double? Celsius, DateTimeOffset? ObservedAt, bool Available, string Reason);
public enum IndoorTemperatureIssue { Unavailable, Stale, Invalid }
public sealed record IndoorTemperatureSample(double? Celsius, DateTimeOffset? ObservedAt, bool Available, string Reason)
{
public IndoorTemperatureIssue? Issue { get; init; }
}
public static class RoomTemperaturePolicy
{