(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.
(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.
(between parameter__4606__auto__
value1__4607__auto__
value2__4608__auto__
&
options__4609__auto__)
(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
(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
(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
(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
(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.
(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
(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
(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
(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.
(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.
(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
(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
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
(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.
(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
(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
(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
(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.
(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
(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.
(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.
(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
(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
(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.
(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
(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
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close