Liking cljdoc? Tell your friends :D

clj-hl7-fhir.core


*options*clj

source

absolute->relative-urlclj

(absolute->relative-url absolute-url)

turns an absolute FHIR resource URL into a relative one.

turns an absolute FHIR resource URL into a relative one.
sourceraw docstring

absolute-url?clj

(absolute-url? resource-url)

returns true if the passed URL is an absolute URL, false if not. if the value passed in is not a string (or an empty string) an exception is thrown.

returns true if the passed URL is an absolute URL, false if not. if the value
passed in is not a string (or an empty string) an exception is thrown.
sourceraw docstring

betweenclj

(between parameter__4606__auto__
         value1__4607__auto__
         value2__4608__auto__
         &
         options__4609__auto__)
source

bundle?clj

(bundle? x)

returns true if the given argument is an EDN representation of a FHIR bundle

returns true if the given argument is an EDN representation of a FHIR bundle
sourceraw docstring

collect-resourcesclj

(collect-resources bundle)

returns a sequence containing all of the resources contained in the given bundle. deleted resources listed in the bundle will not be included in the returned sequence (they have no :content)

reference: bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle

returns a sequence containing all of the resources contained in the given bundle.
 deleted resources listed in the bundle will not be included in the returned
 sequence (they have no :content)

reference:
bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle
sourceraw docstring

createclj

(create base-url type resource & {:keys [return-resource?]})

creates a new resource. if the creation succeeded, then the new resource is returned, unless the return-resource? argument is false, in which case the url to the new resource is returned (which will contain the resource id). if a 'Location' header was not set in the response, nil is returned on success. throws an exception if an error was received.

reference: create: http://hl7.org/implement/standards/fhir/http.html#create

creates a new resource. if the creation succeeded, then the new resource is returned,
unless the return-resource? argument is false, in which case the url to the new
resource is returned (which will contain the resource id). if a 'Location' header
was not set in the response, nil is returned on success. throws an exception if an
error was received.

reference:
create: http://hl7.org/implement/standards/fhir/http.html#create
sourceraw docstring

deleteclj

(delete base-url type id)

deletes an existing resource. returns nil on success, throws an exception if an error response was received.

reference: delete: http://hl7.org/implement/standards/fhir/http.html#delete

deletes an existing resource. returns nil on success, throws an exception if an error
response was received.

reference:
delete: http://hl7.org/implement/standards/fhir/http.html#delete
sourceraw docstring

deleted?clj

(deleted? base-url type id)

checks if a resource has been deleted or not. this is based on FHIR servers returning an HTTP 410 response when trying to retrieve a resource that has been deleted.

checks if a resource has been deleted or not. this is based on FHIR servers returning
an HTTP 410 response when trying to retrieve a resource that has been deleted.
sourceraw docstring

eqclj

(eq parameter__4598__auto__ value__4599__auto__ & options__4600__auto__)
source

fetch-allclj

(fetch-all bundle)

for resources that are returned over more then one page, this will automatically fetch all pages of resources and them into a single bundle that contains all of the resources.

reference: bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle paging: http://hl7.org/implement/standards/fhir/http.html#paging

for resources that are returned over more then one page, this will automatically
fetch all pages of resources and them into a single bundle that contains all of
the resources.

reference:
bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle
paging: http://hl7.org/implement/standards/fhir/http.html#paging
sourceraw docstring

fetch-next-pageclj

(fetch-next-page bundle)

for resources that are returned over more then one page, this will fetch the next page of resources as indicated by the link information contained in the passed bundle. the return value is another bundle that can be passed again to this function to get subsequent pages. if this function is passed the bundle for the last page of resources, nil is returned

reference: bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle paging: http://hl7.org/implement/standards/fhir/http.html#paging

for resources that are returned over more then one page, this will fetch the
next page of resources as indicated by the link information contained in the
passed bundle. the return value is another bundle that can be passed again
to this function to get subsequent pages. if this function is passed the
bundle for the last page of resources, nil is returned

reference:
bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle
paging: http://hl7.org/implement/standards/fhir/http.html#paging
sourceraw docstring

find-resource-inclj

(find-resource-in bundle resource-url)

finds and returns a resource contained in the given bundle, identified by a relative or absolute resource URL. if not found, nil is returned. throws an exception if the bundle and/or url supplied is invalid.

reference: bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle

finds and returns a resource contained in the given bundle, identified by a
relative or absolute resource URL. if not found, nil is returned. throws an
exception if the bundle and/or url supplied is invalid.

