view · edit · sidebar · attach · print · history

Index>

20151118-fix-gtin-7680005830135

Summary

  • Why it the GTIN 7680005830135 not found via oddb2xml
  • If https://mail.google.com/mail/u/0/#inbox/151060d2e96bc157 tells in title about two changes, it should show two not one!
  • Change text if nothing found for evidentia.
  • Snap-Back for FI diff is not correct
  • Fix error when running import_daily

Commits

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search

Why it the GTIN 7680005830135 not found via oddb2xml

Investigating the problem. Running first oddb2ml locally to see whether I can reproduce the error. After runing oddb2xml without any parameters I found in oddb_article.xml the following snippet

  <ARTICLE SHA256="9ab2f5b3300e6221a1e7b17e434b28aba81eb3b5fc135a06180a190441d78f07">
    <GTIN>7680005830135</GTIN>
    <NAME>Fluarix, Injektionssuspension</NAME>
    <PKG_SIZE>1 x 0.5 ml</PKG_SIZE>
    <SELLING_UNITS>1</SELLING_UNITS>
    <MEASURE>Fertigspritze(n)</MEASURE>
    <GALENIC_FORM>Injektionssuspension</GALENIC_FORM>
    <GALENIC_GROUP>Injektion/Infusion</GALENIC_GROUP>

This looks okay for me. Asking, whether another option was used. The same for

 <ARTICLE SHA256="ed1dce62f74c5ad4191986f641f1e09b693609ee585f6f5d5d0083843e26f9e2">
    <GTIN>7680629610106</GTIN>
    <NAME>Fluarix Tetra 15 mcg / 0.5 ml, Injektionssuspension</NAME>
    <PKG_SIZE>10 x 0.5 ml</PKG_SIZE>
    <SELLING_UNITS>10</SELLING_UNITS>
    <MEASURE>Fertigspritze(n)</MEASURE>
    <GALENIC_FORM>Injektionssuspension</GALENIC_FORM>
    <GALENIC_GROUP>Injektion/Infusion</GALENIC_GROUP>

The line 1136355017FLUARIX Inj Susp m sep Nad 2015/2016 0.5 ml 000959001795101B080800076800058301352 has the CMUT-field (Pos 3) as '3' which corresponds to "Ausser Handel". Therefore it is correct, when the SALESCD-tag is set to 'I', inactive.

Change text for evidentia LNF when nothing found

Evidentia wants the following text. Ihr Such-Stichwort hat zu keinem Suchergebnis geführt. Bitte überprüfen Sie die Schreibweise und versuchen Sie es noch einmal. Sie können nach Originalpräparat, Generikum oder Wirkstoff suchen. Die Suche erfolgt nach dem ATC-Code.

Fixed for french and german with commit Change explain_search for evidentia

Fix errors when running import_daily

Found the following info in log/oddb/debug/2015/11.log

