add convenience function for turning bundles into sequences of resources

This commit is contained in:
Gered 2014-07-04 12:34:04 -04:00
parent 46ea41807e
commit eb88fbca20

View file

@ -93,6 +93,13 @@
(format-search-value value))]))
(apply concat)))
(defn collect-resources
"returns a sequence containing all of the resources contained in the given bundle"
[bundle]
(->> bundle
:entry
(map :content)))
(defn get-resource
"gets a single resource from a FHIR server. can optionally get a specific version of a resource.