Skip to content
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

FI-332 Allow Initialization of Resources with a single FHIR::Model instance as the element value #63

Merged
merged 5 commits into from Sep 24, 2019

Conversation

@radamson
Copy link
Contributor

commented Sep 3, 2019

Currently a FHIR Resource can be initialized with either a simple hash or an array of objects, but not an instance of a FHIR::Model.

e.g. These work:

range = FHIR::Range.new(low: [FHIR::Quantity.new(value: 18)])
range = FHIR::Range.new(low: {value: 18})
range.low = FHIR::Quantity.new(value: 18)

but this fails

range = FHIR::Range.new(low: FHIR::Quantity.new(value: 18))

This PR fixes this and does some minor cleanup of the relevant code.

See the relevant issue: #47

@radamson radamson requested review from arscan and Jammjammjamm Sep 3, 2019
Copy link
Member

left a comment

Looks good.

radamson added 2 commits Sep 5, 2019
@arscan
arscan approved these changes Sep 6, 2019
Copy link
Member

left a comment

Looks good to me. Are we going to copy this API upgrade back to STU3 & DSTU2?

@radamson radamson merged commit d442f90 into master Sep 24, 2019
5 checks passed
5 checks passed
codeclimate All good!
Details
codeclimate/diff-coverage 100% (50% threshold)
Details
codeclimate/total-coverage 95% (0.0% change)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@radamson radamson deleted the FI-332-update-constructor branch Sep 24, 2019
@radamson

This comment has been minimized.

Copy link
Contributor Author

commented Sep 24, 2019

This is something that we should apply to STU3 and DSTU2 as well. Created a ticket: FI-360.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.