reference:
bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle
sourceraw docstring

get-base-url-from-bundleclj

(get-base-url-from-bundle bundle)

returns the base-url from the given FHIR bundle. throws an exception if the value passed is not a valid FHIR bundle.

returns the base-url from the given FHIR bundle. throws an exception if the
value passed is not a valid FHIR bundle.
sourceraw docstring

get-bundle-next-page-urlclj

(get-bundle-next-page-url bundle)

returns the 'next' bundle URL from the given FHIR bundle. useful for paged search results. throws an exception if the value passed is not a valid FHIR bundle.

returns the 'next' bundle URL from the given FHIR bundle. useful for paged
search results. throws an exception if the value passed is not a valid FHIR
bundle.
sourceraw docstring

get-containedclj

(get-contained containing-resource ref-id)

returns a resource contained in a parent resource, where the contained resource is identified by an internal reference id.

reference: contained resources: http://www.hl7.org/implement/standards/fhir/references.html#contained

returns a resource contained in a parent resource, where the contained resource
is identified by an internal reference id.

reference:
contained resources: http://www.hl7.org/implement/standards/fhir/references.html#contained
sourceraw docstring

get-extensionclj

(get-extension extension-values extension-url)

given a set of one or more extension elements, returns the value for the extension matching the extension URL given, or nil if not found.

reference: extensions: http://hl7.org/implement/standards/fhir/extensibility.html extension elements: http://hl7.org/implement/standards/fhir/extensibility.html#extension

given a set of one or more extension elements, returns the value for the extension
matching the extension URL given, or nil if not found.

reference:
extensions: http://hl7.org/implement/standards/fhir/extensibility.html
extension elements: http://hl7.org/implement/standards/fhir/extensibility.html#extension
sourceraw docstring

get-extension-valuecljmultimethod

returns the value of a FHIR resource extension. the 'extension' argument should be a single extension element that includes a url key identifying the extension. returns nil if the extension value could not be found or the extension type is not recognized.

reference: extensions: http://hl7.org/implement/standards/fhir/extensibility.html extension elements: http://hl7.org/implement/standards/fhir/extensibility.html#extension

returns the value of a FHIR resource extension. the 'extension' argument should be
a single extension element that includes a url key identifying the extension.
returns nil if the extension value could not be found or the extension type
is not recognized.

reference:
extensions: http://hl7.org/implement/standards/fhir/extensibility.html
extension elements: http://hl7.org/implement/standards/fhir/extensibility.html#extension
sourceraw docstring

get-relative-resourceclj

(get-relative-resource bundle relative-url)

gets a single resource from a FHIR server. the server to be queried will be taken from the 'fhir-base' link in the provided bundle. an exception is thrown if an error response is received.

gets a single resource from a FHIR server. the server to be queried will be taken from the
'fhir-base' link in the provided bundle. an exception is thrown if an error response is
received.
sourceraw docstring

get-resourceclj

(get-resource base-url relative-resource-url)
(get-resource base-url type id & {:keys [version]})

gets a single resource from a FHIR server. the raw resource itself is returned (that is, it is not contained in a bundle). if the resource could not be found, nil is returned. for any other type of response (errors), an exception is thrown.

a relative url can be used to identify the resource to be retrieved, or a resource type, id and optional version number can be used.

reference: read: http://hl7.org/implement/standards/fhir/http.html#read vread: http://hl7.org/implement/standards/fhir/http.html#vread relative url: http://hl7.org/implement/standards/fhir/references.html#atom-rel

gets a single resource from a FHIR server. the raw resource itself is returned (that is,
it is not contained in a bundle). if the resource could not be found, nil is returned.
for any other type of response (errors), an exception is thrown.

a relative url can be used to identify the resource to be retrieved, or a resource type,
id and optional version number can be used.

reference:
read: http://hl7.org/implement/standards/fhir/http.html#read
vread: http://hl7.org/implement/standards/fhir/http.html#vread
relative url: http://hl7.org/implement/standards/fhir/references.html#atom-rel
sourceraw docstring

get-resource-bundleclj

(get-resource-bundle base-url type id & params)

gets a single resource from a FHIR server. the returned resource will be contained in a bundle. if the resource could not be found, a bundle containing zero resources is returned. an exception is thrown if an error response is received.

reference: bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle

gets a single resource from a FHIR server. the returned resource will be contained in a
 bundle. if the resource could not be found, a bundle containing zero resources is returned.
 an exception is thrown if an error response is received.

