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

Closed
wants to merge 1 commit into 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).

@arscan
Copy link
Member

arscan commented Mar 3, 2025

We ended up working around this issue in a different spot (specifically inferno-framework/us-core-test-kit#212); however, after discussion with the team we are hopeful we can get a fix in at this level so we'll leave this open for now.

@arscan
Copy link
Member

arscan commented Mar 3, 2025

Closing, will consider addressing in a separate ticket as part of broader improvement efforts. The immediate need for this was addressed in an inferno test kit specific fix as mentioned earlier.

@arscan arscan closed this Mar 3, 2025
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.

3 participants