oddb2xml 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/lib/oddb2xml/builder.rb +3 -2
- data/lib/oddb2xml/extractor.rb +1 -1
- data/lib/oddb2xml/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/oddb2xml/builder.rb
CHANGED
|
@@ -764,8 +764,9 @@ module Oddb2xml
|
|
|
764
764
|
info_index[info[:monid]] = i
|
|
765
765
|
end
|
|
766
766
|
end
|
|
767
|
-
@products.
|
|
768
|
-
|
|
767
|
+
@products.group_by{|obj|
|
|
768
|
+
obj[:no8].to_s[0..4] # swissmedic_number5
|
|
769
|
+
}.each_pair do |monid, products|
|
|
769
770
|
if info_index[monid]
|
|
770
771
|
xml.KP('DT' => '') {
|
|
771
772
|
xml.MONID monid
|
data/lib/oddb2xml/extractor.rb
CHANGED
|
@@ -324,7 +324,7 @@ module Oddb2xml
|
|
|
324
324
|
if text = html.xpath("///div[@id='Section7750']/p").text
|
|
325
325
|
# 1 ~ 3 swissmedic number
|
|
326
326
|
if text =~ /(\d{5})[,\s]*(\d{5})?|(\d{5})[,\s]*(\d{5})?[,\s]*(\d{5})?/
|
|
327
|
-
[$1, $2, $3].compact.each do |n|
|
|
327
|
+
[$1, $2, $3].compact.each do |n| # plural
|
|
328
328
|
item[:monid] = n
|
|
329
329
|
data[lang] << item
|
|
330
330
|
end
|
data/lib/oddb2xml/version.rb
CHANGED