Liking cljdoc? Tell your friends :D

com.eldrix.hermes.core

Provides a terminology service, wrapping the SNOMED store and search implementations as a single unified service.

Provides a terminology service, wrapping the SNOMED store and
search implementations as a single unified service.
raw docstring

active-association-targetsclj

(active-association-targets svc component-id refset-id)

Return the active association targets for a given component.

Return the active association targets for a given component.
sourceraw docstring

all-transitive-synonymsclj

(all-transitive-synonyms svc params)

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

Parameters:

  • svc : hermes service

  • params : search parameters to select concepts; one of:

      - a map        : search parameters as per [[search]]
      - a string     : a string containing an ECL expression
      - a collection : a collection of concept identifiers
    
Returns all synonyms of the specified concepts, including those of its
descendants.

Parameters:
- svc    : hermes service
- params : search parameters to select concepts; one of:

        - a map        : search parameters as per [[search]]
        - a string     : a string containing an ECL expression
        - a collection : a collection of concept identifiers
sourceraw docstring

are-any?clj

(are-any? svc concept-ids parent-ids)

Are any of the concept-ids subsumed by any of the parent-ids?

Checks the is-a relationships of the concepts in question against the set of parent identifiers.

Are any of the concept-ids subsumed by any of the parent-ids?

Checks the is-a relationships of the concepts in question against the set of
parent identifiers.
sourceraw docstring

build-search-indexcljdeprecated

DEPRECATED: Use build-search-indices instead

DEPRECATED: Use [[build-search-indices]] instead
sourceraw docstring

build-search-indicescljdeprecated

DEPRECATED: Use [[build-indices]] instead

DEPRECATED: Use [[build-indices]] instead
sourceraw docstring

closeclj

(close svc)
source

compactclj

(compact root)
source

create-serviceclj

(create-service root import-from)
(create-service root import-from locale-preference-string)

Create a terminology service combining both store and search functionality in a single step. It would be unusual to use this; usually each step would be performed interactively by an end-user.

Create a terminology service combining both store and search functionality
in a single step. It would be unusual to use this; usually each step would be
performed interactively by an end-user.
sourceraw docstring

ecl-contains?cljdeprecated

(ecl-contains? svc concept-ids ecl)

DEPRECATED: use intersect-ecl instead.

Do any of the concept-ids satisfy the constraint expression specified? This is an alternative to expanding the valueset and then checking membership.

DEPRECATED: use `intersect-ecl` instead.

Do any of the concept-ids satisfy the constraint expression specified?
This is an alternative to expanding the valueset and then checking membership.
sourceraw docstring

expand-eclclj

(expand-ecl svc ecl)

Expand an ECL expression.

Expand an ECL expression.
sourceraw docstring

expand-ecl-historicclj

(expand-ecl-historic svc ecl)

Expand an ECL expression and include historic associations of the results, so that the results will include now inactive/deprecated concept identifiers.

Expand an ECL expression and include historic associations of the results,
so that the results will include now inactive/deprecated concept identifiers.
sourceraw docstring

extended-refset-itemclj

(extended-refset-item svc item)

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 svc concept-id)
(get-all-children svc concept-id type-id)

Return all children of the specified concept. By design, this includes the concept itself.

Return all children of the specified concept. By design, this includes the
concept itself.
sourceraw docstring

get-all-parentsclj

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

Returns all parents of the specified concept. By design, this includes the concept itself.

Returns all parents of the specified concept. By design, this includes the
concept itself.
sourceraw docstring

get-child-relationships-of-typeclj

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

Returns a set of identifiers representing the child relationships of the specified type of the specified concept.

Returns a set of identifiers representing the child relationships of the
specified type of the specified concept.
sourceraw docstring

get-component-refset-idsclj

(get-component-refset-ids svc component-id)

Returns a collection of refset identifiers to which this concept is a member.

