Class: Inferno::Terminology::Tasks::CountCodesInValueSet

Inherits:
Object
  • Object
show all
Defined in:
lib/inferno/terminology/tasks/count_codes_in_value_set.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vs:) ⇒ CountCodesInValueSet

rubocop:disable Naming/MethodParameterName



7
8
9
# File 'lib/inferno/terminology/tasks/count_codes_in_value_set.rb', line 7

def initialize(vs:) # rubocop:disable Naming/MethodParameterName
  @value_set_url = vs
end

Instance Attribute Details

#value_set_urlObject (readonly)

Returns the value of attribute value_set_url.



5
6
7
# File 'lib/inferno/terminology/tasks/count_codes_in_value_set.rb', line 5

def value_set_url
  @value_set_url
end

Instance Method Details

#runObject



11
12
13
14
15
16
# File 'lib/inferno/terminology/tasks/count_codes_in_value_set.rb', line 11

def run
  Loader.register_umls_db File.join(TEMP_DIR, 'umls.db')
  Loader.load_value_sets_from_directory(PACKAGE_DIR, true)
  vs = Repositories::ValueSets.new.find(value_set_url)
  Inferno.logger.info vs&.valueset&.count
end