Skip to content

Commit

Permalink
fix bulk data valueQuantity not found error (#582)
Browse files Browse the repository at this point in the history
Co-authored-by: Yunwei Wang <>
  • Loading branch information
yunwwang authored Nov 4, 2024
1 parent 1f47a84 commit 0c495cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/onc_certification_g10_test_kit/g10_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def using_us_core_7?
us_core_version == US_CORE_7
end

def us_core_7_and_above?
us_core_version[-1].to_i > 6
end

def versioned_us_core_module
case us_core_version
when US_CORE_7
Expand Down
8 changes: 8 additions & 0 deletions lib/onc_certification_g10_test_kit/profile_selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ def select_profile(resource) # rubocop:disable Metrics/CyclomaticComplexity
when 'Observation'
profiles << extract_profile('Smokingstatus') if observation_contains_code?(resource, '72166-2')

if us_core_7_and_above? && (
observation_contains_code?(resource, '11367-0') ||
observation_contains_code?(resource, '401201003') ||
observation_contains_code?(resource, '782516008')
)
profiles << extract_profile('Smokingstatus')
end

profiles << extract_profile('ObservationLab') if resource_contains_category?(resource, 'laboratory', 'http://terminology.hl7.org/CodeSystem/observation-category')

profiles << extract_profile('PediatricBmiForAge') if observation_contains_code?(resource, '59576-9')
Expand Down

0 comments on commit 0c495cf

Please sign in to comment.