Liking cljdoc? Tell your friends :D

com.eldrix.hermes.impl.store

Store provides access to a key value store.

Store provides access to a key value store.
raw docstring

closeclj

source

compactclj

source

extended-refset-itemclj

(extended-refset-item store
                      {:keys [refsetId] :as item}
                      &
                      {:keys [attr-ids?] :or {attr-ids? true}})

Merges a map of extended attributes to the specified reference set item. The attributes will be keyed based on information from the reference set descriptor information and known field names.

Merges a map of extended attributes to the specified reference set item.
The attributes will be keyed based on information from the reference set
descriptor information and known field names.
sourceraw docstring

get-all-childrenclj

(get-all-children store concept-id)
(get-all-children store concept-id type-id)

Returns all child concepts for the concept. It takes 3500 milliseconds on my 2013 laptop to return all child concepts of the root SNOMED CT concept, so this should only be used for more granular concepts generally, or used asynchronously / via streaming.

Parameters:

  • store
  • concept-id
  • type-id, defaults to 'IS-A' (116680003).
Returns all child concepts for the concept.
It takes 3500 milliseconds on my 2013 laptop to return all child concepts
of the root SNOMED CT concept, so this should only be used for more granular
concepts generally, or used asynchronously / via streaming.
 
 Parameters:
 - store
 - `concept-id`
 - `type-id`, defaults to 'IS-A' (116680003).
sourceraw docstring

get-all-parentsclj

(get-all-parents store concept-id)
(get-all-parents store concept-id type-id)

Returns all parent concepts for the concept, including self. Parameters:

  • store
  • concept-id
  • type-id, defaults to 'IS-A' (116680003).
Returns all parent concepts for the concept, including self.
Parameters:
- `store`
- `concept-id`
- `type-id`, defaults to 'IS-A' (116680003).
sourceraw docstring

get-child-relationships-of-typeclj

(get-child-relationships-of-type store concept-id type-concept-id)

Returns a collection of identifiers representing the parent relationships of the specified type of the specified concept.

Returns a collection of identifiers representing the parent relationships of
the specified type of the specified concept.
sourceraw docstring

get-component-refset-idsclj

source

get-component-refset-itemsclj

source

get-conceptclj

source

get-concept-descriptionsclj

source

get-descriptionclj

source

get-description-refsetsclj

(get-description-refsets store description-id)

Get the refsets and language applicability for a description.

Returns a map containing:

  • refsets : a set of refsets to which this description is a member
  • preferredIn : refsets for which this description is preferred
  • acceptableIn : refsets for which this description is acceptable.

Example:

(map #(merge % (get-description-refsets store (:id %)))
     (get-concept-descriptions store 24700007))
Get the refsets and language applicability for a description.

 Returns a map containing:
- refsets       : a set of refsets to which this description is a member
- preferredIn  : refsets for which this description is preferred
- acceptableIn : refsets for which this description is acceptable.

Example:
``` 
(map #(merge % (get-description-refsets store (:id %)))
     (get-concept-descriptions store 24700007))
```
sourceraw docstring

get-extended-conceptclj

(get-extended-concept store concept-id)

Get an extended concept for the concept specified.

Get an extended concept for the concept specified.
sourceraw docstring

get-fully-specified-nameclj

(get-fully-specified-name store concept-id)
(get-fully-specified-name store concept-id language-refset-ids fallback?)

Return the fully specified name for the concept specified. If no language preferences are provided the first description of type FSN will be returned. If language preferences are provided, but there is no match and fallback? is true, then the first description of type FSN will be returned.

Return the fully specified name for the concept specified. If no language preferences are provided the first
description of type FSN will be returned. If language preferences are provided, but there is no
match *and* `fallback?` is true, then the first description of type FSN will be returned.
sourceraw docstring

get-grouped-propertiesclj

(get-grouped-properties store concept-id)
(get-grouped-properties store concept-id type-id)

