Last active
April 2, 2016 23:14
-
-
Save TerribleDev/99caa1ceb84120610ef1bc1c47f84a3b to your computer and use it in GitHub Desktop.
rewrite
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
private IEnumerable<string> DetermineListOfAllergicMedications(List<string> medications, Dictionary<string, bool> lookupPatientsKnownAllergies) | |
{ | |
return | |
medications | |
.Where(a => allergyLookup.ContainsKey(a)) | |
.Select(a => new Tuple<string, List<string>>(a, allergyLookup[a])) | |
.Where(a => a.Item2.Any(c => lookupPatientsKnownAllergies.ContainsKey(c))) | |
.Select(a => a.Item1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment