(atc->products-for-ecl conn atc)Return a map of products that can be used to build a more complete SNOMED CT ECL expression that will include all matching UK products. We have to do it this way because TF products are not included in the UK dm+d distribution.
Return a map of products that can be used to build a more complete SNOMED CT ECL expression that will include all matching UK products. We have to do it this way because TF products are not included in the UK dm+d distribution.
(atc->snomed-ecl conn atc)Create a SNOMED CT ECL expression from the ATC pattern specified, returning
an expression that will return VTMs, VMPs and AMPs.
Prefer to use atc->products-for-ecl and the SNOMED CT drug extension
to optimise the creation of the appropriate ECL expression.
Create a SNOMED CT ECL expression from the ATC pattern specified, returning an expression that will return VTMs, VMPs and AMPs. Prefer to use [[atc->products-for-ecl]] and the SNOMED CT drug extension to optimise the creation of the appropriate ECL expression.
(current-ids conn id)Returns the set of identifiers in current use for the given (usually historic) identifier.
Returns the set of identifiers in current use for the given (usually historic) identifier.
(dmd-database? f)Returns true if f is a dm+d SQLite database created by this library.
Strict: legacy dm+d files predating the application_id marker return false.
Returns true if `f` is a dm+d SQLite database created by this library. Strict: legacy dm+d files predating the application_id marker return false.
(fetch-history conn id)Returns all history entries in which id is the current identifier,
ordered by start date, including 'self' entries recording the period of
validity of the current identifier itself.
Returns all history entries in which `id` is the current identifier, ordered by start date, including 'self' entries recording the period of validity of the current identifier itself.
(install-from-dirs filename dirs & {:keys [_batch-size] :as opts})Creates a new dm+d filestore at filename from the directories specified.
Creates a new dm+d filestore at `filename` from the directories specified.
(install-latest api-key-file cache-dir)Convenience function to install latest release using a filename based on its release date.
For more control, use install-release.
Convenience function to install latest release using a filename based on its release date. For more control, use `install-release`.
(install-release api-key-file cache-dir)(install-release api-key-file cache-dir filename)(install-release api-key-file cache-dir filename release-date)Create a versioned dm+d file-based database by downloading the dm+d distributions automatically from NHS Digital's TRUD service. Parameters:
Create a versioned dm+d file-based database by downloading the dm+d
distributions automatically from NHS Digital's TRUD service.
Parameters:
- api-key-file : file containing TRUD API key, anything coercible using
[[clojure.java.io/as-file]]
- cache-dir : TRUD cache directory
- filename : filename of database to install, can be omitted
- release-date : date of release to be installed, will use latest if omitted.
can be a string in ISO format, or a java.time.LocalDateSet of lookup types, as keywords, usable with fetch-lookup.
Set of lookup types, as keywords, usable with [[fetch-lookup]].
(open-store f)Open a dm+d store. Returns what should be regarded as an opaque handle,
that should be closed using close. Currently this is a DataSource but
this is subject to change. f can be anything coercible to a file using
[[clojure.java.io/as-file]]. Throws an exception if the file does not exist.
Open a dm+d store. Returns what should be regarded as an opaque handle, that should be closed using `close`. Currently this is a DataSource but this is subject to change. `f` can be anything coercible to a file using [[clojure.java.io/as-file]]. Throws an exception if the file does not exist.
(plan-products conn product-type)Returns a reducible over all rows of the given product type (:VTM :VMP
:AMP :VMPP or :AMPP), for streaming iteration; each row is a next.jdbc
row abstraction with columns accessible by keyword.
Returns a reducible over all rows of the given product type (:VTM :VMP :AMP :VMPP or :AMPP), for streaming iteration; each row is a `next.jdbc` row abstraction with columns accessible by keyword.
(previous-ids conn id)Returns the set of prior identifiers for the given current identifier.
Returns the set of prior identifiers for the given current identifier.
(products-from-atc conn atc)(products-from-atc conn atc product-types)Returns a sequence of products matching the ATC code. Parameters:
By default only VTM VMP and AMP products will be returned.
Returns a sequence of products matching the ATC code.
Parameters:
- conn :
- atc : atc code - supports '*' and '?' for pattern matching as per Lucene
- product-types : a set of product types (e.g. #{:VTM :VMP :AMP :VMPP :AMPP}).
By default only VTM VMP and AMP products will be returned.(search conn s & {:keys [_types _limit] :as opts})Search product names, returning a sequence of maps of :SEARCH/ID, :SEARCH/TYPE and :SEARCH/NM, best matches first. Each token is matched as a prefix; multiple tokens must all match. Options:
Search product names, returning a sequence of maps of :SEARCH/ID,
:SEARCH/TYPE and :SEARCH/NM, best matches first. Each token is matched as
a prefix; multiple tokens must all match.
Options:
- :types - product types to include e.g. #{:VMP :AMP}; default, all
- :limit - maximum number of results; default 100(sqlite-database? f)Returns true if f is a SQLite 3 database file.
Returns true if `f` is a SQLite 3 database file.
(status store)Returns a structured description of an open dm+d store, including store schema version, creation date, dm+d release date, source TRUD release information and file inventory when available, and entity counts.
Returns a structured description of an open dm+d store, including store schema version, creation date, dm+d release date, source TRUD release information and file inventory when available, and entity counts.
(vmps-from-atc conn atc)DEPRECATED: use vpids-from-atc instead.
DEPRECATED: use [[vpids-from-atc]] instead.
(vpids-from-atc conn atc)Returns a sequence of VPIDs for the ATC code specified.
Returns a sequence of VPIDs for the ATC code specified. - conn - atc - atc code - supports '*' for multiple character wildcard, and '?' for single character wildcard.
(vtm-ingredients conn vtmid)Returns ingredient (ISID) identifiers for the given VTM.
Returns ingredient (ISID) identifiers for the given VTM.
(vtms-for-ingredient conn isid)Returns VTM identifiers for the given ingredient.
Returns VTM identifiers for the given ingredient.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |