Skip to content

Commit

Permalink
Avoid using with-historical routinely
Browse files Browse the repository at this point in the history
Allow clients to choose whether to use with-historical on a case-by-case basis.
  • Loading branch information
wardle committed Nov 27, 2022
1 parent 8a08605 commit 1bdf40a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/eldrix/codelists/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
(defn to-icd10
"Map a collection of concept identifiers to a set of ICD-10 codes."
[{:com.eldrix/keys [hermes]} concept-ids]
(->> (hermes/with-historical hermes concept-ids)
(->> concept-ids
(mapcat #(hermes/get-component-refset-items hermes % 447562003))
(map :mapTarget)
(filter identity)
Expand All @@ -112,7 +112,7 @@
but cannot map from TF concepts. As such, this checks whether the product is
a TF concept id, and simply uses the VMPs instead."
[{:com.eldrix/keys [hermes dmd] :as system} concept-ids]
(->> (hermes/with-historical hermes concept-ids)
(->> concept-ids
(mapcat (fn [concept-id]
(if (is-trade-family? system concept-id)
(distinct (map #(dmd/atc-for-product dmd %) (hermes/get-child-relationships-of-type hermes concept-id snomed/IsA)))
Expand Down

0 comments on commit 1bdf40a

Please sign in to comment.