Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Pathom fixes #19

Merged
merged 1 commit into from
May 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/com/eldrix/hermes/graph.clj
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
(pco/defresolver concept-historical-associations
[{::keys [svc]} {:info.snomed.Concept/keys [id]}]
{::pco/output [{:info.snomed.Concept/historicalAssociations
[{:info.snomed.Concept/id [[:info.snomed.Concept/id]]}]}]}
[{:info.snomed.Concept/id [:info.snomed.Concept/id]}]}]}
{:info.snomed.Concept/historicalAssociations
(reduce-kv (fn [m k v] (assoc m {:info.snomed.Concept/id k}
(map #(hash-map :info.snomed.Concept/id (:targetComponentId %)) v)))
Expand All @@ -167,15 +167,15 @@
(pco/defresolver concept-same-as
"Returns multiple concepts that this concept is now thought to the same as."
[{::keys [svc]} {:info.snomed.Concept/keys [id]}]
{::pco/output [{:info.snomed.Concept/sameAs [[:info.snomed.Concept/id]]}]}
{::pco/output [{:info.snomed.Concept/sameAs [:info.snomed.Concept/id]}]}
(when-let [replacements (seq (filter :active (hermes/get-component-refset-items svc id snomed/SameAsReferenceSet)))]
{:info.snomed.Concept/sameAs
(map #(hash-map :info.snomed.Concept/id (:targetComponentId %)) replacements)}))

(pco/defresolver concept-possibly-equivalent
"Returns multiple concepts to which this concept might be possibly equivalent."
[{::keys [svc]} {:info.snomed.Concept/keys [id]}]
{::pco/output [{:info.snomed.Concept/possiblyEquivalentTo [[:info.snomed.Concept/id]]}]}
{::pco/output [{:info.snomed.Concept/possiblyEquivalentTo [:info.snomed.Concept/id]}]}
(when-let [equivalent-to (seq (filter :active (hermes/get-component-refset-items svc id snomed/PossiblyEquivalentToReferenceSet)))]
{:info.snomed.Concept/possiblyEquivalentTo
(map #(hash-map :info.snomed.Concept/id (:targetComponentId %)) equivalent-to)}))
Expand Down Expand Up @@ -219,10 +219,10 @@
[{::keys [svc]} params]
{::pco/op-name 'info.snomed.Search/search
::pco/params [:s :constraint :max-hits]
::pco/output [[:info.snomed.Description/id
:info.snomed.Concept/id
:info.snomed.Description/term
{:info.snomed.Concept/preferredDescription [:info.snomed.Description/term]}]]}
::pco/output [:info.snomed.Description/id
:info.snomed.Concept/id
:info.snomed.Description/term
{:info.snomed.Concept/preferredDescription [:info.snomed.Description/term]}]}

(map (fn [result] {:info.snomed.Description/id (:id result)
:info.snomed.Concept/id (:conceptId result)
Expand Down Expand Up @@ -339,4 +339,4 @@
:info.snomed.Concept/active
{:info.snomed.Concept/preferredDescription [:info.snomed.Description/term]}]}]}])

)
)