<< | Index | >>
Review
Confirmation
Console log
ODBA::Stub was unable to replace Hash#4285688 from ODDB::Drugs::Package:#137633 ODBA::Stub was unable to replace Array#4285690 from ODDB::Drugs::Package:#137633 ODBA::Stub was unable to replace Array#4285689 from ODDB::Drugs::Package:#137633 ODBA::Stub was unable to replace Hash#4285691 from ODDB::Drugs::Package:#164212 ODBA::Stub was unable to replace Array#4285693 from ODDB::Drugs::Package:#164212 ODBA::Stub was unable to replace Array#4285692 from ODDB::Drugs::Package:#164212 ODBA::Stub was unable to replace Hash#4285695 from ODDB::Drugs::Package:#174513 ODBA::Stub was unable to replace Array#4285696 from ODDB::Drugs::Package:#174513 ODBA::Stub was unable to replace Array#4285694 from ODDB::Drugs::Package:#174513 ODBA::Stub was unable to replace Array#4285699 from ODDB::Drugs::Sequence:#137626 ODBA::Stub was unable to replace Hash#4285700 from ODDB::Util::M10lDocument:#4285698 ODBA::Stub was unable to replace Hash#4285702 from ODDB::Util::M10lDocument:#4285697 ODBA::Stub was unable to replace Hash#4285688 from ODDB::Drugs::Package:#137633 ODBA::Stub was unable to replace Hash#4285691 from ODDB::Drugs::Package:#164212 ODBA::Stub was unable to replace Hash#4285695 from ODDB::Drugs::Package:#174513 ODBA::Stub was unable to replace Hash#4285705 from ODDB::Drugs::Package:#137630 ODBA::Stub was unable to replace Array#4285706 from ODDB::Drugs::Package:#137630 ODBA::Stub was unable to replace Array#4285704 from ODDB::Drugs::Package:#137630 ODBA::Stub was unable to replace Hash#4285709 from ODDB::Util::M10lDocument:#4285708 ODBA::Stub was unable to replace Hash#4285705 from ODDB::Drugs::Package:#137630
masa@masa ~/ywesee/de.oddb.org $ bin/admin de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').code(:zuzahlungsbefreit).value -> false de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').code(:zuzahlungsbefreit).value = true -> true de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').save -> Acc 200 Brausetabletten
Console log
ODBA::Stub was unable to replace Hash#4285705 from ODDB::Drugs::Package:#137630
Note
Consideration
Simple solution
Refer to 'Speichern' button process
Experiment (2 times calling 'save' method)
masa@masa ~/ywesee/de.oddb.org $ bin/admin de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').code(:zuzahlungsbefreit).value = true -> true de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').save -> Acc 200 Brausetabletten de.oddb> Drugs::Package.find_by_code(:type => 'cid', :value => '3867219', :country => 'DE').save -> Acc 200 Brausetabletten de.oddb> exit -> Goodbye
Result
Experiment (2 times calling 'save' method for all the package data)
def save_all_package total = ODDB::Drugs::Package.all.length i = 0 ODDB::Drugs::Package.all.each do |pack| print i, "/", total, "\n" pack.save pack.save i += 1 end end
Run
masa@masa ~/ywesee/de.oddb.org $ bin/admin de.oddb> save_all_package
-rw-r--r-- 1 masa masa 1954210197 25. Mai 15:16 oddb_after_save_all_package.sql -rw-r--r-- 1 masa masa 1865495500 25. Mai 08:06 oddb_before_save_all_package.sql
Note
masa@masa ~/ywesee/de.oddb.org $ ruby -I lib jobs/import_gkv
Wed May 25 15:19:14 2011: de.oddb.org ODDB::Import::Gkv#import Imported 11 Zubef-Entries on 25.05.2011: Visited 10 existing Zubef-Entries Visited 11 existing Companies Visited 0 existing Substances Created 1 new Zubef-Entries Created 0 new Products Created 0 new Sequences Created 0 new Companies Created 0 new Substances Assigned 0 Chemical Equivalences Assigned 0 Companies Created 0 Incomplete Packages: Created 1 Product(s) without a name (missing product name): http://de.oddb.org/de/drugs/product/uid/3480899
Note
Experiment (After the import_gkv, execute save_all_package)
def save(obj) obj.save obj.save end
Run
Result