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-3474 Add check if resource_type is nil #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yunwwang
Copy link

This fix GitHub Issue onc-healthit/onc-certification-g10-test-kit#589

Root cause for this issue is that resource_class crashed if reference and then resource_type is empty.

Solution:

Add a check if resource_type is nil then return nil

Copy link
Contributor

@Jammjammjamm Jammjammjamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't the other versions need to be updated as well?

@Jammjammjamm
Copy link
Contributor

It should be possible to replace the multiple implementations of resource_class with a single implementation in ReferenceExtras which uses self.class.name.deconstantize.constantize instead of FHIR::WHATEVER_VERSION.const_get(resource_type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants