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 >>
- Fix error links oddb.org
- Check oddb.csv encode
- Update oddb2tdat format
- Check SBSM rockit
- Commits
-
- Removed require migel from ext/export/src/odba_exporter.rb (oddb.org)
- 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)
- Updated RECA, CMUT, PRMO, ITHE format (oddb2tdat)
- Update CMUT, if Gültig bis is before today CMUT = 3 (oddb2tdat)
- Fix the condition if the download file is new in update_narcotics (oddb.org)
- 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
/en/just-medical/migel_alphabetical/range/h
- These are resolved after reboot
/de/swissmedinfo/sequences/range/p
/de/gcc/search/search_query/L03/search_type/st_oddb/code/L03AB05
/de/gcc/search/search_query/L03/search_type/st_oddb/code/L03AB05
/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
- Products without Pharmacode, or Gültig bis is before today, must be CMUT = 3
- 05 PRMO must be taken from column M otherwise set to 0.
- Please fill ITHE (Index Therapeuticus) with trailing 000 not with leading zeros.
- 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