oddb2xml 2.5.6 → 2.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a10d7a7e390e1a011cfbc12a163d74a5f4b9862a
4
- data.tar.gz: 1c3c090fd7374270b4db1734ca4bea038b1989b7
3
+ metadata.gz: cca220296af283c4de0922213c3be785a7cc8f2c
4
+ data.tar.gz: 9c8be6ecf7b70e07387c1a6252cebf3bea4e243f
5
5
  SHA512:
6
- metadata.gz: 8b2bec4f4d62e6521fc85b001b79b2dc33bdf521d8148b7e4dc312f912476c243af9a793a336426819ffd5c0b75f1efd53804be1641dad2addbefe305fcd49a9
7
- data.tar.gz: de26b6f805072affe82abd5ffa68eafc2b1fecbe49620d6e756348d030c5d3a7047900842838c703723c0587994a50b40b0c6cdb60c65b54302cf72bc23faadd
6
+ metadata.gz: ce8ed5a537cb1f0ededcddfac17ceac36276d165ad0524854756f7fafed1c64bb3f3b09f048849319ed573617f42ff6569c522aa93dbdee4ca969b0e5cf14d74
7
+ data.tar.gz: c86602624445ed966d3c166e0e520c95d338eed4ac0c9cf91df1498181093d5ff96de8768d25f9bcbd99cdad1b8386c217e5778720fc186d031664b1db24c860
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.5.7 / 11.09.2018
2
+
3
+ * Emit ATC code if product is not in refdata
4
+
1
5
  === 2.5.6 / 21.08.2018
2
6
 
3
7
  * Artikelstamm: Add homeopathic drugs of chapter 70 http://bag.e-mediat.net/Sl2007.web.external/varia_De.htm
@@ -550,6 +550,7 @@ module Oddb2xml
550
550
  xml.PRODNO obj[:prodno] if obj[:prodno]
551
551
  xml.DSCRD check_name(obj, :de)
552
552
  xml.DSCRF check_name(obj, :fr)
553
+ xml.ATC obj[:atc_code] unless obj[:atc_code].empty?
553
554
  xml.IT obj[:ith_swissmedic] if obj[:ith_swissmedic]
554
555
  xml.CPT
555
556
  xml.PackGrSwissmedic obj[:package_size] if obj[:package_size]
@@ -1667,8 +1668,6 @@ module Oddb2xml
1667
1668
  emitted_prodno << prodno
1668
1669
  nr_products += 1
1669
1670
  xml.PRODUCT do
1670
- binding.pry if '2500000588532'.eql?(prodno)
1671
-
1672
1671
  xml.PRODNO prodno
1673
1672
  if sequence
1674
1673
  xml.SALECD('A') # these products are always active!
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.5.6"
2
+ VERSION = "2.5.7"
3
3
  end
data/spec/builder_spec.rb CHANGED
@@ -480,7 +480,7 @@ describe Oddb2xml::Builder do
480
480
  NrInteractions = 2
481
481
  NrCodes = 5
482
482
  NrProdno = 31
483
- NrPackages = 43
483
+ NrPackages = 44
484
484
  NrProducts = 39
485
485
  RegExpDesitin = /1125819012LEVETIRACETAM DESITIN Mini Filmtab 250 mg 30 Stk/
486
486
  include ServerMockHelper
@@ -582,6 +582,29 @@ describe Oddb2xml::Builder do
582
582
  expect(found)
583
583
  end
584
584
 
585
+ it 'should generate ATC for 7680002770014' do
586
+ oddb_product_xml = IO.read(File.join(Oddb2xml::WorkDir, 'oddb_product.xml'))
587
+ text = %(<GTIN>7680002770014</GTIN>
588
+ <PRODNO>0027701</PRODNO>
589
+ <DSCRD>SEROCYTOL Herz-Gefässe Supp 3 Stk</DSCRD>
590
+ <DSCRF>SEROCYTOL Coeur-Vaisseaux supp 3 pce</DSCRF>
591
+ <ATC>J06AA99</ATC>
592
+ <IT>08.07.</IT>
593
+ <CPT/>)
594
+ expect(oddb_product_xml.index(text)).to be >= 1
595
+ end
596
+
597
+ it 'should generate ATC for 7680002770021' do
598
+ oddb_product_xml = IO.read(File.join(Oddb2xml::WorkDir, 'oddb_product.xml'))
599
+ text2 = %( <GTIN>7680002770021</GTIN>
600
+ <PRODNO>0027701</PRODNO>
601
+ <DSCRD>Coeur-Vaisseaux Sérocytol, suppositoire</DSCRD>
602
+ <DSCRF>Coeur-Vaisseaux Sérocytol, suppositoire</DSCRF>
603
+ <ATC>J06AA</ATC>
604
+ <IT>08.07.</IT>
605
+ <CPT/>)
606
+ expect(oddb_product_xml.index(text2)).to be >= 1
607
+ end
585
608
  end
586
609
 
587
610
  context 'when -o for fachinfo is given' do
Binary file
@@ -182,7 +182,7 @@ describe Oddb2xml::SwissmedicExtractor do
182
182
  @packs.find{|pack| pack[1][:ean13] == ean13.to_s }[1]
183
183
  end
184
184
  it 'should have correct nr of packages' do
185
- expect(@packs.size).to eq(39)
185
+ expect(@packs.size).to eq(40)
186
186
  end
187
187
 
188
188
  it 'should have serocytol' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oddb2xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.6
4
+ version: 2.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhiro Asaka, Zeno R.R. Davatz, Niklaus Giger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-21 00:00:00.000000000 Z
11
+ date: 2018-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip