Class: ODDB::FiParse::FachinfoHpricot
- Inherits:
-
TextinfoHpricot
- Object
- TextinfoHpricot
- ODDB::FiParse::FachinfoHpricot
- Defined in:
- ext/fiparse/src/fachinfo_hpricot.rb
Instance Attribute Summary collapse
-
#amzv ⇒ Object
readonly
Returns the value of attribute amzv.
-
#composition ⇒ Object
readonly
Returns the value of attribute composition.
-
#contra_indications ⇒ Object
readonly
Returns the value of attribute contra_indications.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#driving_ability ⇒ Object
readonly
Returns the value of attribute driving_ability.
-
#effects ⇒ Object
readonly
Returns the value of attribute effects.
-
#galenic_form ⇒ Object
readonly
Returns the value of attribute galenic_form.
-
#iksnrs ⇒ Object
readonly
Returns the value of attribute iksnrs.
-
#indications ⇒ Object
readonly
Returns the value of attribute indications.
-
#interactions ⇒ Object
readonly
Returns the value of attribute interactions.
-
#kinetic ⇒ Object
readonly
Returns the value of attribute kinetic.
-
#other_advice ⇒ Object
readonly
Returns the value of attribute other_advice.
-
#overdose ⇒ Object
readonly
Returns the value of attribute overdose.
-
#pregnancy ⇒ Object
readonly
Returns the value of attribute pregnancy.
-
#restrictions ⇒ Object
readonly
Returns the value of attribute restrictions.
-
#unwanted_effects ⇒ Object
readonly
Returns the value of attribute unwanted_effects.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Attributes inherited from TextinfoHpricot
Instance Method Summary collapse
Methods inherited from TextinfoHpricot
Instance Attribute Details
#amzv ⇒ Object (readonly)
Returns the value of attribute amzv.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def amzv @amzv end |
#composition ⇒ Object (readonly)
Returns the value of attribute composition.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def composition @composition end |
#contra_indications ⇒ Object (readonly)
Returns the value of attribute contra_indications.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def contra_indications @contra_indications end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def date @date end |
#driving_ability ⇒ Object (readonly)
Returns the value of attribute driving_ability.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def driving_ability @driving_ability end |
#effects ⇒ Object (readonly)
Returns the value of attribute effects.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def effects @effects end |
#galenic_form ⇒ Object (readonly)
Returns the value of attribute galenic_form.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def galenic_form @galenic_form end |
#iksnrs ⇒ Object (readonly)
Returns the value of attribute iksnrs.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def iksnrs @iksnrs end |
#indications ⇒ Object (readonly)
Returns the value of attribute indications.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def indications @indications end |
#interactions ⇒ Object (readonly)
Returns the value of attribute interactions.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def interactions @interactions end |
#kinetic ⇒ Object (readonly)
Returns the value of attribute kinetic.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def kinetic @kinetic end |
#other_advice ⇒ Object (readonly)
Returns the value of attribute other_advice.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def other_advice @other_advice end |
#overdose ⇒ Object (readonly)
Returns the value of attribute overdose.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def overdose @overdose end |
#pregnancy ⇒ Object (readonly)
Returns the value of attribute pregnancy.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def pregnancy @pregnancy end |
#restrictions ⇒ Object (readonly)
Returns the value of attribute restrictions.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def restrictions @restrictions end |
#unwanted_effects ⇒ Object (readonly)
Returns the value of attribute unwanted_effects.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def unwanted_effects @unwanted_effects end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
10 11 12 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 10 def usage @usage end |
Instance Method Details
#identify_chapter(code, chapter) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 14 def identify_chapter(code, chapter) case code when '6900' @amzv = chapter when '3300', '7000' @composition = chapter when '7050' @galenic_form = chapter when '7100' @indications = chapter when '7200' @contra_indications = chapter when '4400', '7250' @restrictions = chapter when '3500', '7550' @effects = chapter when '4000', '7100' @indications = chapter when '4200', '7150' @usage = chapter when '3700', '7600' @kinetic = chapter when '4700', '7450' @unwanted_effects = chapter when '4800', '7300' @interactions = chapter when '7350' @pregnancy = chapter when '7400' @driving_ability = chapter when '5000', '7500' @overdose = chapter when '5200', '7700' @other_advice = chapter when '5998', '7750' @iksnrs = chapter when '6100', '8000' @date = chapter when '7650' @preclinic = chapter when '7850' @registration_owner = chapter when '5610', '7860' @fabrication = chapter when '7870' @delivery = chapter when '5595' @distribution = chapter when nil # special chapers without heading @galenic_form ||= chapter else raise "Unknown chapter-code #{code}, while parsing #{@name}" end end |
#to_textinfo ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'ext/fiparse/src/fachinfo_hpricot.rb', line 68 def to_textinfo fi = if(@amzv) fi = FachinfoDocument2001.new fi.amzv = @amzv fi.contra_indications = @contra_indications fi.pregnancy = @pregnancy fi.registration_owner = @registration_owner fi.driving_ability = @driving_ability fi.preclinic = @preclinic fi else fi = FachinfoDocument.new fi end fi.name = @name fi.galenic_form = @galenic_form fi.effects = @effects fi.kinetic = @kinetic fi.indications = @indications fi.usage = @usage fi.restrictions = @restrictions fi.unwanted_effects = @unwanted_effects fi.interactions = @interactions fi.overdose = @overdose fi.other_advice = @other_advice fi.composition = @composition fi.packages = @packages fi.reference = @reference fi.delivery = @delivery fi.distribution = @distribution fi.fabrication = @fabrication fi.iksnrs = @iksnrs fi.date = @date fi end |