Liking cljdoc? Tell your friends :D

com.eldrix.clods.index

An NHS Organisation Directory Service (ODS) file-based index providing UK organisational search functionality.

An NHS Organisation Directory Service (ODS) file-based index providing 
UK organisational search functionality.
raw docstring

all-contact-typesclj

(all-contact-types orgs)

Given a sequence of organisations, return all used contact types.

Given a sequence of organisations, return all used contact types.
sourceraw docstring

all-organizationsclj

(all-organizations reader)

Returns a lazy sequence of all of the organisations. The reader must remain open until the sequence is fully realised.

Returns a lazy sequence of all of the organisations.
The reader must remain open until the sequence is fully realised.
sourceraw docstring

build-indexclj

(build-index nhspd ch out)

Build an index from NHS ODS data streamed on the channel specified.

Build an index from NHS ODS data streamed on the channel specified.
sourceraw docstring

do-queryclj

(do-query searcher q max-hits)
source

do-raw-queryclj

(do-raw-query searcher q max-hits)
(do-raw-query searcher q max-hits sort)
source

doc->organisationclj

(doc->organisation doc)

Deserialize a Lucene document into an ODS organisation.

Deserialize a Lucene document into an ODS organisation.
sourceraw docstring

fetch-orgclj

(fetch-org searcher extension)
(fetch-org searcher root extension)

Returns NHS ODS data for the organisation specified. Parameters:

  • searcher : Lucene IndexSearcher
  • root : (optional) the identifier root; default '2.16.840.1.113883.2.1.3.2.4.18.48'
  • extension : organisation code; eg. '7A4BV'.
Returns NHS ODS data for the organisation specified.
Parameters:
 - searcher  : Lucene IndexSearcher
 - root      : (optional) the identifier root;
               default '2.16.840.1.113883.2.1.3.2.4.18.48'
 - extension : organisation code; eg. '7A4BV'.
sourceraw docstring

hl7-oid-health-and-social-care-organisation-identifierclj

The default organisation root is the HL7 OID representing a HealthAndSocialCareOrganisationIdentifier

The default organisation root is the HL7 OID representing a
HealthAndSocialCareOrganisationIdentifier
sourceraw docstring

index-versionclj

source

install-indexclj

(install-index nhspd {:keys [organisations code-systems]} out)

Install an index into the directory 'out' using the data provided.

Install an index into the directory 'out' using the data provided.
sourceraw docstring

make-metadata-documentclj

(make-metadata-document k m)

Create a Lucene document to store arbitrary data using the key specified.

Create a Lucene document to store arbitrary data using the key specified.
sourceraw docstring

make-org-idclj

(make-org-id org)
source

make-organisation-docclj

(make-organisation-doc nhspd org)

Turn an organisation into a Lucene document. At the moment, we use postcode to derive WGS84 coordinates (lat/lon) for an organisation. In the future, when ODS contains UPRNs for organisations, we could use UPRN to derive geographical coordinates.

Turn an organisation into a Lucene document.
At the moment, we use postcode to derive WGS84 coordinates (lat/lon) for an
organisation. In the future, when ODS contains UPRNs for organisations, we
could use UPRN to derive geographical coordinates.
sourceraw docstring

make-search-queryclj

(make-search-query {:keys [s n address fuzzy only-active? from-location roles
                           _limit]
                    :or {fuzzy 0 only-active? true}})

Create a search query for an organisation. Parameters:

  • :s : search for name or address of organisation
  • :n : search for name of organisation
  • :address : search within address of organisation
  • :fuzzy : fuzziness factor (0-2)
  • :only-active? : only include active organisations (default, true)
  • :roles : a string or vector of roles
  • :from-location : a map containing:
    • :lat : latitude (WGS84)
    • :lon : longitude (WGS84)
    • :range : range in metres (optional)
  • limit : limit on number of search results
Create a search query for an organisation.
Parameters:
- :s             : search for name or address of organisation
- :n             : search for name of organisation
- :address       : search within address of organisation
- :fuzzy         : fuzziness factor (0-2)
- :only-active?  : only include active organisations (default, true)
- :roles         : a string or vector of roles
- :from-location : a map containing:
     - :lat     : latitude (WGS84)
     - :lon     : longitude (WGS84)
     - :range   : range in metres (optional)
- limit         : limit on number of search results
sourceraw docstring

open-index-readerclj

(open-index-reader filename)
source

open-index-writerclj

(open-index-writer filename)
source

q-activeclj

(q-active)

A query to limit to active organisations

A query to limit to active organisations
sourceraw docstring

q-addressclj

(q-address s)
(q-address s fuzzy)
source

q-andclj

(q-and queries)
source

q-locationclj

(q-location [lat lon] distance)
(q-location lat lon distance)

Creates a query for an organisation within 'distance' metres of the location specified.

Creates a query for an organisation within 'distance' metres of the
location specified.
sourceraw docstring

q-nameclj

(q-name s)
(q-name s fuzzy)
source

q-orclj

(q-or queries)
source

q-orgIdclj

(q-orgId extension)
(q-orgId root extension)

Make a query for the identifier specified.

  • root : (optional) root OID
  • extension : organisation extension (code).
Make a query for the identifier specified.
- root      : (optional) root OID
- extension : organisation extension (code).
sourceraw docstring

q-rolesclj

(q-roles roles)

Query for the role(s) specified.

Query for the role(s) specified. 
sourceraw docstring

read-metadataclj

(read-metadata searcher k)
source

(search searcher
        {:keys [_s _n _only-active? _roles from-location limit]
         :or {limit 1000}
         :as q})

Search for an organisation. Parameters:

  • searcher : Lucene IndexSearcher
  • q : a map containing your query terms.

See make-search-query for the query terms.

Warning: the results are lazily evaluated, so use doall if you plan on closing the IndexReader before processing the results.

Search for an organisation.
Parameters:
 - searcher : Lucene IndexSearcher
 - q        : a map containing your query terms.

See `make-search-query` for the query terms.

Warning: the results are lazily evaluated, so use `doall` if you plan
on closing the IndexReader before processing the results.
sourceraw docstring

sort-by-distanceclj

(sort-by-distance [lat lon])
(sort-by-distance lat lon)

Creates an Apache Lucene 'Sort' based on distance from the location given.

Creates an Apache Lucene 'Sort' based on distance from the location given.
sourceraw docstring

tokenizeclj

(tokenize analyzer field-name s)

Tokenize the string 's' according the 'analyzer' and field specified.

Tokenize the string 's' according the 'analyzer' and field specified.
sourceraw docstring

write-batch!clj

(write-batch! writer nhspd orgs)
source

write-metadataclj

(write-metadata writer k m)
source

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

× close