smart-on-fhir / client-py

Python SMART on FHIR client
http://docs.smarthealthit.org
Other
579 stars 209 forks source link

Iterable support in FHIRSearch #172

Open dogversioning opened 1 month ago

dogversioning commented 1 month ago

As discussed in #169, we would like to create a parallel set of functions inside of FHIRSearch that behave more like modern python iterables, shadowing existing functions for now in order to prevent breaking the API. The discussed approach is as follows:

@mikix : I might propose we add:

  • perform_iter() (generator for Bundles)
  • perform_resources_iter() (generator for Resources)
  • Update perform_resources() to follow Bundle links transparently (and return all resources found as one giant list)
  • Some way to navigate Bundle links manually in case you got you Bundle a different way (like a history operation, or just a Bundle read from disk or something).
mikix commented 4 weeks ago

@LanaNYC I may have a little time this week/next to look at this - just pinging because I didn't want to overlap efforts, in case you had started looking at this (you had mentioned maybe having time to look at this too, in your original pagination PR)

LanaNYC commented 4 weeks ago

@mikix Hey, sorry for the delay — I started looking into it but got interrupted. I was planning to get back to it next week, but I don't want to hold you up. Let me know if you'd prefer to take it over.

mikix commented 4 weeks ago

@LanaNYC ah cool no - no worries about a delay, there's no schedule here. I was just reminded of this and was curious where your brain was at. If you're planning to look at this, go for it, and I'll happily review. If it does end up sliding off your plate, let me know and I can pick it back up.