view · edit · sidebar · attach · print · history

Index>

20150119-gem-gtin2atc

Summary

  • create new gem which dumps all medis with ean13 and atc code
  • create meaningful error when passing invalid options to oddb2ml

Commits

Index

Keep in Mind for work to do in 2015
  • 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!
  • Display 10 recalls not only those from this month
  • Import via data/medreg_companies.yaml
  • Search via analysis does not work (spec/searchbar_spec.rb:90)

---

create meaningful error when passing invalid options to oddb2ml

Zeno remarked that running oddb2xml -a nonpharma -p zurrose lead to an exception. Stems from the fact that we dropped some previously required parameters to the flags -a, -e, -p.

Clarified history.txt, added an spec test and changed the outcome when giving wrong parameters like this

bin/oddb2xml -a nonpharma -p zurrose
Please remove unused parameters ["nonpharma", "zurrose"]

Fixed with commits Better handling when passing too many options and Bumped version to 1.9.1

Okay. I made a really dumb error. Trying rake test now and waiting two hours to get the result.

Remarked that e.g. for GTIN 7680353660163 we lost the DSCRD and DSCRF in oddb_product.xml with version 1.9.2. Same for CPTCMP.

Also a lot of substances have changes their names. I think they changes the IDs was we have now only 1375 instead of 1458 items.

Verifying for GTIN 7680147700389

     <DSCRD>Kendural Depottabl </DSCRD>
     <DSCRF>Kendural cpr dépôt </DSCRF>

This is probably a consequence that the Preparations.xml does no longer contain the Pharmacode. See line 93 of lib/oddb2xml/builder.rb where we have in prepare_article if seq = @items[phar]. I have to rethink we (internally) used the deprecated pharmacode as an index. We should switch to gtin, but will this work? No. we must use the PackId.

Pushed commit Fixed missing DSCRD/DSCF in oddb_product.xml because BAG-Preparation.xml ships without Pharmacode now. Running rake test now.

create new gem which dumps all medis with GTIN and ATC code

Getting stuff done. First extracting gtin,atc_code, pharmacode from BAG-XML. Spec-Tests run. The actual Preparations.xml do not contain the pharmacode anymore.

We get the data from two sources

For testing purposes I compared the ATC and GTIN from both sources and got the following result Compared 16024 entries from BAG and SwissIndex. Matching 8954 only_in_bag 248 only_in_swissindex 6811 different_atc 11

Details are in Attach:gtin2atc_1.txt

Added the following features:

  • Download the files only if they are absent or older than 24 hours
  • Reading and comparing all GTINs from all sources takes a long time, because extracting the 2.5 MB long Packungen.xls takes ages.
  • Better logging, where we spend time

Pushed commits:

Will continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on January 19, 2015, at 05:58 PM