reference:
bundles: http://hl7.org/implement/standards/fhir/extras.html#bundle
sourceraw docstring

gtclj

(gt parameter__4598__auto__ value__4599__auto__ & options__4600__auto__)
source

gteclj

(gte parameter__4598__auto__ value__4599__auto__ & options__4600__auto__)
source

historyclj

(history base-url type id & params)

returns a bundle containing the history of a single FHIR resource. note that this history can include deletions as well, and these entries are not in a format parseable as a normal FHIR resource. as a result, using a function like collect-resources on the returned bundle is not generally recommended. if the resource could not be found, a bundle containing zero entries is returned. an exception is thrown if an error response is received.

because some resources may have a large history, the bundle's contents may be paged. use the helper functions fetch-next-page and fetch-all to work through all returned pages.

reference: history: http://hl7.org/implement/standards/fhir/http.html#history

returns a bundle containing the history of a single FHIR resource. note that this history can
include deletions as well, and these entries are not in a format parseable as a normal FHIR
resource. as a result, using a function like collect-resources on the returned bundle is not
generally recommended. if the resource could not be found, a bundle containing zero entries is
returned. an exception is thrown if an error response is received.

because some resources may have a large history, the bundle's contents may be paged. use the
helper functions fetch-next-page and fetch-all to work through all returned pages.

reference:
history: http://hl7.org/implement/standards/fhir/http.html#history
sourceraw docstring

ltclj

(lt parameter__4598__auto__ value__4599__auto__ & options__4600__auto__)
source

lteclj

(lte parameter__4598__auto__ value__4599__auto__ & options__4600__auto__)
source

namespacedclj

(namespaced value)
(namespaced namespace value)
source

parse-absolute-urlclj

(parse-absolute-url absolute-url & [keywordize?])

parses an absolute FHIR resource URL, returning a map containing each of the discrete components of the URL (resource type, id, version number). if the optional keywordize? arg is true, then returned resource type names will be turned into a "kebab case" keyword (as opposed to a camelcase string which is the default). if the URL cannot be parsed, returns nil.

parses an absolute FHIR resource URL, returning a map containing each of the discrete
components of the URL (resource type, id, version number). if the optional
keywordize? arg is true, then returned resource type names will be turned into a
"kebab case" keyword (as opposed to a camelcase string which is the default). if
the URL cannot be parsed, returns nil.
sourceraw docstring

parse-relative-urlclj

(parse-relative-url relative-url & [keywordize?])

parses a relative FHIR resource URL, returning a map containing each of the discrete components of the URL (resource type, id, version number). if the optional keywordize? arg is true, then returned resource type names will be turned into a "kebab case" keyword (as opposed to a camelcase string which is the default). if the URL cannot be parsed, returns nil

parses a relative FHIR resource URL, returning a map containing each of the discrete
components of the URL (resource type, id, version number). if the optional
keywordize? arg is true, then returned resource type names will be turned into a
"kebab case" keyword (as opposed to a camelcase string which is the default). if
the URL cannot be parsed, returns nil
sourceraw docstring

parse-urlclj

(parse-url resource-url & [keywordize?])

parses a FHIR resource URL returning a map containing each of the discrete components of the URL (resource type, id, version number). if the optional keywordize? arg is true, then returned resource type names will be turned into a "kebab case" keyword (as opposed to a camelcase string which is the default). if the URL cannot be parsed, returns nil.

this function will automatically determine if the URL is relative or absolute and will try to parse it appropriately. you should probably just use this function all the time when parsing FHIR resource URLs.

parses a FHIR resource URL returning a map containing each of the discrete
components of the URL (resource type, id, version number). if the optional
keywordize? arg is true, then returned resource type names will be turned into
a "kebab case" keyword (as opposed to a camelcase string which is the default).
if the URL cannot be parsed, returns nil.

this function will automatically determine if the URL is relative or absolute
and will try to parse it appropriately. you should probably just use this
function all the time when parsing FHIR resource URLs.
sourceraw docstring

relative->absolute-urlclj

(relative->absolute-url base-url relative-url)

combines a base URL to a FHIR server and a relative FHIR resource URL into an absolute resource URL.

combines a base URL to a FHIR server and a relative FHIR resource URL into an
absolute resource URL.
sourceraw docstring

resource?clj

(resource? x)

returns true if the given argument is an EDN representation of a FHIR resource

