add get-base-url-from-bundle. make get-bundle-next-page-url public.
This commit is contained in:
parent
442162d7e5
commit
e4689d03eb
|
@ -271,13 +271,27 @@
|
|||
(map :content)
|
||||
(remove nil?)))
|
||||
|
||||
(defn- get-bundle-next-page-url [bundle]
|
||||
(defn get-bundle-next-page-url
|
||||
"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."
|
||||
[bundle]
|
||||
(validate-bundle! bundle)
|
||||
(->> (:link bundle)
|
||||
(filter #(= "next" (:rel %)))
|
||||
(first)
|
||||
:href))
|
||||
|
||||
(defn get-base-url-from-bundle
|
||||
"returns the base-url from the given FHIR bundle. throws an exception if the
|
||||
value passed is not a valid FHIR bundle."
|
||||
[bundle]
|
||||
(validate-bundle!)
|
||||
(->> (:link bundle)
|
||||
(filter #(= "fhir-base" (:rel %)))
|
||||
(first)
|
||||
:href))
|
||||
|
||||
(defn fetch-next-page
|
||||
"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
|
||||
|
|
Reference in a new issue