-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterate over resources #89
Conversation
Not sure if this is a real issue or not, but pry is now giving me this error when I start up the console (I can successfull ignore it now): fhir_models % bundle exec rake fhir:console
bin/console
require 'pry-coolline' # Failed, saying: undefined method `file' for #<Pry::History:0x00007fd76fcfa398>
Did you mean? filter There is a chance this was already in here from a previous update to our Gemfile.lock and I just didn't notice it. Just FYI |
Co-authored-by: Rob Scanlon <robscanlon@gmail.com>
I saw that too, but I didn't know what to do about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I also manually verified against a Goal resource from our test data set.
I thought the return value was a little confusing and perhaps it shouldn't be exposed to users (ideally I guess it would return an enumerator or something? or at least that's what each
does). No big deal though. Also, I assume that primitive extensions would be ignored here, which might be worth noting in this section of the readme, though we do mention it earlier at a high level too, so I'm ok leaving that out.
I suppose we should backport this to fhir-crucible/fhir_dstu2_models and fhir-crucible/fhir_stu3_models. Hopefully just a copy/paste, but there is a chance that something changed implementaiton-wise that would make this not work? I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it out and everything looks good.
Couple things to discuss regarding the method name and return.
Co-authored-by: Reece Adamson <41651655+radamson@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
This branch adds an
#each_element
method toFHIR::Model
so that resources can be easily iterated over.I also updated some dependencies to address security vulnerabilities.