Class: CaTissue::SpecimenCharacteristics

Inherits:
Object
  • Object
show all
Defined in:
lib/catissue/migration/shims.rb,
lib/catissue/migration/migratable.rb,
lib/catissue/domain/specimen_characteristics.rb

Defined Under Namespace

Classes: TissueSide

Constant Summary collapse

@@tissue_site_cv_finder =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.enable_cv_finderObject

Enables tissue site controlled value lookup.



83
84
85
# File 'lib/catissue/migration/migratable.rb', line 83

def self.enable_cv_finder
  @site_finder ||= ControlledValueFinder.new(:tissue_site)
end

.tissue_site_cv_finder=(finder) ⇒ Object

Sets this SpecimenCharacteristics tissue site ControlledValueFinder.



38
39
40
# File 'lib/catissue/migration/shims.rb', line 38

def self.tissue_site_cv_finder=(finder)
  @@tissue_site_cv_finder = finder
end

Instance Method Details

#migrate_tissue_site(value, row) ⇒ String

Returns the tissue site controlled value.

Returns:

  • (String)

    the tissue site controlled value

Raises:

  • (Jinx::MigrationError)

    if the value is not supported



55
56
57
# File 'lib/catissue/migration/shims.rb', line 55

def migrate_tissue_site(value, row)
  standard_cv_tissue_site(value) or variant_cv_tissue_site(value)
end