view · edit · sidebar · attach · print · history

Index>

20150203-migel-login

Summary

  • Fix Migel login
  • oddb2xml should correctly handle units and package size

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.
  • Display 10 recalls not only those from this month
  • Import via data/medreg_companies.yaml

---

oddb2xml should correctly handle units and package size

This is similar problem Hannes Wyss resolved a long time ago with the galenic forms, etc in oddb.org. Therefore I must have a look at this code to see, whether I can copy parts of it. Parts of it can be found in method _update_galenic_form of src/plugin/swissmedic.rb. Galenic-groups and forms were carefully and manually created. A dump can be found under oddb.org as yaml files test/integration/data/galenic_forms.yaml and test/integration/data/galenic_groups.yaml

Also we have under src/util/oddbapp.rb a method create_commercial_forms. In total oddb.org knows of 37 galenic_groups and 885 galenidc_forms. Looking at data/downloads/galenic_groups.yaml and data/downloads/galenic_forms.yaml I see that both files are identical and contain only the galenic_group. This has to be corrected. Also the yaml-files are not UTF-8. Found a way how we could possible convert our database to the new yaml in http://blog.rayapps.com/2013/03/11/7-things-that-can-go-wrong-with-ruby-19-string-encodings/#toc_12. But even for Ruby 2.x there is now a gem syck, which we could use. To convert the yaml files generated use a_string.gsub(/(\\x[0-9A-F]{2})+/){|m| eval "\"#{m}\""}.force_encoding("UTF-8")

Also Zeno started to summarize possible variations. We should probably use them (maybe adding a concrete example for each one) and start creating test cases for a new separate helper class.

Pushed commit Fix exporting galenic_forms

Pulled fix on thinpower and manually started jobs/export_galenic

Will generate a new file oddb_calc.xml containing GTIN, Name (german) and new entities.

But first generating some UnitTests for splitting everything out. In src/model/part.rb I find a definition for commercial_form which attr_reader :count, :multi, :measure, :addition, :scale # s.a. commercial_form in oddb.org/src/model/part.rb

This for my first test http://ch.oddb.org/de/gcc/drug/reg/54015/seq/01/pack/100 returns via bin/admin

ch.oddb> registration('54015').sequence('01').package('100').parts.first.count
-> 1
ch.oddb> registration('54015').sequence('01').package('100').parts.first.multi
-> 5 
ch.oddb> registration('54015').sequence('01').package('100').parts.first.measure
-> 100 ml
ch.oddb> registration('54015').sequence('01').package('100').parts.first.addition
-> 0
ch.oddb> registration('54015').sequence('01').package('100').parts.first.scale
-> 1 

With commit Builds oddb_calc.xml. Many missing format it parses the whole swissmedic_package.xlsx without any problem, while still producing many wrong formats.

Fix Migel login

Problem is that after a successfull login we loose the login status when going to a different zone. Why? Login seems to work, when we use a correct username/password, e.g. for desitin.

However we have the problem that the username and or stuff like "Willkommen beim gesponsorten Login von Desitin Pharma" does not appear. Must dig therefore in home views of each zone.

Okay. Found that in the files

  • src/view/pharmacies/welcomehead.rb
  • src/view/hospitals/welcomehead.rb
  • src/view/doctors/welcomehead.rb

we are missing a component [1,0,3] => :welcome,

Pushed fix Fix displaying logged in user. Added watir test

view · edit · sidebar · attach · print · history
Page last modified on February 03, 2015, at 06:22 PM