view · edit · sidebar · attach · print · history

Index>

20150310-epha-interaction-job

Summary

  • Re-Add epha-interaction import job
  • Add all components in oddb2xml whether they appear in Wirkstoffe or not

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

Add all components in oddb2xml whether they appear in Wirkstoffe or not

Must add components listed in Column M of swissmedic-packages whether they appear in Column O or not not (when running oddb2xml --calc

Adding some more tests for splitting the compositions into components. Working on improving the regular expression to get the composition.

Must resolve the problem on how to avoid adding the the last part, eg. aqua ad 100 ml or Excipiens Ad Emulsionem Pro as a separate component. Also my local version mangles names like Globulina Equina (immunisé Avec Coeur, Tissu Pulmonaire, Reins De Porcins) to Reins De Porcins). Handling colors like "E 127" or conserv.: E 216, E 218 is also wrong. Current diff is Attach:oddb_xml_components.txt.

Will continue Friday.

Re-Add epha-interaction import job

After readding the import jobs, many watir tests failed and the interactions don't show up correctly. E.g. http://oddb-ci2.dyndns.org/de/gcc/home_interactions/7680583920112,7680592060090 Must figure out the reason.

Problem was, that we must deal differently with a Hash when it contains odba-objects. With this diff, everything reverted to the correct behaviour

index fcb3c9c..742818e 100644
--- a/src/model/epha_interaction.rb
+++ b/src/model/epha_interaction.rb
@@ -41,7 +41,14 @@ module ODDB
       atc_codes
     end
     def EphaInteractions.get_epha_interaction(atc_code_self, atc_code_other)
-      @@epha_interactions[ [atc_code_self, atc_code_other] ]
+      result = []
+      @@epha_interactions.each{ | key, value |
+                                if key[0].to_s.eql?(atc_code_self) and  key[1].to_s.eql?(atc_code_other)
+                                  result = value
+                                  break
+                                end
+                              }
+      result
     end

Running the watir tests again, to see whether the problems (except ZSR) have gone away.

Fixed two problem with failing watir specs. Then pushed the commits

view · edit · sidebar · attach · print · history
Page last modified on March 11, 2015, at 05:46 PM