Return a concept's properties as a collection of maps, each map representing related properties in a 'relationshipGroup'. By default, all groups are returned, but this can optionally be limited to those containing a specific relationship type.

Return a concept's properties as a collection of maps, each map representing
related properties in a 'relationshipGroup'. By default, all groups are
returned, but this can optionally be limited to those containing a specific
relationship type.
sourceraw docstring

get-installed-reference-setsclj

source

get-leavesclj

(get-leaves store concept-ids)

Returns the subset of the specified concept-ids such that no member of the subset is subsumed by another member.

Parameters:

  • concept-ids : a collection of concept identifiers
Returns the subset of the specified `concept-ids` such that no member of the subset is subsumed by another member.

 Parameters:
- concept-ids  : a collection of concept identifiers
sourceraw docstring

get-parent-relationshipsclj

(get-parent-relationships store concept-id)

Returns the parent relationships of the specified concept. Returns a map key: concept-id of the relationship type (e.g. identifier representing finding site) value: a set of concept identifiers for that property.

See get-parent-relationships-expanded to get each target expanded via transitive closure tables.

Returns the parent relationships of the specified concept.
Returns a map
key: concept-id of the relationship type (e.g. identifier representing finding site)
value: a set of concept identifiers for that property.

See get-parent-relationships-expanded to get each target expanded via
transitive closure tables.
sourceraw docstring

get-parent-relationships-expandedclj

(get-parent-relationships-expanded store concept-id)
(get-parent-relationships-expanded store concept-id type-id)

Returns all of the parent relationships, expanded to include each target's transitive closure table. This makes it trivial to build queries that find all concepts with, for example, a common finding site at any level of granularity.

Returns all of the parent relationships, expanded to
include each target's transitive closure table.
This makes it trivial to build queries that find all concepts
with, for example, a common finding site at any level of granularity.
sourceraw docstring

get-parent-relationships-of-typeclj

(get-parent-relationships-of-type store concept-id type-concept-id)

Returns a collection of identifiers representing the parent relationships of the specified type of the specified concept.

Returns a collection of identifiers representing the parent relationships of
the specified type of the specified concept.
sourceraw docstring

get-parent-relationships-of-typesclj

(get-parent-relationships-of-types store concept-id type-concept-ids)
source

get-preferred-descriptionclj

(get-preferred-description store
                           concept-id
                           description-type-id
                           language-refset-id)

Return the preferred description for the concept specified as defined by the language reference set specified for the description type.

  • store :
  • concept-id :
  • description-type-id : type of description (e.g. synonym or FSN)
  • language-refset-id : language reference set

Possible description-type-ids:

 900000000000013009: synonym (core metadata concept)
 900000000000003001: fully specified name

Example language-refset-ids:

 900000000000509007: US English language reference set
 999001261000000100: UK English (clinical) language reference set
Return the preferred description for the concept specified as defined by
the language reference set specified for the description type.
- store               :
- concept-id          :
- description-type-id : type of description (e.g. synonym or FSN)
- language-refset-id  : language reference set

Possible description-type-ids:
```
 900000000000013009: synonym (core metadata concept)
 900000000000003001: fully specified name
```
Example language-refset-ids:
``` 
 900000000000509007: US English language reference set
 999001261000000100: UK English (clinical) language reference set
```
sourceraw docstring

get-preferred-fully-specified-nameclj

(get-preferred-fully-specified-name store concept-id language-refset-ids)
source

get-preferred-synonymclj

(get-preferred-synonym store concept-id language-refset-ids)

Returns the preferred synonym for the concept specified, looking in the language reference sets specified in order, returning the first 'preferred' value. The ordering of the reference set identifiers is therefore significant.

  • store : store
  • concept-id : concept-id
  • language-refset-ids : an ordered list of language reference set identifiers

