Liking cljdoc? Tell your friends :D

com.eldrix.clods.core


active-successorsclj

(active-successors ods
                   org
                   &
                   {:keys [self-if-active?] :or {self-if-active? true}})

Returns the active successor(s) of the given organisation. If the specified organisation is still active, by default returns a sequence containing only it. If 'self-if-active?' is false, returns nil.

Returns the active successor(s) of the given organisation.
If the specified organisation is still active, by default returns a sequence
containing only it. If 'self-if-active?' is false, returns nil. 
sourceraw docstring

all-predecessorsclj

(all-predecessors ods org)

Returns a vector of all predecessor organisations.

Returns a vector of all predecessor organisations.
sourceraw docstring

downloadclj

(download params)

Download the latest ODS release. Returns a map containing data including codesystems, codes and the organisations. See com.eldrix.clods.download/download.

Download the latest ODS release.
Returns a map containing data including codesystems, codes and the
organisations.
See `com.eldrix.clods.download/download`.
sourceraw docstring

get-relationshipclj

(get-relationship ods rel-code)

Return the relationship associated with code specified, e.g. "RE6"

Return the relationship associated with code specified, e.g. "RE6"
sourceraw docstring

get-roleclj

(get-role ods role-code)

Return the role associated with code specified, e.g. "RO72".

Return the role associated with code specified, e.g. "RO72".
sourceraw docstring

installclj

(install dir nhspd api-key cache-dir)

Download and install the latest ODS release using the defined NHSPD service. Parameters:

  • dir : directory in which to build ODS service
  • nhspd : an NHS postcode directory service
  • api-key : TRUD api key
  • cache-dir : TRUD cache directory.
Download and install the latest ODS release using the defined NHSPD service.
Parameters:
- dir       : directory in which to build ODS service
- nhspd     : an NHS postcode directory service
- api-key   : TRUD api key
- cache-dir : TRUD cache directory.
sourceraw docstring

matching-org-id?clj

(matching-org-id? source-org-id target-org-id)

Do the organisational identifiers match? Parameters:

  • source-org-id : a map containing ':root' and ':extension' keys
  • target-org-id : one of: - a map containing ':root' and ':extension' keys - a string representing the extension.
Do the organisational identifiers match?
Parameters:
- source-org-id   : a map containing ':root' and ':extension' keys
- target-org-id   : one of:
                    - a map containing ':root' and ':extension' keys
                    - a string representing the extension.
sourceraw docstring

namespace-ods-organisationclj

source

namespace-ods-siteclj

source

normalize-idclj

(normalize-id id)

Normalizes an ODS identifier oid/extension to a URI/value with the URI prefix of 'urn:uri:'

Normalizes an ODS identifier oid/extension to a URI/value with the URI
prefix of 'urn:uri:'
sourceraw docstring

normalize-orgclj

(normalize-org org)

Normalizes an organisation, turning legacy ODS OID/extension identifiers into namespaced URI/value identifiers

Normalizes an organisation, turning legacy ODS OID/extension identifiers into
namespaced URI/value identifiers
sourceraw docstring

normalize-targetsclj

(normalize-targets v)

Normalizes the target key (containing :root and :extension keys) to turn root/extension into `system/value' where system is a URI

Normalizes the `target` key (containing `:root` and `:extension` keys) to
turn `root/extension` into `system/value' where system is a URI
sourceraw docstring

ODScljprotocol

all-organizationsclj

(all-organizations this)

Returns a lazy sequence of all organisations

Returns a lazy sequence of all organisations

code-systemsclj

(code-systems this)

Return all ODS codesystems

Return all ODS codesystems

fetch-orgclj

(fetch-org this root extension)

Fetch an organisation by identifier

Fetch an organisation by identifier

fetch-postcodeclj

(fetch-postcode this pc)

Return NHSPD data about the specified postcode.

Return NHSPD data about the specified postcode.

