Verifying import of yesterday. First via bin/admin
ch.oddb> atc_class('L01XC21') -> Ramucirumab ch.oddb> atc_class('L01XC21').origin -> whocc_new ch.oddb> registration('65330').name_base -> OFEV 100 mg ch.oddb> registration('65330').atc_class -> Nintedanib -> L01XE31 ch.oddb> atc_class('L01XE31').origin -> whocc_new ch.oddb> atc_class('L01XE31') -> Nintedanib
But looking via http://oddb-ci2.dyndns.org/de/gcc/search/zone/drugs/search_query/Nintedanib/search_type/st_substance?#best_result did not produce any result. Restarting oddbd did not help. Running rebuild_indices.
Search via atc_chooser I remarked that I find infos for L01D, but not for L01E http://oddb-ci2.dyndns.org/de/gcc/atc_chooser/code/L01E and http://oddb-ci2.dyndns.org/de/gcc/search/search_query/L01XE31 displays an empty result. This is probably the result that I cannot import import_guidelines and/or DDD for a not yet published ATC.
Deleting 65785 (Esbriet) and 65330 (Ofev) from registration with fachinfo via bin/admin
reg = @system.registration('65330'); delete reg.fachinfo.pointer if reg.fachinfo; update reg.pointer, :fachinfo => nil; delete reg.pointer reg = @system.registration('65782'); delete reg.fachinfo.pointer if reg.fachinfo; update reg.pointer, :fachinfo => nil; delete reg.pointer
Running jobs/update_textinfo_swissmedicinfo --reparse --target=both 65782 65330
to see whether Ofev appears then when looking via price comparison. This did not work, as the ATC-class of the registration is not updated as it should be. Correcting src/plugin/text_info.rb. After a few tries I got everything working. Pushed commit Add new ATC code from who. Correct plugin/text_info.rb
Imported yus db from thinpower. Changed my password and with my commit the http://oddb-ci2.dyndns.org/de/gcc/user/name/martin.born%40pharmasuisse.org worked fine. Pushed commit Handle UTF-8 problem in login
Still having problems on thinpower. Pushed commit Handle UTF-8 problem in login. Second try
Started porting to ruby 2.x. Progress and big ideas are found under http://dev.ywesee.com/Choddb/Ruby20
Pushed commits for yus:
Pushed some commits for odba:
Create a history of FI changes and add a nice diff (colored) to compare any two versions. Look at gems like diffy or differ
We get some inspiration from the prices info. There the prices form an array of Money. Each has it valid_from date and newer entries seem to be inserted in the front.
Therefore I think we should add the following features to fachinfo
de/gcc/show/reg/00373/diff/2015-10-27
should work and correspond with "Data was imported".
Is the fachinfo.add_change_log_item method really used? I only find in src/plugin/fachinfo_invoicer.rb, src/state/admin/fachinfoconfirm.rb, src/state/drugs/fachinfo.rb. This functionality should be dropped. Found an existing change_log via bin/admin
ch.oddb> registrations.values.find{|x| x.fachinfo and x.fachinfo.change_log.size > 0}.iksnr -> 55561 ch.oddb> registration('55561').fachinfo.change_log.size -> 3 ch.oddb> registration('55561').fachinfo.change_log.first -> #<ODDB::Fachinfo::ChangeLogItem:0x007f71949ef8d8> ch.oddb> registration('55561').fachinfo.change_log.first.email -> zdavatz@ywesee.com ch.oddb> registration('55561').fachinfo.change_log.first.time -> 2012-07-16 11:58:29 +0200 ch.oddb> registration('55561').fachinfo.change_log.first.chapter -> uploaded ch.oddb> registration('55561').fachinfo.change_log.first.language -> de
Question: Do we need the same for the patinfo?
Choosing between gems and differ
Diffy seems to have the necessary functionality, eg. diffing two strings (or files), generating html with -/+ sign, number lines surrounding
Next sub-task is generating a unit tests and changes in model to test two different versions of a fachinfo.
Removed old change_log functionality. Added new method text to fachinfo. Tested with bin/admin
ch.oddb> registration('00485').fachinfo.de.effects.to_s[0..150] -> Eigenschaften/Wirkungen ATC-Code: J07BB02 Die Schutzwirkung des Impfstoffs ist innerhalb von 2-3 Wochen nach Injektion erreicht. Die Dauer der Schutzwi ch.oddb> registration('00485').fachinfo.fr.effects.to_s[0..150] -> Propriétés/Effets Code ATC: J07BB02 La séroprotection est obtenue dans les 2 à 3 semaines suivant l'injection du vaccin. La durée de l'immunité post-va ch.oddb> registration('00485').fachinfo.fr.effects.to_s[0..150] -> Propriétés/Effets Code ATC: J07BB02 La séroprotection est obtenue dans les 2 à 3 semaines suivant l'injection du vaccin. La durée de l'immunité post-va ch.oddb> registration('00485').fachinfo.fr.text.to_s[0..150] -> Composition Principes actifs Influvac est un vaccin anti-grippal inactivé cultivé sur œufs de poule fécondés issus d'élevages de poules saines, à base ch.oddb> registration('00485').fachinfo.de.text.to_s[0..150] -> Zusammensetzung Wirkstoffe Influvac ist ein auf befruchteten Hühnereiern aus gesunder Hühnerzucht hergestellter inaktivierter Influenzavirus-Impfstoff ch.oddb> registration('00485').fachinfo.fr.text.to_s[-150..-1] -> lage de 10 x 1 seringue prête à l'emploi de 0,5 ml. [B]Titulaire de l’autorisation BGP Products GmbH, 6341 Baar.Mise à jour de l’information Mai 2014. ch.oddb> registration('00485').fachinfo.de.text.to_s[-150..-1] -> tigspritze zu 0,5 ml [B] Packung zu 10 x 1 Fertigspritze zu 0,5 ml [B]Zulassungsinhaberin BGP Products GmbH, 6341 Baar.Stand der Information Mai 2014. ch.oddb> registration('00485').fachinfo.de.text.size -> 9327 ch.oddb> registration('00485').fachinfo.fr.text.size -> 9736
Running the watir tests before pushing commit.
Thinking whether I want to include the diff functionality directly in the FachinfoDocument class or moving it into a seperate class. Patinfo? And what should I change in the logs? The whole text (which is quite often several 10 or 100 kB big). Or only the diff? But in which format?