Class: Inferno::Terminology::Tasks::CountCodesInValueSet
- Inherits:
-
Object
- Object
- Inferno::Terminology::Tasks::CountCodesInValueSet
- Defined in:
- lib/inferno/terminology/tasks/count_codes_in_value_set.rb
Instance Attribute Summary collapse
-
#value_set_url ⇒ Object
readonly
Returns the value of attribute value_set_url.
Instance Method Summary collapse
-
#initialize(vs:) ⇒ CountCodesInValueSet
constructor
rubocop:disable Naming/MethodParameterName.
- #run ⇒ Object
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_url ⇒ Object (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
#run ⇒ Object
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 |