Class: RxNav::Concept
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- RxNav::Concept
- Defined in:
- lib/rx_nav/concept.rb
Instance Method Summary collapse
- #get_ndfrt_info ⇒ Object
- #get_norm_info ⇒ Object
-
#get_terms_info ⇒ Object
Supplementary calls to fetch info from other DBs Note: these methods return false if no information was found.
- #kind ⇒ Object
- #name ⇒ Object
- #nui ⇒ Object
- #to_s ⇒ Object
Instance Method Details
#get_ndfrt_info ⇒ Object
38 39 40 41 42 |
# File 'lib/rx_nav/concept.rb', line 38 def get_ndfrt_info nui = get_nui info = RxNav::NDFRT.get_info(nui) merge_concept info end |
#get_norm_info ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/rx_nav/concept.rb', line 44 def get_norm_info rxcui = get_rxcui info = RxNav::RxNorm.properties rxcui info.quantity = RxNav::RxNorm.quantity rxcui info.strength = RxNav::RxNorm.strength rxcui merge_concept info end |
#get_terms_info ⇒ Object
Supplementary calls to fetch info from other DBs Note: these methods return false if no information was found
32 33 34 35 36 |
# File 'lib/rx_nav/concept.rb', line 32 def get_terms_info rxcui = get_rxcui info = RxNav::RxTerms.all_info(rxcui) merge_concept info end |
#kind ⇒ Object
16 17 18 19 |
# File 'lib/rx_nav/concept.rb', line 16 def kind kind = self.concept_kind kind ? titleize_kind(self.concept_kind) : nil end |
#name ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/rx_nav/concept.rb', line 6 def name name = self.display_name || self.synonym || self.full_name || self.full_generic_name || self.concept_name || @table[:name] name ? titleize_str(name) : nil end |
#nui ⇒ Object
21 22 23 |
# File 'lib/rx_nav/concept.rb', line 21 def nui self.concept_nui end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/rx_nav/concept.rb', line 25 def to_s name end |