fetch-wgs84clj

(fetch-wgs84 this pc)

Returns WGS84 lat/long coordinates about the postcode.

Returns WGS84 lat/long coordinates about the postcode.

search-orgclj

(search-org this params)

Search for an organisation using the parameters specified.

Search for an organisation using the parameters specified.
source

open-indexclj

(open-index {:keys [ods-dir nhspd nhspd-dir] :as params})
(open-index ods-dir nhspd-dir)

Open a clods index. Parameters are a map containing the following keys:

  • :ods-dir - directory representing the ODS index
  • :nhspd - an already opened NHSPD service
  • :nhspd-dir - directory containing an NHSPD index

Clods depends upon the NHS Postcode Directory, as provided by <a href="https://github.com/wardle/nhspd">nhspd. As such, one of nhspd or nhspd-dir must be provided

Open a clods index.
Parameters are a map containing the following keys:
 - :ods-dir   - directory representing the ODS index
 - :nhspd     - an already opened NHSPD service
 - :nhspd-dir - directory containing an NHSPD index

Clods depends upon the NHS Postcode Directory, as provided by <a href="https://github.com/wardle/nhspd">nhspd.
As such, one of nhspd or nhspd-dir must be provided
sourceraw docstring

org-identifiersclj

(org-identifiers org)

Returns a normalised list of organisation identifiers. The first will be the 'best' identifier to use for official use. This turns a single ODS orgId (oid/extension) into a list of uri/values.

Returns a normalised list of organisation identifiers.
The first will be the 'best' identifier to use for official use.
This turns a single ODS orgId (oid/extension) into a list of uri/values.
sourceraw docstring

org-part-ofclj

(org-part-of org)

Returns a best-match of what we consider an organisation 'part-of'. Returns a tuple of root extension.

Returns a best-match of what we consider an organisation 'part-of'.
Returns a tuple of root extension.
sourceraw docstring

orgRecordClass->namespaceclj

source

parse-org-idclj

(parse-org-id s)
source

part-of-relationshipsclj

A priority list of what relationship to use in order to determine the more abstract 'part-of' relationship.

A priority list of what relationship to use in order to
determine the more abstract 'part-of' relationship.
sourceraw docstring

predecessorsclj

(predecessors ods org)

Returns a lazy sequence of direct predecessor organisations.

Returns a lazy sequence of direct predecessor organisations.
sourceraw docstring

re-org-idclj

source

related?clj

(related? ods
          org
          target
          &
          {:keys [rels historic?] :or {historic? true} :as opts})

Is the organisation specified related to the target specified? The target should be the organisation, or a parent of that organisation, or have a similar historical relationship.

Parameters:

  • ods : ods index
  • org : a map representing the organisation, from 'fetch-org'
  • target : a map representing the organisation, from 'fetch-org'
  • rels : (default, 'all') a set of relationship types, or predicate
  • historic? : (default, true) whether to use historic relationships

For example,

  (related? ods (fetch-org ods nil "RWMBV") (fetch-org ods nil "7A4"))

returns a truthy value, as 'RWMBV' was the old University Hospital of Wales, under a parent organisation, 'RWM', which is now inactive and replaced with '7A4'.

Is the organisation specified related to the target specified?
The target should be the organisation, or a parent of that organisation, or
have a similar historical relationship.

Parameters:
- ods           : ods index
- org           : a map representing the organisation, from 'fetch-org'
- target        : a map representing the organisation, from 'fetch-org'
- rels          : (default, 'all') a set of relationship types, or predicate
- historic?     : (default, true) whether to use historic relationships

For example,
```
  (related? ods (fetch-org ods nil "RWMBV") (fetch-org ods nil "7A4"))
```
returns a truthy value, as 'RWMBV' was the old University Hospital of Wales,
under a parent organisation, 'RWM', which is now inactive and replaced with
'7A4'.
sourceraw docstring

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

× close