view · edit · sidebar · attach · print · history

20120113-fix-migel-link-errros-update-oddb2tdat-check-sbsm-rockit

<< Masa.20120116-fix-rss-pointer-link-new-patent-link-encode-compress-oddb_csv-fix-download-patinfo-invoices-update-sbsm-simple_uri_parser | Index | Masa.20120112-delete-old-migel-fix-oddb2tdat-fix-pointer-link-oddb_org-check-sbsm-rockit >>


  1. Fix error links oddb.org
  2. Check oddb.csv encode
  3. Update oddb2tdat format
  4. Check SBSM rockit

Commits
  1. Removed require migel from ext/export/src/odba_exporter.rb (oddb.org)
  2. Fix key not found: migel_model_migelid_name_en error. It uses de index table when there is no index table for the language (migel)
  3. Updated RECA, CMUT, PRMO, ITHE format (oddb2tdat)
  4. Update CMUT, if Gültig bis is before today CMUT = 3 (oddb2tdat)
  5. Fix the condition if the download file is new in update_narcotics (oddb.org)
  6. Skip searching migel alphabet by dt index table, and skip ODDB::Migel::Item object when feedbacks are searched (oddb.org)

Fix error links oddb.org

Error links

  1. /en/just-medical/migel_alphabetical/range/h
  • These are resolved after reboot
  1. /de/swissmedinfo/sequences/range/p
  2. /de/gcc/search/search_query/L03/search_type/st_oddb/code/L03AB05
  3. /de/gcc/search/search_query/L03/search_type/st_oddb/code/L03AB05
  4. /dt/gcc/sequences/range/p/page/7

Check oddb.csv encode

Note

  • oddb.csv is encoded when the report mail is sent, then attached oddb.csv becomes ISO-8859-1.
  • Originally, it is saved with UTF-8, so that the data/downloads/oddb.csv becomes UTF-8.
  • Additionally, the backup of oddb.csv is saved in data/csv directory with date information to the file name.
  • Updater#export_oddb_csv exports oddb.csv and sends a report mail with the ISO-8859-1 encoded oddb.csv
  • Exporter#export_csv (jobs/export_csv) only exports UTF-8 oddb.csv in data/downloads directory but does NOT sends a report mail

Update oddb2tdat format

Updates

  1. Products without Pharmacode, or Gültig bis is before today, must be CMUT = 3
  2. 05 PRMO must be taken from column M otherwise set to 0.
  3. Please fill ITHE (Index Therapeuticus) with trailing 000 not with leading zeros.
  4. 01 RECA must be set to 01 not 11.

Commit

Check SBSM rockit

Note

  • Apache calls SBSM::TransHanlder#translate_uri(request) and TransHandler#parse_uri calls parser classes in order to parse uri string.
  • The parser classes require rockit

Experiment

  • /usr/lib64/ruby/site_ruby/1.8/sbsm/trans_handler.rb
    def simple_parse(uri)
      # /language/flavor/event/key/value/key/value/...
      items = uri.split('/')
      items.shift
      lang = items.shift
      flavor = items.shift
      event = items.shift
      values = {}
      until items.empty?
        key = items.shift
        value = items.shift
        values.store(key, value)
      end
      values
    end
    def translate_uri(request)
      @@empty_check ||= Regexp.new('^/?$')
      @@lang_check ||= Regexp.new('^/[a-z]{2}(/|$)')
      config = config(request)
      handle_shortcut(request, config)
      uri = request.uri
      case uri
      when @@empty_check
        request.uri = config['redirect']['/'] || HANDLER_URI
      when @@lang_check
        #self.parse_uri(request)
        simple_parse_uri(request)
        request.uri = HANDLER_URI
      end
      Apache::DECLINED
    end

Result

  • link does not work
view · edit · sidebar · attach · print · history
Page last modified on January 13, 2012, at 05:06 PM