Returns a collection of refset identifiers to which this concept is a member.
sourceraw docstring

get-component-refset-itemsclj

(get-component-refset-items svc component-id)
(get-component-refset-items svc component-id refset-id)

Returns a sequence of refset items for the given component.

Returns a sequence of refset items for the given component.
sourceraw docstring

get-component-refset-items-extendedclj

(get-component-refset-items-extended svc component-id)
(get-component-refset-items-extended svc component-id refset-id)

Returns a sequence of refset items for the given component, supplemented with a map of extended attributes as defined by the refset descriptor

Returns a sequence of refset items for the given component, supplemented
with a map of extended attributes as defined by the refset descriptor
sourceraw docstring

get-conceptclj

(get-concept svc concept-id)

Return the concept with the specified identifier.

Return the concept with the specified identifier.
sourceraw docstring

get-descriptionclj

(get-description svc description-id)

Return the description with the specified identifier.

Return the description with the specified identifier.
sourceraw docstring

get-descriptionsclj

(get-descriptions svc concept-id)

Return a sequence of descriptions for the given concept.

Return a sequence of descriptions for the given concept.
sourceraw docstring

get-extended-conceptclj

(get-extended-concept svc concept-id)

Return an extended concept that includes the concept, its descriptions, its relationships and its refset memberships. See [[com.eldrix.hermes.snomed/ExtendedConcept]]

Return an extended concept that includes the concept, its descriptions,
its relationships and its refset memberships. See
[[com.eldrix.hermes.snomed/ExtendedConcept]]
sourceraw docstring

get-fully-specified-nameclj

(get-fully-specified-name svc concept-id)
source

get-installed-reference-setsclj

(get-installed-reference-sets svc)

Return a set of identifiers representing installed reference sets.

Return a set of identifiers representing installed reference sets.
sourceraw docstring

get-parent-relationshipsclj

(get-parent-relationships svc concept-id)

Returns a map of the parent relationships keyed by type.

Returns a map of the parent relationships keyed by type.
sourceraw docstring

get-parent-relationships-expandedclj

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

Returns a map of the parent relationships, with each value a set of identifiers representing the targets and their transitive closure tables. This makes it trivial to build queries that find all concepts with, for example, a common finding site at any level of granularity.

Returns a map of the parent relationships, with each value a set of
identifiers representing the targets and their transitive closure tables. 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 svc concept-id type-concept-id)

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

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

get-preferred-synonymclj

(get-preferred-synonym svc concept-id)
(get-preferred-synonym svc concept-id language-range)

Return the preferred synonym for the concept based on the language preferences specified.

Parameters:

  • svc : hermes service
  • concept-id : concept identifier
  • language-range : a single string containing a list of comma-separated language ranges or a list of language ranges in the form of the "Accept-Language " header defined in RFC3066.
Return the preferred synonym for the concept based on the language
preferences specified.

Parameters:
- svc            : hermes service
- concept-id     : concept identifier
- language-range : a single string containing a list of comma-separated
                   language ranges or a list of language ranges in the form of
                   the "Accept-Language " header defined in RFC3066.
sourceraw docstring

get-reference-setscljdeprecated

(get-reference-sets svc component-id)

DEPRECATED: use get-component-refset-items instead.

DEPRECATED: use [[get-component-refset-items]] instead.
sourceraw docstring

get-refset-descriptor-attribute-idsclj

