view · edit · sidebar · attach · print · history

Index>

20151027-fi-changelog

Summary

  • Port oddb.org to ruby 2.x
  • Diff fachinfo

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.

Port oddb.org to ruby 2.x

Added Ruby 2.2.3 for travis-ci in spreadsheet. See commit Add travis build for Ruby 2.2.3

Added Branch ruby2x in ngiger/oddb.org. Committed Made oddb.org run many unit tests under Ruby 2.2.3.

Failing test/suite.rb are test_util and test_view. For the view it looks as Ruby 2.x has a different order for hashes and some problems might come from htmlgrid.

When a new fachinfo is imported, we should save the differences to the last fachinfo

Looking at the watir test, to see if everything is still okay. Fixed a problem that the URL for amiko changed, using the constants from the lnf. Also some interaction text changed. Medical products display differently, too.

Working on adding a diff support when updating a fachinfo. Moved ChangeLogItem from Fachinfo -> FachinfoDocument and using only fields time and diff (Diffy::Diff). Adapted test_model/fachinfo.rb to reflect this changes.

Adding a test change using

ch.oddb> registration('57813').fachinfo.de.unwanted_effects.next_section.next_paragraph << "Änderungen Niklaus"
-> Änderungen Niklaus
-> undefined method `odba_story' for #<ODDB::FachinfoDocument2001:0x007f78c556fd98>
ch.oddb> registration('57813').fachinfo.de.odba_store
-> #<ODDB::FachinfoDocument2001:0x007f78c556fd98>
ch.oddb> /.*niklaus.*/i.match(registration('57813').fachinfo.de.text)
-> Änderungen NiklausÜberdosierung

Is displayed correctly via http://oddb-ci2.dyndns.org/de/gcc/fachinfo/reg/57813. But it is no longer present after restarting oddbd.

The FI for Alfuzosin 57422 was modified today. Therefore loading an database of September and running jobs/update_textinfo_swissmedicinfo --reparse --target=both 00485 57422 to tests changes for modified and unmodified FI and PI.

Verifying with bin/admin shows, that no change_log was created

ch.oddb> registration('61338').sequences.keys
-> ["01", "02"]
ch.oddb> registration('61338').fachinfo.de.text[-150..-1]
-> enius i.v. Trockensub 1500 mg Durchstfl 10. (B)Zulassungsinhaberin
Fresenius Kabi (Schweiz) AG, 6370 Oberdorf NW.Stand der Information
September 2014.
# Wait for import
ch.oddb> registration('61338').fachinfo.de.text[-150..-1]
->  Fresenius i.v. Trockensub 1500 mg Durchstfl 10. [B]Zulassungsinhaberin
Fresenius Kabi (Schweiz) AG, 6370 Oberdorf NW.Stand der Information
Juni 2015.
ch.oddb> registration('61338').fachinfo.de.change_log
-> []
ch.oddb> registration('61338').sequences.keys
-> ["01", "02", "00"]

Also the sequence '00' was created. This must be corrected!!

I am having problems storing the Diffy::Diff. Pry reports

[16] pry(ODDB::TextInfoPlugin)> updated_fi.de.add_change_log_item(old_text_de, new_text)
TypeError: can't dump File
from /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/marshal.rb:10:in `dump'
[17] pry(ODDB::TextInfoPlugin)> new_text.size
=> 17817
[18] pry(ODDB::TextInfoPlugin)> old_text_de.size
=> 17451
[19] pry(ODDB::TextInfoPlugin)> old_text_de.class
=> String
[20] pry(ODDB::TextInfoPlugin)> old_text_de.class
=> String
[23] pry(ODDB::TextInfoPlugin)> tst = Diffy::Diff.new(old_text_de, new_text)
<..>
\ Kein Zeilenumbruch am Dateiende.
+Durchstichfläschchen zu 1.5 mg und Lösungsmittelampullen zu 1 ml: 3 + 3 (A)
+Durchstichfläschchen zu 7.5 mg und Lösungsmittelampullen zu 5 ml: 1 + 1 (A)Zulassungsinhaberin
+sanofi-aventis (schweiz) ag, 1214 Vernier/GE.Stand der Information
+Juli 2015.
\ Kein Zeilenumbruch am Dateiende.

[22] pry(ODDB::TextInfoPlugin)> tst.to_s.size
=> 24246

Must look deep into odba, to see show I can change this.

view · edit · sidebar · attach · print · history
Page last modified on October 28, 2015, at 05:52 PM