Skip to content

Commit

Permalink
Fixed SDC loading to work with newer DRC measures. And cherry-pick wo…
Browse files Browse the repository at this point in the history
…rk from master. (#39)

* Fixed SDC loading to work with newer DRC measures.
 - Fixed issues with most data criteria getting thrown out.

* Bring over dependabot nokogiri update and the simplexml_parser removal from #30.
[Security] Update nokogiri requirement from ~> 1.8.5 to >= 1.8.5, < 1.11.0
Updates the requirements on [nokogiri](https://github.com/sparklemotion/nokogiri) to permit the latest version.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.8.5...v1.10.3)

* Add the hqmf identifier to a statement reference (#25)
  • Loading branch information
hossenlopp authored and Luke Osborne committed Jun 27, 2019
1 parent 74f1273 commit eab4e58
Show file tree
Hide file tree
Showing 6 changed files with 3,524 additions and 11 deletions.
28 changes: 25 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/projecttacoma/cqm-models.git
revision: 3403ad821db29cd0c8b46e88be05d795b06ee216
revision: d1ccbea6451f02fed3c5ef4e443a53bc6f29b000
branch: master
specs:
cqm-models (1.0.2)
Expand All @@ -18,8 +18,8 @@ PATH
mongoid (~> 6.4.2)
mongoid-tree (~> 2.1.1)
mustache
nokogiri (~> 1.10.3)
protected_attributes_continued (~> 1.4.0)
nokogiri (>= 1.8.5, < 1.11.0)
protected_attributes (~> 1.0.5)
rubyzip (~> 1.2.2)
typhoeus
uuid (~> 2.3.7)
Expand Down Expand Up @@ -63,9 +63,15 @@ GEM
factory_girl (4.1.0)
activesupport (>= 3.0.0)
ffi (1.10.0)
<<<<<<< HEAD
hashdiff (0.3.8)
highline (1.7.10)
i18n (1.6.0)
=======
hashdiff (0.3.7)
highline (1.7.10)
i18n (0.9.5)
>>>>>>> 0049a1fb... Fixed SDC loading to work with newer DRC measures. And cherry-pick work from master. (#39)
concurrent-ruby (~> 1.0)
json (2.2.0)
log4r (1.1.10)
Expand All @@ -91,6 +97,10 @@ GEM
mustache (1.1.0)
nokogiri (1.10.3)
mini_portile2 (~> 2.4.0)
<<<<<<< HEAD
=======
origin (2.3.1)
>>>>>>> 0049a1fb... Fixed SDC loading to work with newer DRC measures. And cherry-pick work from master. (#39)
parallel (1.17.0)
parser (2.6.2.0)
ast (~> 2.4.0)
Expand All @@ -105,7 +115,11 @@ GEM
pry (>= 0.9.10, < 0.11.0)
public_suffix (3.0.3)
rainbow (3.0.0)
<<<<<<< HEAD
rake (12.3.2)
=======
rake (12.3.1)
>>>>>>> 0049a1fb... Fixed SDC loading to work with newer DRC measures. And cherry-pick work from master. (#39)
rubocop (0.52.1)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
Expand All @@ -132,12 +146,20 @@ GEM
text-table (1.2.4)
thor (0.20.3)
thread_safe (0.3.6)
<<<<<<< HEAD
tins (1.20.2)
=======
tins (1.16.3)
>>>>>>> 0049a1fb... Fixed SDC loading to work with newer DRC measures. And cherry-pick work from master. (#39)
typhoeus (1.3.1)
ethon (>= 0.9.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
<<<<<<< HEAD
unicode-display_width (1.5.0)
=======
unicode-display_width (1.4.0)
>>>>>>> 0049a1fb... Fixed SDC loading to work with newer DRC measures. And cherry-pick work from master. (#39)
url (0.3.2)
uuid (2.3.9)
macaddr (~> 1.0)
Expand Down
2 changes: 1 addition & 1 deletion cqm-parsers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.add_dependency 'protected_attributes_continued', '~> 1.4.0'
s.add_dependency 'uuid', '~> 2.3.7'
s.add_dependency 'builder', '~> 3.1'
s.add_dependency 'nokogiri', '~> 1.10.3'
s.add_dependency 'nokogiri', '>= 1.8.5', '< 1.11.0'
s.add_dependency 'highline', "~> 1.7.0"

s.add_dependency 'rubyzip', '~> 1.2.2'
Expand Down
4 changes: 2 additions & 2 deletions lib/measure-loader/source_data_criteria_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def extract_data_criteria

# We create the sdc in such a way that "negative" ones look positive in our array by now,
# so using uniq should give us an array of all positive criteria with no duplicates
source_data_criteria.uniq!(&:hqmfOid)
source_data_criteria.uniq!(&:codeListId)
return source_data_criteria
end

Expand Down Expand Up @@ -42,7 +42,7 @@ def extract_fields_from_standard_data_criteria(criteria, entry)
end

def extract_fields_from_single_code_reference_data_criteria(criteria)
single_code_reference = criteria.at_css('code[codeSystem][code]')
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]
value_set = concept._parent
Expand Down
Binary file added test/fixtures/measureloading/CMS22v7.zip
Binary file not shown.
Loading

0 comments on commit eab4e58

Please sign in to comment.