view · edit · sidebar · attach · print · history

20111021-change-link-format-update-exportFachinfo-oddbOrg-insert-package-size-ebook

<< | Index | >>


  1. Check oddb.masa.org after migrate_to_utf8
  2. Update export_fachinfos oddb.org
  3. Update decorator to insert package size in an ebook
  4. Replace all pointer format links oddb.org

Goal/Estimate/Evaluation
  • update export_fachinfos oddb.org / 100% / 100%
  • insert package size in ebook / 100% / 100%
  • replace all pointer links oddb.org on drug search view / 80% / 80%
Commit
ToDo
  • testcases oddb.org link format

Check oddb.masa.org after migrate_to_utf8

Note

  • total saved objects: 3444269
  • it takes in total: 3.66 [h]
  • Fachinformation looks fine
  • It terminated with 'can't add a new key into hash during iteration'

Update export_fachinfos oddb.org

Review

  • update src/model/registration_observer.rb
    def article_codes
      codes = []
      @registrations.collect { |reg|
        reg.each_package { |pac|
          cds = {
            :article_ean13 => pac.barcode.to_s,
          }
          if(pcode = pac.pharmacode)
            cds.store(:article_pcode, pcode)
          end
          if(psize = pac.size)
            cds.store(:article_size, psize)
          end
          codes.push(cds)
        }
      }
      codes
    end

Run

  • bin/oddbd
  • ext/export/bin/exportd
  • bin/admin
ch.oddb> ODDB::YamlExporter.new(self).export_fachinfos

Note

  • the output file, fachinfo.yaml, is outputted in data/downloads/ directory
  • the latest fachinfo.yaml size is 438M (online server)
  • yesterday, until about 250MB fachinfo.yaml was outputted
 -rw------- 1 masa masa 179M 20. Okt 17:11 fachinfo.yaml.28911.0
 -rw------- 1 masa masa  69M 20. Okt 17:11 fachinfo.yaml.28911.1
  • this time, there is no error
  • it takes about 30 minutes

Result

 -rw-r--r-- 1 masa masa 459088427 21. Okt 08:34 fachinfo.yaml

Note

  • 'ODDB::YamlExporter.new(self).export_fachinfos' is not notified by eamil when an error happens

Update

  • src/util/export.rb
    def export_fachinfo_yaml
      exporter = YamlExporter.new(@app)
      safe_export 'fachinfo.yaml' do
        exporter.export_fachinfos
      end
    end

Run

  • bin/admin
 ODDB::Exporter.new(self).export_fachinfo_yaml

Commit

Update decorator to insert package size in an ebook

Refer to http://dev.ywesee.com/wiki.php/EBPS/Changelog

Result

Replace all pointer format links oddb.org

Note

  • pointer link format uses rockit library
  • rockit library does not work on Ruby 1.9.3
  • we plan to remove the dependency on rockit

ToDo

Note

  • Sometimes 'odba_id' and 'oid' are different

Commit

view · edit · sidebar · attach · print · history
Page last modified on October 21, 2011, at 04:41 PM