Skip to content

Gem updates and FHIR:reference guard rail that filters out codeableCo…#291

Merged
karlnaden merged 2 commits into
inferno-framework:mainfrom
FlexonyoPizza:main
May 13, 2026
Merged

Gem updates and FHIR:reference guard rail that filters out codeableCo…#291
karlnaden merged 2 commits into
inferno-framework:mainfrom
FlexonyoPizza:main

Conversation

@FlexonyoPizza
Copy link
Copy Markdown
Contributor

Gem Updates in gemspec:

  • 'inferno_core', '~> 1.2', '>= 1.2.2'
  • 'smart_app_launch_test_kit', '~> 1.0', '>= 1.0.1'
  • 'tls_test_kit', '~> 1.0', '>= 1.0.2'

lib/us_core_test_kit/reference_resolution_test.rb line 87:

  • A guard rail implemented that filters out non-FHIR:reference variants being passed

spec/us_core/reference_test_spec.rb — two new test groups added:

  • #unresolved_references with choice type fields (unit test)
    Tests the guard rail added at line 87 of reference_resolution_test.rb:
    value_found = resolve_path(resource, path).select { |v| v.is_a?(FHIR::Reference) }
    Verifies that when resolve_path returns a FHIR::CodeableConcept for a choice-type path (e.g. medication[x]), it is filtered out before any .reference call is made — preventing a NoMethodError crash. Also confirms the path is not counted as unresolved, since no actual reference was found.
  • MedicationRequest reference resolution when medication[x] is a CodeableConcept (integration test)
    Uses the real USCoreV311::MedicationRequestReferenceResolutionTest class against a stubbed FHIR server returning a MedicationRequest with medicationCodeableConcept. Confirms two things:
  1. No NoMethodError is raised when the guard encounters a CodeableConcept
  2. The test result is pass — the CodeableConcept is silently skipped and the remaining must-support references (e.g. subject) are resolved normally

Comment thread Gemfile.lock Outdated

BUNDLED WITH
2.5.22
4.0.7
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we want to update the bundler version. Can you:

  1. revert Gemfile.lock to its state before your pr
  2. regenerate it using bundle _2.5.22_ update

@FlexonyoPizza FlexonyoPizza requested a review from karlnaden May 13, 2026 20:03
@karlnaden karlnaden merged commit 8f3ede4 into inferno-framework:main May 13, 2026
4 checks passed
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