Notes: We have a frustrating situation in that there are three language reference sets in the UK that might give a 'good' answer to the 'preferred' description for any given concept. 900000000000508004 : Great Britain English language reference set 999001261000000100 : NHS realm language (clinical part) 999000691000001104 : NHS Realm language (pharmacy part) (supercedes the old dm+d realm subset 30001000001134). This means that we need to be able to submit multiple language reference set identifiers.

Returns the preferred synonym for the concept specified, looking in the language reference sets
specified in order, returning the first 'preferred' value. The ordering of the reference
set identifiers is therefore significant.
- store               : store
- concept-id          : concept-id
- language-refset-ids : an ordered list of language reference set identifiers

Notes:
We have a frustrating situation in that there are three language reference sets in the UK that
might give a 'good' answer to the 'preferred' description for any given concept.
900000000000508004 : Great Britain English language reference set
999001261000000100 : NHS realm language (clinical part)
999000691000001104 : NHS Realm language (pharmacy part)  (supercedes the old dm+d realm subset 30001000001134).
This means that we need to be able to submit *multiple* language reference set identifiers.
sourceraw docstring

get-raw-child-relationshipsclj

source

get-raw-parent-relationshipsclj

source

get-refset-descriptor-attribute-idsclj

(get-refset-descriptor-attribute-ids store refset-id)

Return a vector of attribute description concept ids for the given reference set.

Return a vector of attribute description concept ids for the given reference
set.
sourceraw docstring

get-refset-descriptorsclj

(get-refset-descriptors store refset-id)
source

get-refset-field-namesclj

source

get-refset-itemclj

source

get-relationshipclj

source

get-release-informationclj

(get-release-information st)

Returns descriptions representing the installed distributions. Ordering will be by date except that the description for the 'core' module will always be first. See https://confluence.ihtsdotools.org/display/DOCTIG/4.1.+Root+and+top-level+Concepts

Returns descriptions representing the installed distributions.
Ordering will be by date except that the description for the 'core' module
will always be first.
See https://confluence.ihtsdotools.org/display/DOCTIG/4.1.+Root+and+top-level+Concepts
sourceraw docstring

get-source-association-referenced-componentsclj

source

has-property?cljmultimethod

source

history-profileclj

(history-profile st)
(history-profile st profile)

Return a sequence of reference set identifiers representing the history profile requested, or HISTORY-MAX, if not specified. See https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements

Return a sequence of reference set identifiers representing the history
profile requested, or HISTORY-MAX, if not specified.
See https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements
sourceraw docstring

indexclj

(index store)
source

is-a?cljmultimethod

source

make-extended-conceptclj

(make-extended-concept store concept)
source

open-storeclj

(open-store)
(open-store f)
(open-store f opts)
source

paths-to-rootclj

(paths-to-root store concept-id)

Return a sequence of paths from the concept to root node. Each path is a sequence of identifiers, starting with the concept itself and ending with the root node. e.g.

  (sort-by count (paths-to-root store 24700007))

result (truncated):

  ((24700007 414029004 64572001 404684003 138875005)
  (24700007 6118003 80690008 362975008 64572001 404684003 138875005)
  (24700007 39367000 23853001 246556002 118234003 404684003 138875005)
  (24700007 6118003 80690008 23853001 246556002 118234003 404684003 138875005))
Return a sequence of paths from the concept to root node.
Each path is a sequence of identifiers, starting with the concept itself
and ending with the root node.
e.g.
```
  (sort-by count (paths-to-root store 24700007))
```
result (truncated):
```
  ((24700007 414029004 64572001 404684003 138875005)
  (24700007 6118003 80690008 362975008 64572001 404684003 138875005)
  (24700007 39367000 23853001 246556002 118234003 404684003 138875005)
  (24700007 6118003 80690008 23853001 246556002 118234003 404684003 138875005))
```
sourceraw docstring

refset-countsclj

(refset-counts store)

Returns a map of reference set counts keyed by type. This simply iterates over all stored items Example results from the UK distribution:

{com.eldrix.hermes.snomed.SimpleMapRefsetItem        508618,      ;; ~4 %
 com.eldrix.hermes.snomed.LanguageRefsetItem         5829820,     ;; ~45 %
 com.eldrix.hermes.snomed.ExtendedMapRefsetItem      1858024,     ;; ~14 %
 com.eldrix.hermes.snomed.SimpleRefsetItem           1972073,     ;; ~15 %
 com.eldrix.hermes.snomed.AttributeValueRefsetItem   1261587,     ;; ~10 %
 com.eldrix.hermes.snomed.AssociationRefsetItem      1263064,     ;; ~10 %
 com.eldrix.hermes.snomed.RefsetDescriptorRefsetItem 1131}        ;; 0.01 %
 ```.
Returns a map of reference set counts keyed by type.
This simply iterates over all stored items
Example results from the UK distribution:
```
{com.eldrix.hermes.snomed.SimpleMapRefsetItem        508618,      ;; ~4 %
 com.eldrix.hermes.snomed.LanguageRefsetItem         5829820,     ;; ~45 %
 com.eldrix.hermes.snomed.ExtendedMapRefsetItem      1858024,     ;; ~14 %
 com.eldrix.hermes.snomed.SimpleRefsetItem           1972073,     ;; ~15 %
 com.eldrix.hermes.snomed.AttributeValueRefsetItem   1261587,     ;; ~10 %
 com.eldrix.hermes.snomed.AssociationRefsetItem      1263064,     ;; ~10 %
 com.eldrix.hermes.snomed.RefsetDescriptorRefsetItem 1131}        ;; 0.01 %
 ```.
sourceraw docstring

reify-refset-itemclj

(reify-refset-item store item)

Reifies a refset item when possible, turning it into a concrete class. Suitable for use at import as long as refset descriptor refsets have already been imported.

Reifies a refset item when possible, turning it into a concrete class.
Suitable for use at import as long as refset descriptor refsets have already
been imported.
sourceraw docstring

source-associationsclj

source

source-historicalclj

(source-historical st component-id)
(source-historical st component-id refset-ids)

Return the requested historical associations for the component of types as defined by refset-ids, or all association refsets if omitted.

Return the requested historical associations for the component of types as
defined by refset-ids, or all association refsets if omitted.
sourceraw docstring

statusclj

source

stream-all-conceptsclj

source

stream-all-refset-itemsclj

source

transitive-synonymsclj

(transitive-synonyms store concept-id)
(transitive-synonyms store concept-id {:keys [include-inactive?]})

Returns all of the synonyms of the specified concept, including those of its descendants.

Returns all of the synonyms of the specified concept, including those
of its descendants.
sourceraw docstring

with-historicalclj

(with-historical st concept-ids)
(with-historical st concept-ids assoc-refset-ids)

For a given sequence of concept identifiers, expand to include historical associations both backwards and forwards in time.

For a currently active concept, this will return historic inactivated concepts in which it is the target. For a now inactive concept, this will return the active associations and their historic associations.

By default, all types of historical associations except MoveTo and MovedFrom are included, but this is configurable.

For a given sequence of concept identifiers, expand to include historical
associations both backwards and forwards in time.

For a currently active concept, this will return historic inactivated concepts
in which it is the target. For a now inactive concept, this will return the
active associations and their historic associations.

By default, all types of historical associations except MoveTo and MovedFrom
are included, but this is configurable. 
sourceraw docstring

write-batchcljmultimethod

Write a batch of SNOMED components to the store. Returns nil. Parameters:

  • batch - a map containing :type and :data keys
  • store - SNOMED CT store implementation
Write a batch of SNOMED components to the store. Returns nil.
Parameters:
- batch - a map containing :type and :data keys
- store - SNOMED CT store implementation
sourceraw docstring

write-batch-one-by-oneclj

(write-batch-one-by-one batch store)

Write out a batch one item at a time.

Write out a batch one item at a time. 
sourceraw docstring

write-batch-with-fallbackclj

(write-batch-with-fallback batch store)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close