2015-11-14 07:18:40 +0100: /var/www/oddb.org/src/plugin/text_info.rb:1182:in `block in parse_and_update': parse_and_update: calls parse_patinfo reparse dist /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasenspray_swissmedicinfo.html false iksnrs_from_xml ["53348"] Rinosedin, Nasenspray_swissmedicinfo.html, name Rinosedin, Nasenspray de title Rinosedin, Nasenspray  
2015-11-14 07:18:40 +0100: /var/www/oddb.org/src/plugin/text_info.rb:1192:in `parse_and_update': patinfo empty? content true false iksnrs_from_xml ["53348"] dist /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasenspray_swissmedicinfo.html
2015-11-14 07:18:40 CETlog notify Error: Fach- und Patienteninfo Updates (swissmedicinfo.ch): start outgoing process ["log"]. Must attach 0 files and 0 parts.
2015-11-14 07:18:40 CETUtil.send_mail list_and_recipients ["log"]
2015-11-14 07:18:40 CET Util.log_and_deliver_mail to=["ngiger@ywesee.com", "zdavatz@ywesee.com"] subject ch.ODDB.org Report - Error: Fach- und Patienteninfo Updates (swissmedicinfo.ch) - 11/2015 size 2868 with 0 attachments. Plugin: ODDB::TextInfoPlugin
Error: TypeError
Message: can't convert ODDB::Text::ImageLink into String
Backtrace:
/var/www/oddb.org/src/model/text.rb:233:in `block in to_s'
/var/www/oddb.org/src/model/text.rb:229:in `map'
/var/www/oddb.org/src/model/text.rb:229:in `to_s'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/array/conversions.rb:55:in `inspect'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/array/conversions.rb:55:in `inspect'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/core_ext/array/conversions.rb:55:in `to_formatted_s'
/var/www/oddb.org/src/model/text.rb:350:in `block in to_s'
/var/www/oddb.org/src/model/text.rb:349:in `each'
/var/www/oddb.org/src/model/text.rb:349:in `to_s'
/var/www/oddb.org/src/model/text.rb:423:in `block in to_s'
/var/www/oddb.org/src/model/text.rb:423:in `collect'
/var/www/oddb.org/src/model/text.rb:423:in `to_s'
/var/www/oddb.org/src/model/text.rb:482:in `block in to_s'
/var/www/oddb.org/src/model/text.rb:482:in `collect'
/var/www/oddb.org/src/model/text.rb:482:in `to_s'
/var/www/oddb.org/src/model/patinfo.rb:94:in `join'
/var/www/oddb.org/src/model/patinfo.rb:94:in `to_s'
/var/www/oddb.org/src/plugin/text_info.rb:1196:in `block in parse_and_update'
/var/www/oddb.org/src/plugin/text_info.rb:1195:in `map'
/var/www/oddb.org/src/plugin/text_info.rb:1195:in `parse_and_update'
/var/www/oddb.org/src/plugin/text_info.rb:1212:in `block (3 levels) in import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1211:in `each'
/var/www/oddb.org/src/plugin/text_info.rb:1211:in `block (2 levels) in import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1210:in `each_pair'
/var/www/oddb.org/src/plugin/text_info.rb:1210:in `block in import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1207:in `each_pair'
/var/www/oddb.org/src/plugin/text_info.rb:1207:in `import_info'
/var/www/oddb.org/src/plugin/text_info.rb:1415:in `block in import_swissmedicinfo_by_index'
/var/www/oddb.org/src/plugin/text_info.rb:1414:in `each_pair'
/var/www/oddb.org/src/plugin/text_info.rb:1414:in `import_swissmedicinfo_by_index'
/var/www/oddb.org/src/plugin/text_info.rb:1476:in `import_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:573:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:567:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:344:in `update_textinfo_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:198:in `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `call'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'
2015-11-14 07:18:41 CETlog notify Error: Fach- und Patienteninfo Updates (swissmedicinfo.ch): sent mail

This error disappeared a few days later and the . Looking at the date of the produced files I remarked that we got on November 18 a new styles files for Rinosedin.

-rw-r--r-- 1 apache apache 36447 14. Nov 07:18 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasenspray_swissmedicinfo.html
-rw-r--r-- 1 apache apache  1600 18. Nov 07:20 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasenspray_swissmedicinfo.styles
-rw-r--r-- 1 apache apache 23225 14. Nov 07:18 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasenspray_swissmedicinfo.yaml
-rw-r--r-- 1 apache apache 11700 14. Nov 07:16 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasentropfen_swissmedicinfo.html
-rw-r--r-- 1 apache apache   738 18. Nov 07:17 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasentropfen_swissmedicinfo.styles
-rw-r--r-- 1 apache apache 22287 14. Nov 07:16 /var/www/oddb.org/data/html/patinfo/de/Rinosedin, Nasentropfen_swissmedicinfo.yaml

On oddb-ci2 I don't have any files with Rinosedin. Starting import_daily to see whether the problem really got away or not. Here it did not go away. Add a pry statement in the failure and restart import_daily again.

Looking at the other error seen here:

Plugin: ODDB::TextInfoPlugin
Error: NoMethodError
Message: undefined method `collect' for "<SPAN style=\"font-style:italic;\">Hilfsstoffe:</SPAN>":String
Backtrace:
/var/www/oddb.org/src/model/registration_observer.rb:36:in `iksnrs'
/var/www/oddb.org/src/view/rss/fachinfo.rb:60:in `block (2 levels) in to_html'
/var/www/oddb.org/src/view/rss/fachinfo.rb:50:in `each'
/var/www/oddb.org/src/view/rss/fachinfo.rb:50:in `block in to_html'
/usr/local/lib/ruby/1.9.1/rss/maker/base.rb:438:in `make'
/usr/local/lib/ruby/1.9.1/rss/maker/base.rb:402:in `make'
/usr/local/lib/ruby/1.9.1/rss/maker.rb:9:in `make'
/var/www/oddb.org/src/view/rss/fachinfo.rb:40:in `to_html'
/var/www/oddb.org/src/plugin/plugin.rb:84:in `block (2 levels) in update_rss_feeds'
/var/www/oddb.org/src/plugin/plugin.rb:83:in `open'
/var/www/oddb.org/src/plugin/plugin.rb:83:in `block in update_rss_feeds'
/var/www/oddb.org/src/plugin/plugin.rb:47:in `call'
/var/www/oddb.org/src/plugin/plugin.rb:47:in `block in l10n_sessions'
/var/www/oddb.org/src/plugin/plugin.rb:44:in `each_key'
/var/www/oddb.org/src/plugin/plugin.rb:44:in `l10n_sessions'
/var/www/oddb.org/src/plugin/plugin.rb:75:in `update_rss_feeds'
/var/www/oddb.org/src/plugin/text_info.rb:120:in `postprocess'
/var/www/oddb.org/src/plugin/text_info.rb:1484:in `import_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:573:in `block in update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:567:in `update_notify_simple'
/var/www/oddb.org/src/util/updater.rb:344:in `update_textinfo_swissmedicinfo'
/var/www/oddb.org/src/util/updater.rb:197:in `run'
jobs/import_daily:13:in `block in <module:Util>'
/var/www/oddb.org/src/util/job.rb:40:in `call'
/var/www/oddb.org/src/util/job.rb:40:in `run'
jobs/import_daily:12:in `<module:Util>'
jobs/import_daily:11:in `<module:ODDB>'
jobs/import_daily:10:in `<main>'