(get-refset-descriptor-attribute-ids svc 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-itemclj

(get-refset-item svc uuid)

Return a specific refset item by UUID.

Return a specific refset item by UUID.
sourceraw docstring

get-refset-membersclj

(get-refset-members svc refset-id & more)

Return a set of identifiers for the members of the given refset(s).

Parameters:

  • refset-id - SNOMED identifier representing the reference set.
Return a set of identifiers for the members of the given refset(s).

Parameters:
- refset-id  - SNOMED identifier representing the reference set.
sourceraw docstring

get-relationshipclj

(get-relationship svc relationship-id)

Return the relationship with the specified identifier.

Return the relationship with the specified identifier.
sourceraw docstring

get-release-informationclj

(get-release-information svc)
source

get-statusclj

(get-status root
            &
            {:keys [counts? installed-refsets?]
             :or {counts? false installed-refsets? true}})
source

get-synonymsclj

(get-synonyms svc concept-id)

Returns a sequence of synonyms for the given concept.

Returns a sequence of synonyms for the given concept.
sourceraw docstring

historical-associationsclj

(historical-associations svc component-id)

Returns all historical-type associations for the specified component. Result is a map, keyed by the type of association (e.g. SAME-AS) and a sequence of reference set items for that association. Some concepts may be ambiguous and therefore map to multiple targets. Annoyingly, but understandably, the 'moved-to' reference set does not actually reference the new component - but the namespace to which it has moved - so for example an ancient International release may have accidentally including UK specific concepts - so they will have been removed. It is hoped that most MOVED-TO concepts will also have a SAME-AS or POSSIBLY-EQUIVALENT-TO historical association. See https://confluence.ihtsdotools.org/display/DOCRELFMT/5.2.5.1+Historical+Association+Reference+Sets and https://confluence.ihtsdotools.org/display/editorialag/Component+Moved+Elsewhere

Returns all historical-type associations for the specified component.
Result is a map, keyed by the type of association (e.g. SAME-AS) and
a sequence of reference set items for that association. Some concepts
may be ambiguous and therefore map to multiple targets. Annoyingly, but
understandably, the 'moved-to' reference set does not actually reference
the new component - but the namespace to which it has moved - so for example
an ancient International release may have accidentally including UK specific
concepts - so they will have been removed. It is hoped that most MOVED-TO
concepts will also have a SAME-AS or POSSIBLY-EQUIVALENT-TO historical
association.
See https://confluence.ihtsdotools.org/display/DOCRELFMT/5.2.5.1+Historical+Association+Reference+Sets
and https://confluence.ihtsdotools.org/display/editorialag/Component+Moved+Elsewhere
sourceraw docstring

history-profileclj

(history-profile svc profile)

Returns a set of reference sets matching the named profile. Use in conjunction with with-historical:

(with-historical svc [24700007] (history-profile :HISTORY-MIN)

See https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements

Returns a set of reference sets matching the named profile. Use in
conjunction with [[with-historical]]:
```
(with-historical svc [24700007] (history-profile :HISTORY-MIN)
```
See https://confluence.ihtsdotools.org/display/DOCECL/6.11+History+Supplements
sourceraw docstring

import-snomedclj

(import-snomed root dirs)

Import SNOMED distribution files from the directories dirs specified into the database directory root specified.

Import is performed in three phases for each directory:

  1. import of core components and essential metadata, and
  2. interim indexing
  3. import of non-core and extension files.

Interim indexing is necessary in order to ensure correct reification in subsequent import(s).

Import SNOMED distribution files from the directories `dirs` specified into
the database directory `root` specified.

Import is performed in three phases for each directory:
  1. import of core components and essential metadata, and
  2. interim indexing
  3. import of non-core and extension files.

Interim indexing is necessary in order to ensure correct reification in
subsequent import(s).
sourceraw docstring

indexclj

(index root)
(index root language-priority-list)
source

intersect-eclclj

(intersect-ecl svc concept-ids ecl)

Returns a set of concept identifiers that satisfy the SNOMED ECL expression.

Returns a set of concept identifiers that satisfy the SNOMED ECL expression.
sourceraw docstring

log-metadataclj

(log-metadata dir)
source

map-featurescljdeprecated

(map-features svc source-concept-ids target)

DEPRECATED: Use map-into instead.

DEPRECATED: Use [[map-into]] instead.
sourceraw docstring

map-intoclj

(map-into svc source-concept-ids target)

Map the source-concept-ids into the target, usually in order to reduce the dimensionality of the dataset. Returns a set of identifiers that are in the 'target'. The target can be a collection of identifiers, an ECL expression or, for convenience, an identifier representing a reference set. The latter two will be expanded into a set of identifiers.

Parameters:

  • svc : hermes service
  • source-concept-ids : a collection of concept identifiers
  • target : one of: - a collection of concept identifiers - an ECL expression - a refset identifier

If a source concept id resolves to multiple concepts in the target collection, then a collection will be returned such that no member of the subset is subsumed by another member.

Callers will usually need to map any source concept identifiers into their modern active replacements, if they are now inactive, as inactive source concepts do not have relationships that can be used to perform map-into.

The use of 'map-into' is in reducing the granularity of user-entered data to aid analytics. For example, rather than limiting data entry to the UK emergency reference set, a set of commonly seen diagnoses in emergency departments in the UK, we can allow clinicians to enter highly specific, granular terms, and map to the contents of that reference set as required for analytics and reporting.

For example, '991411000000109' is the UK emergency unit diagnosis refset:

(map-into svc [24700007 763794005] 991411000000109)
     =>  (#{24700007} #{45170000})

As multiple sclerosis (24700007) is in the reference set, it is returned. However, LGI1-associated limbic encephalitis (763794005) is not in the reference set, the best terms are returned ("Encephalitis" - 45170000).

This can be used to do simple classification tasks - such as determining the broad types of illness. For example, here we use ECL to define a set to include 'neurological disease', 'respiratory disease' and 'infectious disease':

(map-into svc [24700007 763794005 95883001] "118940003 OR 50043002 OR 40733004")
    => (#{118940003} #{118940003} #{40733004 118940003})

Both multiple sclerosis and LGI-1 encephalitis are types of neurological disease (118940003). However, 'Bacterial meningitis' (95883001) is mapped to both 'neurological disease' (118940003) AND 'infectious disease' (40733004).

Map the source-concept-ids into the target, usually in order to reduce the
dimensionality of the dataset. Returns a set of identifiers that are in the
'target'. The target can be a collection of identifiers, an ECL expression
or, for convenience, an identifier representing a reference set. The latter
two will be expanded into a set of identifiers.

Parameters:
- svc                : hermes service
- source-concept-ids : a collection of concept identifiers
- target             : one of:
                         - a collection of concept identifiers
                         - an ECL expression
                         - a refset identifier

If a source concept id resolves to multiple concepts in the target collection,
then a collection will be returned such that no member of the subset is
subsumed by another member.

Callers will usually need to map any source concept identifiers into their
modern active replacements, if they are now inactive, as inactive source
concepts do not have relationships that can be used to perform map-into.

The use of 'map-into' is in reducing the granularity of user-entered
data to aid analytics. For example, rather than limiting data entry to the UK
emergency reference set, a set of commonly seen diagnoses in emergency
departments in the UK, we can allow clinicians to enter highly specific,
granular terms, and map to the contents of that reference set as required
for analytics and reporting.

For example, '991411000000109' is the UK emergency unit diagnosis refset:
```
(map-into svc [24700007 763794005] 991411000000109)
     =>  (#{24700007} #{45170000})
```
As multiple sclerosis (24700007) is in the reference set, it is returned.
However, LGI1-associated limbic encephalitis (763794005) is not in the
reference set, the best terms are returned ("Encephalitis" - 45170000).

This can be used to do simple classification tasks - such as determining
the broad types of illness. For example, here we use ECL to define a set to
include 'neurological disease', 'respiratory disease' and
'infectious disease':

```
(map-into svc [24700007 763794005 95883001] "118940003 OR 50043002 OR 40733004")
    => (#{118940003} #{118940003} #{40733004 118940003})
```
Both multiple sclerosis and LGI-1 encephalitis are types of neurological
disease (118940003). However, 'Bacterial meningitis' (95883001) is mapped to
both 'neurological disease' (118940003) AND 'infectious disease' (40733004).
sourceraw docstring

member-fieldclj

(member-field svc refset-id field s)

Returns a set of referenced component identifiers that are members of the given reference set with a matching 'value' for the 'field' specified. For example, to perform a reverse map from ICD-10:

(member-field svc 447562003 "mapTarget" "G35")
Returns a set of referenced component identifiers that are members of the
given reference set with a matching 'value' for the 'field' specified.
For example, to perform a reverse map from ICD-10:
```
(member-field svc 447562003 "mapTarget" "G35")
```
sourceraw docstring

member-field-prefixclj

(member-field-prefix svc refset-id field prefix)
source

member-field-wildcardclj

(member-field-wildcard svc refset-id field s)

Perform a member field wildcard search. Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. '' is the escape character. Example:

    (member-field-wildcard svc 447562003 "mapTarget" "G3?")
Perform a member field wildcard search.
Supported wildcards are *, which matches any character sequence (including
the empty one), and ?, which matches any single character. '\' is the escape
character.
Example:
```
    (member-field-wildcard svc 447562003 "mapTarget" "G3?")
```
sourceraw docstring

openclj

(open root)

Open a (read-only) SNOMED service from the path root.

Open a (read-only) SNOMED service from the path `root`.
sourceraw docstring

parse-expressionclj

(parse-expression _svc s)
source

paths-to-rootclj

(paths-to-root svc concept-id)
source

reverse-mapcljdeprecated

(reverse-map svc refset-id code)

DEPRECATED: Use member-field instead.

Returns a sequence of reference set items representing the reverse mapping from the reference set and mapTarget specified. It's almost always better to use member-field or member-field-prefix directly.

DEPRECATED: Use [[member-field]] instead.

Returns a sequence of reference set items representing the reverse mapping
from the reference set and mapTarget specified. It's almost always better to
use [[member-field]] or [[member-field-prefix]] directly.
sourceraw docstring

reverse-map-prefixcljdeprecated

(reverse-map-prefix svc refset-id prefix)

DEPRECATED: Use member-field-prefix instead.

Returns a sequence of reference set items representing the reverse mapping from the reference set and mapTarget. It is almost always better to use member-field or member-field-prefix directly.

DEPRECATED: Use [[member-field-prefix]] instead.

Returns a sequence of reference set items representing the reverse mapping
from the reference set and mapTarget. It is almost always better to use
[[member-field]] or [[member-field-prefix]] directly.
sourceraw docstring

(search svc params)
source

some-indexedclj

(some-indexed pred coll)

Returns index and first logical true value of (pred x) in coll, or nil. e.g.

(some-indexed #{64572001} '(385093006 233604007 205237003 363169009 363170005 123946008 64572001 404684003 138875005))

returns: [6 664572001]

Returns index and first logical true value of (pred x) in coll, or nil.
e.g.
```
(some-indexed #{64572001} '(385093006 233604007 205237003 363169009 363170005 123946008 64572001 404684003 138875005))
```
returns: `[6 664572001]`
sourceraw docstring

source-historicalclj

(source-historical svc component-id)
(source-historical svc 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

source-historical-associationsclj

(source-historical-associations svc component-id)

Returns all historical-type associations in which the specified component is the target. For example, searching for 24700007 will result in a map keyed by refset-id (e.g. SAME-AS reference set) and a set of concept identifiers.

Returns all historical-type associations in which the specified component is
the target. For example, searching for `24700007` will result in a map keyed
by refset-id (e.g. `SAME-AS` reference set) and a set of concept identifiers.
sourceraw docstring

subsumed-by?clj

(subsumed-by? svc concept-id subsumer-concept-id)
source

with-historicalclj

(with-historical svc concept-ids)
(with-historical svc concept-ids 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

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

× close