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 +4 -4
- data/History.txt +4 -0
- data/lib/oddb2xml/builder.rb +1 -2
- data/lib/oddb2xml/version.rb +1 -1
- data/spec/builder_spec.rb +24 -1
- data/spec/data/swissmedic_package.xlsx +0 -0
- data/spec/extractor_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cca220296af283c4de0922213c3be785a7cc8f2c
|
4
|
+
data.tar.gz: 9c8be6ecf7b70e07387c1a6252cebf3bea4e243f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce8ed5a537cb1f0ededcddfac17ceac36276d165ad0524854756f7fafed1c64bb3f3b09f048849319ed573617f42ff6569c522aa93dbdee4ca969b0e5cf14d74
|
7
|
+
data.tar.gz: c86602624445ed966d3c166e0e520c95d338eed4ac0c9cf91df1498181093d5ff96de8768d25f9bcbd99cdad1b8386c217e5778720fc186d031664b1db24c860
|
data/History.txt
CHANGED
data/lib/oddb2xml/builder.rb
CHANGED
@@ -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!
|
data/lib/oddb2xml/version.rb
CHANGED
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 =
|
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
|
data/spec/extractor_spec.rb
CHANGED
@@ -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(
|
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.
|
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-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|