Skip to main content

RetrieveSpecificRiskAssessmentOptionSetValueFromLabel

public int RetrieveSpecificRiskAssessmentOptionSetValueFromLabel(string targetStageSetting)
{
//TODO: remove hardcoding. use a RetrieveAttribute request and get the mapping for an input option set, then rename method accordingly

tracingService.Trace("Calling RetrieveSpecificRiskAssessmentOptionSetValueFromLabel");

// Return if no change required
Dictionary<string, int> stageMapping = new Dictionary<string, int>
{
{ "Risk routing", 206340000 },
{ "Include", 206340001 },
{ "Exclude", 206340002 }
};

if (!stageMapping.TryGetValue(targetStageSetting, out int expectedValue))
{
throw new Exception("No match in option set mapping. Exiting method.");
}

tracingService.Trace("Completed RetrieveSpecificRiskAssessmentOptionSetValueFromLabel");

return expectedValue;
}