Improve dynamic question learning loop
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using QuestionsApi.Models;
|
||||
|
||||
namespace QuestionsApi.Services;
|
||||
|
||||
public static class DynamicBlueprintCoveragePolicy
|
||||
{
|
||||
private static readonly Dictionary<string, double> SystemWeights =
|
||||
new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["Nutrition"] = 17.5,
|
||||
["Biostatistics"] = 12,
|
||||
["Cardiovascular"] = 10,
|
||||
["Neurologic"] = 9,
|
||||
["Nervous System"] = 9,
|
||||
["Pulmonary"] = 9,
|
||||
["Respiratory"] = 9,
|
||||
["Pregnancy"] = 8,
|
||||
["Social Sciences"] = 8,
|
||||
["Gastrointestinal"] = 7,
|
||||
["Immune System"] = 7,
|
||||
["Hematology"] = 7,
|
||||
["Multisystem"] = 7,
|
||||
["Infectious Disease"] = 7,
|
||||
["Endocrine"] = 6,
|
||||
["Musculoskeletal"] = 6,
|
||||
["Behavioral Health"] = 5,
|
||||
["Renal"] = 5,
|
||||
["Skin"] = 5,
|
||||
["Human Development"] = 2
|
||||
};
|
||||
|
||||
public static double Weight(DynamicQuestionBlueprint blueprint)
|
||||
{
|
||||
if (blueprint.BlueprintWeight > 0) return blueprint.BlueprintWeight;
|
||||
return SystemWeights.GetValueOrDefault(blueprint.System, 5);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user