Class: ParseComposition
- Inherits:
-
Object
- Object
- ParseComposition
- Defined in:
- lib/oddb2xml/parslet_compositions.rb
Constant Summary collapse
- ErrorsToFix =
{ /(\d+)\s+\-\s*(\d+)/ => '\1-\2', 'o.1' => '0.1', /\s+(mg|g) DER:/ => ' \1, DER:', ' mind. ' => ' min. ', ' streptococci pyogen. ' => ' streptococci pyogen ', ' ut excipiens' => ', excipiens', ' Corresp. ' => ' corresp. ', ',,' => ',', 'avena elatior,dactylis glomerata' => 'avena elatior, dactylis glomerata', ' color.: corresp. ' => ' corresp.', / U\.: (excipiens) / => ' U. \1 ', / U\.: (alnus|betula|betula|betulae) / => ' U., \1 ', /^(acari allergeni extractum (\(acarus siro\)|).+\s+U\.\:)/ => 'A): \1', 'Solvens: alprostadilum' => 'alprostadilum', }
- @@errorHandler =
ParseUtil::HandleSwissmedicErrors.new( ErrorsToFix )
Instance Attribute Summary collapse
-
#corresp ⇒ Object
Returns the value of attribute corresp.
-
#excipiens ⇒ Object
Returns the value of attribute excipiens.
-
#galenic_form ⇒ Object
Returns the value of attribute galenic_form.
-
#label ⇒ Object
Returns the value of attribute label.
-
#label_description ⇒ Object
Returns the value of attribute label_description.
-
#route_of_administration ⇒ Object
Returns the value of attribute route_of_administration.
-
#source ⇒ Object
Returns the value of attribute source.
-
#substances ⇒ Object
Returns the value of attribute substances.
Instance Method Summary collapse
-
#initialize(source) ⇒ ParseComposition
constructor
A new instance of ParseComposition.
Constructor Details
#initialize(source) ⇒ ParseComposition
Returns a new instance of ParseComposition.
391 392 393 394 395 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 391 def initialize(source) @substances ||= [] puts "ParseComposition.new from #{source.inspect} @substances #{@substances.inspect}" if VERBOSE_MESSAGES @source = source.to_s end |
Instance Attribute Details
#corresp ⇒ Object
Returns the value of attribute corresp.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def corresp @corresp end |
#excipiens ⇒ Object
Returns the value of attribute excipiens.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def excipiens @excipiens end |
#galenic_form ⇒ Object
Returns the value of attribute galenic_form.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def galenic_form @galenic_form end |
#label ⇒ Object
Returns the value of attribute label.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def label @label end |
#label_description ⇒ Object
Returns the value of attribute label_description.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def label_description @label_description end |
#route_of_administration ⇒ Object
Returns the value of attribute route_of_administration.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def route_of_administration @route_of_administration end |
#source ⇒ Object
Returns the value of attribute source.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def source @source end |
#substances ⇒ Object
Returns the value of attribute substances.
371 372 373 |
# File 'lib/oddb2xml/parslet_compositions.rb', line 371 def substances @substances end |