Skip to content

Instantly share code, notes, and snippets.

@ndonolli
Last active June 4, 2020 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndonolli/8b71007ff3e27a00f5eb46712b8199bb to your computer and use it in GitHub Desktop.
Save ndonolli/8b71007ff3e27a00f5eb46712b8199bb to your computer and use it in GitHub Desktop.
(defn contraindications [meds pairs]
(let [meds-set (set (map :rxNorm meds))
contains-pair? (partial every? meds-set)]
(->> pairs (filter contains-pair?) not-empty)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment