Skip to content

Commit

Permalink
BONNIE-593 Bonnie Unresponsive Message and Error Loading Measure Pack…
Browse files Browse the repository at this point in the history
…ages

Fixed vulnerability: sparklemotion/nokogiri#1943
  • Loading branch information
adongare committed Nov 19, 2019
1 parent 50d7f75 commit c89f0f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -87,7 +87,7 @@ GEM
mongoid-tree (2.0.1)
mongoid (>= 4.0, < 6.0)
mustache (1.1.0)
nokogiri (1.10.4)
nokogiri (1.10.5)
mini_portile2 (~> 2.4.0)
origin (2.3.1)
parallel (1.17.0)
Expand Down
13 changes: 7 additions & 6 deletions lib/measure-loader/source_data_criteria_loader.rb
Expand Up @@ -46,19 +46,20 @@ def extract_fields_from_standard_data_criteria(criteria, entry)
def extract_fields_from_single_code_reference_data_criteria(criteria)
single_code_reference = criteria.at_css('value[codeSystem][code]') || criteria.at_css('code[codeSystem][code]')
system_id = "#{single_code_reference['codeSystem']}_#{single_code_reference['codeSystemVersion']}".to_sym
concept = @single_code_concepts[system_id][single_code_reference['code'].to_sym] || get_concept_from_playing_entity_code(criteria.at_css('playingEntity/code'))
concept = @single_code_concepts[system_id][single_code_reference['code'].to_sym] || get_concept_from_participation(criteria.at_css('participation'))
value_set = concept._parent
return {
description: concept.display_name,
codeListId: value_set.oid
}
end

# QDM datatype template in MAT which has includeSubTemplate(codes are nested into participation > role > playingEntity)
# this method gets the codes from playingEntity > code and form the code concept
def get_concept_from_playing_entity_code(playing_entity_code)
system_id = "#{playing_entity_code['codeSystem']}_#{playing_entity_code['codeSystemVersion']}".to_sym
@single_code_concepts[system_id][playing_entity_code['code'].to_sym]
# If QDM datatype template in MAT has includeSubTemplate, code gets nested into participation
# this method gets the codes from participation and form the code concept
def get_concept_from_participation(participation)
code_element = participation.at_css('code')
system_id = "#{code_element['codeSystem']}_#{code_element['codeSystemVersion']}".to_sym
@single_code_concepts[system_id][code_element['code'].to_sym]
end

def map_single_code_concepts(value_sets_from_single_code_references)
Expand Down

0 comments on commit c89f0f2

Please sign in to comment.