returns true if the given argument is an EDN representation of a FHIR resource
sourceraw docstring

(search base-url type where & params)

searches for resources on a FHIR server. multiple parameters are ANDed together. use of the search operator helper functions is encouraged to ensure proper escaping/encoding of search parameters. the results of this function can be passed to fetch-next-page or fetch-all to collect resources returned in paged search results easier. an exception is thrown if an error response is received.

to overcome HTTP GET query size limitations that could be an issue for search operations with a large number of parameters, all search requests are submitted as application/x-www-form-urlencoded HTTP POST requests.

reference: search: http://hl7.org/implement/standards/fhir/http.html#search

searches for resources on a FHIR server. multiple parameters are ANDed together. use of the search
operator helper functions is encouraged to ensure proper escaping/encoding of search parameters.
the results of this function can be passed to fetch-next-page or fetch-all to collect resources
returned in paged search results easier. an exception is thrown if an error response is received.

to overcome HTTP GET query size limitations that could be an issue for search operations with
a large number of parameters, all search requests are submitted as
application/x-www-form-urlencoded HTTP POST requests.

reference:
search: http://hl7.org/implement/standards/fhir/http.html#search
sourceraw docstring

search-and-fetchclj

(search-and-fetch base-url type where & params)

same as search, but automatically fetches all pages of resources returning a single bundle that contains all search results. an exception is thrown if an error response is received.

same as search, but automatically fetches all pages of resources returning a single bundle
that contains all search results. an exception is thrown if an error response is received.
sourceraw docstring

transactionclj

(transaction base-url bundle)

creates/updates/deletes resources specified in a bundle. if the entire transaction succeeded, then a bundle is returned containing changed resources. some servers may also return an additional OperationOutcome resource with additional information about the transaction. throws an exception if an error response was received.

reference: http://hl7.org/implement/standards/fhir/http.html#transaction

creates/updates/deletes resources specified in a bundle. if the entire transaction
succeeded, then a bundle is returned containing changed resources. some servers
may also return an additional OperationOutcome resource with additional information
about the transaction. throws an exception if an error response was received.

reference:
http://hl7.org/implement/standards/fhir/http.html#transaction
sourceraw docstring

updateclj

(update base-url type id resource & {:keys [version return-resource?]})

updates an existing resource. if the update succeeded, then the updated resource is returned, unless the return-resource? argument is false, in which case the url to the updated resource is returned (which will contain the resource id and version number). if a 'Location' header was not set in the response, nil is returned on success. throws an exception if an error response was received.

reference: update: http://hl7.org/implement/standards/fhir/http.html#update

updates an existing resource. if the update succeeded, then the updated resource is
returned, unless the return-resource? argument is false, in which case the url to
the updated resource is returned (which will contain the resource id and version
number). if a 'Location' header was not set in the response, nil is returned on
success. throws an exception if an error response was received.

reference:
update: http://hl7.org/implement/standards/fhir/http.html#update
sourceraw docstring

validate-bundle!clj

(validate-bundle! bundle)
source

validate-resource!clj

(validate-resource! resource)
source

with-optionscljmacro

(with-options options & body)

wraps code that performs FHIR operations so that each FHIR operation runs with some extra options, such as HTTP authentication information, extra HTTP headers, etc.

HTTP Authentication: specify one of :basic-auth, :digest-auth, :oauth. these should be specified in the same manner as clj-http expects (see the clj-http docs for more info). this authentication info will be added to all FHIR HTTP requests inside this block

HTTP Headers: specify a map of headers under :headers. any headers specified in this way will be added as-is to any FHIR HTTP requests inside this with block

Untrusted / Self-signed SSL Certificates if you need to send FHIR requests to a server that is not using a trusted SSL cert, you can specify ':insecure? true' in the options

wraps code that performs FHIR operations so that each FHIR operation runs with some
extra options, such as HTTP authentication information, extra HTTP headers, etc.

HTTP Authentication:
  specify one of :basic-auth, :digest-auth, :oauth. these should be specified
  in the same manner as clj-http expects (see the clj-http docs for more info).
  this authentication info will be added to all FHIR HTTP requests inside this
  block

HTTP Headers:
  specify a map of headers under :headers. any headers specified in this way
  will be added as-is to any FHIR HTTP requests inside this with block

Untrusted / Self-signed SSL Certificates
  if you need to send FHIR requests to a server that is not using a trusted
  SSL cert, you can specify ':insecure? true' in the options
sourceraw docstring

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

× close