Fixed the error with image_link and added a unit-test for it. Dropping and reloading the database to ensure that everything is okay. Pushed commit Fix handling generating text from image_links. Installed it on thinpower and restarted the fiparse daemon.

Snap-Back for FI diff is not correct

Creating a watir test for snap-back

  • while navigating after a search
  • after clicking on the first fachinfo link at the home page

This is not difficult, but I am unable to create in my mind a rule how the snap-back shold work.

After a chat with Zeno we decided that the snapback should get its info from the URL and the URL could be rewritten from eg. http://ch.oddb.org/de/gcc/search/zone/drugs/search_query/58392/search_type/st_registration?#best_result

   http://ch.oddb.org/de/gcc/search/zone/drugs/swissmedicnr/58392/

or http://ch.oddb.org/de/gcc/drugs/swissmedicnr/58392/ Could we take out the state-ID?

Also remarked that when entering first a IKSNR and then changing the search type to 'swissmedic' the URL is /de/gcc. Doing the entries in the reverse order gives the long (correct) URL. This must be fixed, too. Pushed commit https://github.com/ngiger/oddb.org/commit/97ddf148dbdf77b4f98e9314336e2d506718f475 Add watir tests for snapback

If https://mail.google.com/mail/u/0/#inbox/151060d2e96bc157 tells in title about two changes, it should show two not one!

I think this happens because here we have two changes

  1. A minor change, that > got corrected to and
  2. The line got moved but because of the missing context, you cannot see where it was moved to

No. As I had restored the old data I was able to get the old text from oddb-ci2 and compare it to the new text in thinpower. Only 1 line in the section "Unerwünschte Wirkungen" was changed.

Therefore trying to make a failing unit test for this occasion. Okay. It looks like for each change I get two chunks, namely once with - and one with +. Trying to see whether I can make a diff with a single chunk. http://ch.oddb.org/de/gcc/show/fachinfo/44603/diff/18.11.2015 contains 2 different changed parts, changing 3 lines, but reporting 3. I thinks we should change e.g. "4 Änderungen" by "2 gelöschte und 2 neue Zeilen" or "geänderte Zeilen (+2/-2)". Waiting for Zeno to decide.

view · edit · sidebar · attach · print · history
Page last modified on November 18, 2015, at 08:00 PM