<< | Index | >>
Address model does not have instance variables (array) as SERIALIZABLE.
ODBA needs instance variables of array as SERIALIZABLE.
include Persistence
include PersistenceMethods
ODBA_SERIALIZABLE = ['@additional_lines', '@fax', '@fon'] #=> ODBA needs this
@@city_pattern = /[^0-9]+[^0-9\-](?!-)([0-9]+)?/u
attr_accessor :name, :additional_lines, :address,
:location, :title, :fon, :fax, :canton, :type
alias :address_type :type
alias :pointer_descr :name
alias :contact :name
def initialize
super
@additional_lines = [] #=>
@fon = [] #=>
@fax = [] #=>
end
Then, Update Report like this:
company's name - [EAN13] - link_to oddb.org
Checked 739 Companies Compared 0 Medwin Entries Updated 385 Companies: "Wettstein"-Apotheke AG - [7601001013469] - http://ch.oddb.org/de/gcc/company/ean/7601001013469 3M (Schweiz) AG - [7610182000007] - http://ch.oddb.org/de/gcc/company/ean/7610182000007 A. Menarini AG - [7601001301252] - http://ch.oddb.org/de/gcc/company/ean/7601001301252 ACS Dobfar Info SA - [7601001367784] - http://ch.oddb.org/de/gcc/company/ean/7601001367784 APR Applied Pharma Research SA - [7601001377929] - http://ch.oddb.org/de/gcc/company/ean/7601001377929 APS-Arzneimittel-Parallelimport- Service - [7601001376724] - http://ch.oddb.org/de/gcc/company/ean/7601001376724 AbbVie AG - [7601001396968] - http://ch.oddb.org/de/gcc/company/ean/7601001396968 Abbott AG - [7601001367395] - http://ch.oddb.org/de/gcc/company/ean/7601001367395 ....
And I found why Bayer's phone number is not updated.
ch.oddb> companies.values.select{|c| c.name =~ /Bayer/ }.first.data_origin(:ean13).class
-> NilClass
ch.oddb> companies.values.select{|c| c.name =~ /Bayer/ }.first.data_origin(:addresses).class
-> Symbol
ch.oddb> companies.values.select{|c| c.name =~ /Bayer/ }.first.data_origin(:addresses)
-> swissmedic
ch.oddb>
If other Job or Human has updated this value, MedWin Updater does not update this value.
update.delete_if { |key, val|
(orig = comp.data_origin(key)) && orig != :refdata
}
I updated these values always to be updated by Medwin-Updater.
EAN 14.
1133068435DIANEAL PD1 Lös 1.36 % Glucose 2000 ml 00000000000030000000000554137600381292 1133068441DIANEAL PD1 Lös 2.27 % Glucose 2000 ml 00000000000030000000000554137600381502
% bin/oddb2xml -a nonpharma -f dat [1] 1.9.3-p385(#<Oddb2xml::Builder>)> abez => "DIANEAL PD1 Lös 1.36 % Glucose 2000 ml" [2] 1.9.3-p385(#<Oddb2xml::Builder>)> idx[:ean] => "55413760038129"
index = {}
LANGUAGES.each do |lang|
index[lang] = @index[lang][type]
end
_sbj = (type == :pharma ? :dat : :with_migel_dat)
builder.index = index
builder.subject = _sbj
builder.ean14 = @options[:ean14] #=> update to check ean14 option at :pharma also.
if type == :nonpharma
output << "\n"
end
output << builder.to_dat