oddb2xml 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Elexis_Artikelstamm_v5.xsd +4 -0
- data/History.txt +9 -0
- data/artikelstamm.md +13 -0
- data/lib/oddb2xml/builder.rb +9 -6
- data/lib/oddb2xml/cli.rb +1 -1
- data/lib/oddb2xml/extractor.rb +16 -7
- data/lib/oddb2xml/util.rb +1 -0
- data/lib/oddb2xml/version.rb +1 -1
- data/oddb2xml.xsd +4 -0
- data/spec/artikelstamm_spec.rb +44 -10
- data/spec/builder_spec.rb +5 -5
- data/spec/data/Preparations.xml +138 -0
- data/spec/data/refdata_NonPharma.xml +9 -0
- data/spec/data/refdata_Pharma.xml +11 -0
- data/spec/data/swissmedic_package.xlsx +0 -0
- data/spec/data/transfer.dat +2 -0
- data/spec/extractor_spec.rb +1 -1
- data/spec/spec_helper.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: eb05ed21aeb328d6c0e778329e443bc05452ac01
|
4
|
+
data.tar.gz: 123c961d1f3f418d4c95e042b8ed0ee71b16befb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ade63ce2514719a6ef2aa9768dbdf3b623050a6a27f40df3e500d1c3dc9c79cd646c939bc4a0a70db41b41d4b1022971a94c2f9d6b5cdaea355ec7eba4f771
|
7
|
+
data.tar.gz: 43a0b83e64bb749026b203693f865b708c88e8527c9168a135e7a59b5f52b70043522ea79c7fa544cca13d3436a582dc028c11b93c02963414cb26e2fddcfe62
|
data/Elexis_Artikelstamm_v5.xsd
CHANGED
@@ -135,6 +135,10 @@
|
|
135
135
|
Reference number
|
136
136
|
(GTIN = Global trade
|
137
137
|
item number)
|
138
|
+
GTIN may be 8, 12, 13 or 14 chars long (https://en.wikipedia.org/wiki/Global_Trade_Item_Number)
|
139
|
+
The EAN-8 code is an eight-digit barcode used usually for very small articles, such as battery for hearing aid, where fitting a larger code onto the item would be difficult
|
140
|
+
you may test GTIN via the GS1 information GEPIR, eg www.gepir.ch or globally http://gepir.gs1.org/
|
141
|
+
Drugs registered in Switzerland have GTINs starting with 7680 (which is reserved by Swissmedic)
|
138
142
|
</xs:documentation>
|
139
143
|
</xs:annotation>
|
140
144
|
<xs:simpleType>
|
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
=== 2.5.2 / 21.03.2018
|
2
|
+
|
3
|
+
* Artikelstamm
|
4
|
+
** Add prices for GTIN with 14 chars
|
5
|
+
** Add ATC-Code for products like priorix
|
6
|
+
* Handle GTIN with size of 8,12,14 correctly
|
7
|
+
* Don't call exit(2) if xmllint is not present
|
8
|
+
* Corrected formatting of artikelstamm.md
|
9
|
+
|
1
10
|
=== 2.5.1 / 09.02.2018
|
2
11
|
|
3
12
|
* Updated requirement for nokogiri to >= 1.8.2
|
data/artikelstamm.md
CHANGED
@@ -15,12 +15,14 @@ Die für den Artikelstamm gebrauchten Ursprungs-Dateien werden
|
|
15
15
|
** transfer.utf8 ISO8859-1 transfer.dat als utf-8 um leichter unter Linux greppen zu können
|
16
16
|
|
17
17
|
Damit ist möglich nach einem Durchlauf den Ursprung der Daten zu ermitteln, z.B. `grep -r 7680273040281 downloads` git dann folgende Zeilen zurück
|
18
|
+
|
18
19
|
downloads/transfer.dat:1120098878HALDOL Tabl 1 mg 50 Stk 000278000660100B010500076802730402812
|
19
20
|
downloads/transfer.utf8:1120098878HALDOL Tabl 1 mg 50 Stk 000278000660100B010500076802730402812
|
20
21
|
downloads/Preparations.xml: <GTIN>7680273040281</GTIN>
|
21
22
|
downloads/refdata_Pharma.xml: <GTIN>7680273040281</GTIN>
|
22
23
|
|
23
24
|
Oder
|
25
|
+
|
24
26
|
> grep -ri FERRO-GRADUMET downloads
|
25
27
|
downloads/transfer.dat:1120020244FERRO-GRADUMET Depottabl 30 Stk 000896001380300C060710076803164401152
|
26
28
|
downloads/transfer.dat:1121245933FERRO-GRADUMET Depottabl 90 Stk 002296003540300C060710076803164403822
|
@@ -48,6 +50,17 @@ Beim Tranfer.dat werden Zeilen ausgelassen, wenn eine der folgenden Bedingungen
|
|
48
50
|
* Die Zeile beginnt mit 113 (inaktiv) und die GTIN beginnt mit 7680 (aka Swissmedic)
|
49
51
|
* Die Zeile beginnt mit 113 (inaktiv) und sowohl der Public als auch der Extfactory Preis is 0
|
50
52
|
|
53
|
+
### GTIN
|
54
|
+
|
55
|
+
GTIN may be 8, 12, 13 or 14 chars long (https://en.wikipedia.org/wiki/Global_Trade_Item_Number)
|
56
|
+
|
57
|
+
The EAN-8 code is an eight-digit barcode used usually for very small articles, such as a battery for hearing aid, where fitting a larger code onto the item would be difficult
|
58
|
+
|
59
|
+
You may test GTIN via the GS1 information GEPIR for Switzerland, eg www.gepir.ch or globally http://gepir.gs1.org/
|
60
|
+
|
61
|
+
Drugs registered in Switzerland have GTINs starting with 7680 (which is reserved by Swissmedic)
|
62
|
+
|
63
|
+
|
51
64
|
## UnitTests
|
52
65
|
|
53
66
|
Dafür werden Ruby RSpec tests verwendet. Die Testabdeckung ist gut.
|
data/lib/oddb2xml/builder.rb
CHANGED
@@ -1528,6 +1528,7 @@ module Oddb2xml
|
|
1528
1528
|
# Set the pharmatype to 'Y' for outdated products, which are no longer found
|
1529
1529
|
# in refdata/packungen
|
1530
1530
|
patched_pharma_type = (/^7680/.match(ean13.to_s.rjust(13, '0')) ? 'P': 'N' )
|
1531
|
+
next if /^#{Oddb2xml::FAKE_GTIN_START}/.match(ean13.to_s)
|
1531
1532
|
xml.ITEM({'PHARMATYPE' => patched_pharma_type }) do
|
1532
1533
|
xml.GTIN ean13.to_s.rjust(13, '0')
|
1533
1534
|
xml.PHAR obj[:pharmacode]
|
@@ -1586,8 +1587,9 @@ module Oddb2xml
|
|
1586
1587
|
ean13 = product[0]
|
1587
1588
|
obj = product[1]
|
1588
1589
|
next if /^Q/i.match(obj[:atc])
|
1589
|
-
sequence = obj[:seq]
|
1590
1590
|
ean = obj[:ean13]
|
1591
|
+
sequence = obj[:seq]
|
1592
|
+
sequence ||= @products[ean][:seq] if @products[ean]
|
1591
1593
|
next unless check_name(obj, :de)
|
1592
1594
|
ppac = ((_ppac = @packs[ean.to_s[4..11]] and !_ppac[:is_tier]) ? _ppac : {})
|
1593
1595
|
unless ppac
|
@@ -1595,19 +1597,20 @@ module Oddb2xml
|
|
1595
1597
|
end
|
1596
1598
|
prodno = ppac[:prodno] if ppac[:prodno] and !ppac[:prodno].empty?
|
1597
1599
|
next unless prodno
|
1598
|
-
next unless sequence && sequence[:name_de]
|
1599
1600
|
next if emitted_prodno.index(prodno)
|
1601
|
+
sequence ||= @articles.find{|x| x[:ean13].eql?(ean)}
|
1602
|
+
next unless sequence && (sequence[:name_de] || sequence[:desc_de])
|
1600
1603
|
emitted_prodno << prodno
|
1601
1604
|
nr_products += 1
|
1602
1605
|
xml.PRODUCT do
|
1603
1606
|
xml.PRODNO prodno
|
1604
1607
|
if sequence
|
1605
1608
|
xml.SALECD('A') # these products are always active!
|
1606
|
-
override(xml, prodno, :DSCR, (sequence[:name_de] + ' ' + sequence[:desc_de]).strip)
|
1607
|
-
override(xml, prodno, :DSCRF, (sequence[:name_fr] + ' ' + sequence[:desc_fr]).strip)
|
1609
|
+
override(xml, prodno, :DSCR, ((sequence[:name_de] ? sequence[:name_de] : '') + ' ' + sequence[:desc_de]).strip)
|
1610
|
+
override(xml, prodno, :DSCRF, ((sequence[:name_fr] ? sequence[:name_fr] : '') + ' ' + sequence[:desc_fr]).strip)
|
1608
1611
|
end
|
1609
|
-
xml.ATC sequence[:atc_code] if sequence[:atc_code] && !sequence[:atc_code].empty?
|
1610
|
-
if sequence[:packages] && (first_package = sequence[:packages].values.first) &&
|
1612
|
+
xml.ATC sequence[:atc_code] if sequence && sequence[:atc_code] && !sequence[:atc_code].empty?
|
1613
|
+
if sequence && sequence[:packages] && (first_package = sequence[:packages].values.first) &&
|
1611
1614
|
(first_limitation = first_package[:limitations].first)
|
1612
1615
|
lim_code = first_limitation[:code]
|
1613
1616
|
used_limitations << lim_code unless used_limitations.index(lim_code)
|
data/lib/oddb2xml/cli.rb
CHANGED
@@ -81,7 +81,7 @@ module Oddb2xml
|
|
81
81
|
exit
|
82
82
|
end
|
83
83
|
build
|
84
|
-
if @options[:artikelstamm]
|
84
|
+
if @options[:artikelstamm] && system("which xmllint")
|
85
85
|
elexis_v5_xsd = File.expand_path(File.join(__FILE__, '..', '..', '..', 'Elexis_Artikelstamm_v5.xsd'))
|
86
86
|
cmd = "xmllint --noout --schema #{elexis_v5_xsd} #{@_files[:artikelstamm]}"
|
87
87
|
if system(cmd)
|
data/lib/oddb2xml/extractor.rb
CHANGED
@@ -80,8 +80,8 @@ module Oddb2xml
|
|
80
80
|
puts "BagXmlExtractor: Skipping as missing GTIN in SwissmedicNo8 #{pac.SwissmedicNo8} BagDossierNo #{pac.BagDossierNo} PackId #{pac.PackId} #{item[:name_de]}. Skipping"
|
81
81
|
else
|
82
82
|
ean12 = '7680' + pac.SwissmedicNo8
|
83
|
-
pac.GTIN = (ean12 + Oddb2xml.calc_checksum(ean12))
|
84
|
-
puts "BagXmlExtractor:
|
83
|
+
# pac.GTIN = (ean12 + Oddb2xml.calc_checksum(ean12))
|
84
|
+
puts "BagXmlExtractor: Missing GTIN in SwissmedicNo8 #{pac.SwissmedicNo8} BagDossierNo #{pac.BagDossierNo} PackId #{pac.PackId} #{item[:name_de]}."
|
85
85
|
end
|
86
86
|
end
|
87
87
|
ean13 = pac.GTIN.to_s
|
@@ -186,10 +186,15 @@ module Oddb2xml
|
|
186
186
|
items = result.ARTICLE.ITEM
|
187
187
|
items.each do |pac|
|
188
188
|
ean13 = (gtin = pac.GTIN.to_s) ? gtin: '0'
|
189
|
-
if ean13.size
|
190
|
-
puts "Refdata #{@type}
|
189
|
+
if ean13.size < 13
|
190
|
+
puts "Refdata #{@type} use 13 chars not #{ean13.size} for #{ean13}"
|
191
|
+
ean13 = ean13.rjust(13, '0')
|
192
|
+
end
|
193
|
+
if ean13.size == 14 && ean13[0] == '0'
|
194
|
+
puts "Refdata #{@type} remove leading '0' for #{ean13}"
|
191
195
|
ean13 = ean13[1..-1]
|
192
196
|
end
|
197
|
+
# but in refdata_nonPharma we have a about 700 GTINs which are 14 characters and longer
|
193
198
|
item = {}
|
194
199
|
item[:data_origin] = 'refdata'
|
195
200
|
item[:refdata] = true
|
@@ -491,6 +496,7 @@ module Oddb2xml
|
|
491
496
|
def to_hash
|
492
497
|
data = {}
|
493
498
|
while line = @io.gets
|
499
|
+
ean13 = "-1"
|
494
500
|
line = Oddb2xml.patch_some_utf8(line).chomp
|
495
501
|
next if line =~ /(ad us\.* vet)|(\(vet\))/i
|
496
502
|
if @@extended
|
@@ -501,11 +507,11 @@ module Oddb2xml
|
|
501
507
|
pharma_code = line[3..9]
|
502
508
|
if $1.to_s == '0000000000000'
|
503
509
|
@@items_without_ean13s += 1
|
504
|
-
|
510
|
+
next if @artikelstamm && pharma_code.to_i == 0
|
511
|
+
ean13 = Oddb2xml::FAKE_GTIN_START + pharma_code.to_s unless @artikelstamm
|
505
512
|
else
|
506
513
|
ean13 = $1
|
507
514
|
end
|
508
|
-
next if @artikelstamm && /(0{13})(\d{1})$/.match(line)
|
509
515
|
if data[ean13]
|
510
516
|
@@error_file.puts "Duplicate ean13 #{ean13} in line \nact: #{line.chomp}\norg: #{data[ean13][:line]}"
|
511
517
|
@@items_without_ean13s -= 1
|
@@ -517,7 +523,10 @@ module Oddb2xml
|
|
517
523
|
ppub = sprintf("%.2f", line[66,6].gsub(/(\d{2})$/, '.\1').to_f)
|
518
524
|
next if @artikelstamm && /^113/.match(line) && /^7680/.match(ean13)
|
519
525
|
next if @artikelstamm && /^113/.match(line) && ppub.eql?('0.0') && pexf.eql?('0.0')
|
520
|
-
|
526
|
+
next unless ean13
|
527
|
+
key = ean13
|
528
|
+
key = (Oddb2xml::FAKE_GTIN_START + pharma_code.to_s) if ean13.to_i <= 0 # dummy ean13
|
529
|
+
data[key] = {
|
521
530
|
:data_origin => 'zur_rose',
|
522
531
|
:line => line.chomp,
|
523
532
|
:ean13 => ean13,
|
data/lib/oddb2xml/util.rb
CHANGED
data/lib/oddb2xml/version.rb
CHANGED
data/oddb2xml.xsd
CHANGED
@@ -49,6 +49,10 @@
|
|
49
49
|
* DSCRD German name
|
50
50
|
* DSCRF French name (Products/article only from ZurRose do not have a french name)
|
51
51
|
* GTIN
|
52
|
+
GTIN may be 8, 12, 13 or 14 chars long (https://en.wikipedia.org/wiki/Global_Trade_Item_Number)
|
53
|
+
The EAN-8 code is an eight-digit barcode used usually for very small articles, such as a battery for hearing aid, where fitting a larger code onto the item would be difficult
|
54
|
+
you may test GTIN via the GS1 information GEPIR, eg www.gepir.ch or globally http://gepir.gs1.org/
|
55
|
+
Drugs registered in Switzerland have GTINs starting with 7680 (which is reserved by Swissmedic)
|
52
56
|
* PHAR
|
53
57
|
* Status
|
54
58
|
* Since STDATE
|
data/spec/artikelstamm_spec.rb
CHANGED
@@ -24,7 +24,7 @@ describe Oddb2xml::Builder do
|
|
24
24
|
unless @inhalt.index(expected_value)
|
25
25
|
puts expected_value
|
26
26
|
end
|
27
|
-
|
27
|
+
binding.pry unless @inhalt.index(expected_value)
|
28
28
|
expect(@inhalt.index(expected_value)).not_to be nil
|
29
29
|
end
|
30
30
|
def common_run_init(options = {})
|
@@ -69,6 +69,33 @@ describe Oddb2xml::Builder do
|
|
69
69
|
expect(@inhalt).to match /<!--Produced by/
|
70
70
|
end
|
71
71
|
|
72
|
+
it 'should have a GTIN and a public price with 14 chars (ean14)' do
|
73
|
+
expected = %(<ITEM PHARMATYPE="N">
|
74
|
+
<GTIN>68711428066649</GTIN>
|
75
|
+
<PHAR>5863450</PHAR>
|
76
|
+
<SALECD>A</SALECD>
|
77
|
+
<DSCR>3M MEDIPORE+PAD Absorbtionsverb 10x15cm 8 x 25 Stk</DSCR>
|
78
|
+
<DSCRF>3M MEDIPORE+PAD compr absorb 10x15cm 8 x 25 pce</DSCRF>
|
79
|
+
<COMP>
|
80
|
+
<GLN>7610182000007</GLN>
|
81
|
+
</COMP>
|
82
|
+
<PEXF>108.01</PEXF>
|
83
|
+
<PPUB>178.20</PPUB>
|
84
|
+
</ITEM>)
|
85
|
+
expect(@inhalt.index(expected)).not_to be nil
|
86
|
+
end
|
87
|
+
|
88
|
+
it 'should have a ATC for product PRIORIX TETRA' do
|
89
|
+
expected = %(<PRODUCT>
|
90
|
+
<PRODNO>5815801</PRODNO>
|
91
|
+
<SALECD>A</SALECD>
|
92
|
+
<DSCR>PRIORIX TETRA Trockensub c Solv Fertspr</DSCR>
|
93
|
+
<DSCRF>PRIORIX TETRA subst sèche c solv ser pré</DSCRF>
|
94
|
+
<ATC>J07BD54</ATC>
|
95
|
+
</PRODUCT>)
|
96
|
+
expect(@inhalt.index(expected)).not_to be nil
|
97
|
+
end
|
98
|
+
|
72
99
|
it 'should produce a Elexis_Artikelstamm_v5.csv' do
|
73
100
|
expect(File.exists?(@elexis_v5_csv)).to eq true
|
74
101
|
inhalt = File.open(@elexis_v5_csv, 'r+').read
|
@@ -157,10 +184,19 @@ describe Oddb2xml::Builder do
|
|
157
184
|
expect(@inhalt.index('BIOMARIS Voll Meersalz 500 g')).not_to be nil
|
158
185
|
end
|
159
186
|
|
160
|
-
it 'Should not contain PHAR 8809544 Sildenavil
|
187
|
+
it 'Should not contain PHAR 8809544 Sildenavil with pexf and ppub 0.0' do
|
161
188
|
#1128809544Sildenafil Suspension 7mg/ml 100ml 0030850045801000000000000000000000002
|
162
189
|
@inhalt = IO.read(@artikelstamm_name)
|
163
|
-
|
190
|
+
expected = %(<ITEM PHARMATYPE="N">
|
191
|
+
<GTIN>9999998809544</GTIN>
|
192
|
+
<PHAR>8809544</PHAR>
|
193
|
+
<SALECD>A</SALECD>
|
194
|
+
<DSCR>Sildenafil Suspension 7mg/ml 100ml</DSCR>
|
195
|
+
<DSCRF>--missing--</DSCRF>
|
196
|
+
<PEXF>30.85</PEXF>
|
197
|
+
<PPUB>45.80</PPUB>
|
198
|
+
</ITEM>)
|
199
|
+
expect(@inhalt.index(expected)).to be nil
|
164
200
|
end
|
165
201
|
|
166
202
|
it 'should a company EAN for 4042809018288 TENSOPLAST Kompressionsbinde 5cmx4.5m' do
|
@@ -176,15 +212,13 @@ describe Oddb2xml::Builder do
|
|
176
212
|
end
|
177
213
|
|
178
214
|
it 'should contain DIBASE with phar' do
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
expected = %(
|
183
|
-
<GTIN>7680658560014</GTIN>
|
215
|
+
expected = %(<ITEM PHARMATYPE="P">
|
216
|
+
<GTIN>7680658560014</GTIN>
|
217
|
+
<!--override with-->
|
184
218
|
<SALECD>A</SALECD>
|
185
219
|
<DSCR>DIBASE 10'000, orale Tropflösung</DSCR>
|
186
|
-
|
187
|
-
expect(@inhalt.index(
|
220
|
+
<DSCRF>--missing--</DSCRF>)
|
221
|
+
expect(@inhalt.index(expected)).not_to be nil
|
188
222
|
end
|
189
223
|
|
190
224
|
it 'should contain a public price if the item was only in the SL liste (Preparations.xml)' do
|
data/spec/builder_spec.rb
CHANGED
@@ -473,15 +473,15 @@ def checkProductXml(nbr_record = -1)
|
|
473
473
|
end
|
474
474
|
|
475
475
|
describe Oddb2xml::Builder do
|
476
|
-
NrExtendedArticles =
|
477
|
-
NrSubstances =
|
478
|
-
NrLimitations =
|
476
|
+
NrExtendedArticles = 70
|
477
|
+
NrSubstances = 28
|
478
|
+
NrLimitations = 13
|
479
479
|
|
480
480
|
NrInteractions = 2
|
481
481
|
NrCodes = 5
|
482
482
|
NrProdno = 31
|
483
|
-
NrPackages =
|
484
|
-
NrProducts =
|
483
|
+
NrPackages = 39
|
484
|
+
NrProducts = 34
|
485
485
|
RegExpDesitin = /1125819012LEVETIRACETAM DESITIN Mini Filmtab 250 mg 30 Stk/
|
486
486
|
include ServerMockHelper
|
487
487
|
def common_run_init(options = {})
|
data/spec/data/Preparations.xml
CHANGED
@@ -2839,4 +2839,142 @@ Il medico curante è tenuto a raccogliere costantemente i dati necessari nell’
|
|
2839
2839
|
<FlagApd>N</FlagApd>
|
2840
2840
|
</Status>
|
2841
2841
|
</Preparation>
|
2842
|
+
<Preparation ProductCommercial="6280">
|
2843
|
+
<NameDe>Priorix</NameDe>
|
2844
|
+
<NameFr>Priorix</NameFr>
|
2845
|
+
<NameIt>Priorix</NameIt>
|
2846
|
+
<DescriptionDe>Trockensub c Solv</DescriptionDe>
|
2847
|
+
<DescriptionFr>subst sèche c solv </DescriptionFr>
|
2848
|
+
<DescriptionIt>sost secca c solv </DescriptionIt>
|
2849
|
+
<AtcCode>J07BD52</AtcCode>
|
2850
|
+
<SwissmedicNo5>615</SwissmedicNo5>
|
2851
|
+
<FlagItLimitation>Y</FlagItLimitation>
|
2852
|
+
<OrgGenCode />
|
2853
|
+
<FlagSB20>N</FlagSB20>
|
2854
|
+
<CommentDe />
|
2855
|
+
<CommentFr />
|
2856
|
+
<CommentIt />
|
2857
|
+
<VatInEXF>N</VatInEXF>
|
2858
|
+
<Packs>
|
2859
|
+
<Pack ProductKey="6280" PackId="9038">
|
2860
|
+
<DescriptionDe>Fertspr 1 Stk</DescriptionDe>
|
2861
|
+
<DescriptionFr>ser prê 1 pce</DescriptionFr>
|
2862
|
+
<DescriptionIt>sir preriempita 1 pez</DescriptionIt>
|
2863
|
+
<SwissmedicCategory>B</SwissmedicCategory>
|
2864
|
+
<SwissmedicNo8>615001</SwissmedicNo8>
|
2865
|
+
<FlagNarcosis>N</FlagNarcosis>
|
2866
|
+
<FlagModal />
|
2867
|
+
<BagDossierNo>17289</BagDossierNo>
|
2868
|
+
<GTIN>7680006150010</GTIN>
|
2869
|
+
<Limitations />
|
2870
|
+
<PointLimitations />
|
2871
|
+
<Prices>
|
2872
|
+
<ExFactoryPrice>
|
2873
|
+
<Price>20.2902</Price>
|
2874
|
+
<ValidFromDate>01.11.2014</ValidFromDate>
|
2875
|
+
<DivisionDescription />
|
2876
|
+
<PriceTypeCode>PEXF</PriceTypeCode>
|
2877
|
+
<PriceTypeDescriptionDe>Ex-Factory Preis</PriceTypeDescriptionDe>
|
2878
|
+
<PriceTypeDescriptionFr>Prix ex-factory</PriceTypeDescriptionFr>
|
2879
|
+
<PriceTypeDescriptionIt>Prix ex-factory</PriceTypeDescriptionIt>
|
2880
|
+
<PriceChangeTypeCode>AUSLANDPV</PriceChangeTypeCode>
|
2881
|
+
<PriceChangeTypeDescriptionDe>Auslandspreisvergleich</PriceChangeTypeDescriptionDe>
|
2882
|
+
<PriceChangeTypeDescriptionFr>Comparaison des prix avec l'étranger</PriceChangeTypeDescriptionFr>
|
2883
|
+
<PriceChangeTypeDescriptionIt>Comparaison des prix avec l'étranger</PriceChangeTypeDescriptionIt>
|
2884
|
+
</ExFactoryPrice>
|
2885
|
+
<PublicPrice>
|
2886
|
+
<Price>39.7</Price>
|
2887
|
+
<ValidFromDate>01.11.2014</ValidFromDate>
|
2888
|
+
<DivisionDescription />
|
2889
|
+
<PriceTypeCode>PPUB</PriceTypeCode>
|
2890
|
+
<PriceTypeDescriptionDe>Publikumspreis</PriceTypeDescriptionDe>
|
2891
|
+
<PriceTypeDescriptionFr>Prix public</PriceTypeDescriptionFr>
|
2892
|
+
<PriceTypeDescriptionIt>Prix public</PriceTypeDescriptionIt>
|
2893
|
+
<PriceChangeTypeCode>AUSLANDPV</PriceChangeTypeCode>
|
2894
|
+
<PriceChangeTypeDescriptionDe>Auslandspreisvergleich</PriceChangeTypeDescriptionDe>
|
2895
|
+
<PriceChangeTypeDescriptionFr>Comparaison des prix avec l'étranger</PriceChangeTypeDescriptionFr>
|
2896
|
+
<PriceChangeTypeDescriptionIt>Comparaison des prix avec l'étranger</PriceChangeTypeDescriptionIt>
|
2897
|
+
</PublicPrice>
|
2898
|
+
</Prices>
|
2899
|
+
<Partners>
|
2900
|
+
<Partner>
|
2901
|
+
<PartnerType>V</PartnerType>
|
2902
|
+
<Description>GlaxoSmithKline AG</Description>
|
2903
|
+
<Street>Talstrasse 3-5</Street>
|
2904
|
+
<ZipCode>3053</ZipCode>
|
2905
|
+
<Place>Münchenbuchsee</Place>
|
2906
|
+
<Phone>+41318622111</Phone>
|
2907
|
+
</Partner>
|
2908
|
+
</Partners>
|
2909
|
+
<Status>
|
2910
|
+
<IntegrationDate>15.03.1999</IntegrationDate>
|
2911
|
+
<ValidFromDate>15.03.1999</ValidFromDate>
|
2912
|
+
<ValidThruDate>31.12.9999</ValidThruDate>
|
2913
|
+
<StatusTypeCodeSl>0</StatusTypeCodeSl>
|
2914
|
+
<StatusTypeDescriptionSl>Initialzustand</StatusTypeDescriptionSl>
|
2915
|
+
<FlagApd>N</FlagApd>
|
2916
|
+
</Status>
|
2917
|
+
</Pack>
|
2918
|
+
</Packs>
|
2919
|
+
<Substances>
|
2920
|
+
<Substance>
|
2921
|
+
<DescriptionLa>Vaccinum morbillorum vivum</DescriptionLa>
|
2922
|
+
<Quantity />
|
2923
|
+
<QuantityUnit />
|
2924
|
+
</Substance>
|
2925
|
+
<Substance>
|
2926
|
+
<DescriptionLa>Vaccinum parotitidis vivum</DescriptionLa>
|
2927
|
+
<Quantity />
|
2928
|
+
<QuantityUnit />
|
2929
|
+
</Substance>
|
2930
|
+
<Substance>
|
2931
|
+
<DescriptionLa>Vaccinum rubellae vivum attenuatum (cellulae HDC), Wistar RA 27/3</DescriptionLa>
|
2932
|
+
<Quantity>min. 10^3</Quantity>
|
2933
|
+
<QuantityUnit>TCID50</QuantityUnit>
|
2934
|
+
</Substance>
|
2935
|
+
</Substances>
|
2936
|
+
<Limitations />
|
2937
|
+
<ItCodes>
|
2938
|
+
<ItCode Code="08.">
|
2939
|
+
<DescriptionDe>INFEKTIONSKRANKHEITEN</DescriptionDe>
|
2940
|
+
<DescriptionFr>MALADIES INFECTIEUSES</DescriptionFr>
|
2941
|
+
<DescriptionIt>MALATTIE INFETTIVE </DescriptionIt>
|
2942
|
+
<Limitations />
|
2943
|
+
</ItCode>
|
2944
|
+
<ItCode Code="08.08.">
|
2945
|
+
<DescriptionDe>Impfstoffe</DescriptionDe>
|
2946
|
+
<DescriptionFr>Vaccins</DescriptionFr>
|
2947
|
+
<DescriptionIt>Vaccini </DescriptionIt>
|
2948
|
+
<Limitations>
|
2949
|
+
<Limitation>
|
2950
|
+
<LimitationCode>0808</LimitationCode>
|
2951
|
+
<LimitationType>KOM</LimitationType>
|
2952
|
+
<LimitationNiveau>I</LimitationNiveau>
|
2953
|
+
<DescriptionDe>Die Kostenübernahme der Impfstoffe für präventive Massnahmen in der obligatorischen Krankenpflegeversicherung wird in Art. 12a KLV geregelt. Die Voraussetzungen, damit die Impfungen bezahlt werden, sind in Bst. a bis m dieses Artikels abschliessend umschrieben.<br>
|
2954
|
+
Die Preise der Impfstoffe sind Höchstpreise (Art. 52 Abs. 3 KVG) und kommen bei Reihenimpfungen (z.B. im schulärztlichen Dienst) nicht zur Anwendung. In diesen Fällen gelten die von den Krankenversicherern mit den zuständigen Behörden ausgehandelten bzw. die allenfalls von den Behörden festgesetzten Tarife.<br>
|
2955
|
+
Für Hepatitis-B-Reihenimpfungen von Kindern und Jugendlichen gilt der Preis von Fr. 19.80 für eine Dose unter der Voraussetzung einer minimalen Bestellung von 100 Dosen an eine Lieferadresse.<br>
|
2956
|
+
Wenn der Impfstoff zum obgenannten Serienpreis bezogen wird, darf der Arzt, die Ärztin nicht zum Einzelpreis (= Publikumspreis) der SL weiterverrechnen. Dies würde eine klare Umgehung von Art. 56 Absätze 3 und 4 des KVG bedeuten und wäre als Rechtsmissbrauch zu ahnden.</DescriptionDe>
|
2957
|
+
<DescriptionFr>L'article 12a de l'OPAS règle la prise en charge par l'assurance obligatoire des soins des vaccins pour les mesures médicales de prévention. Les conditions de remboursement de ces vaccins sont énoncées de manière exhaustive aux lettres a à m de cet article.<br>
|
2958
|
+
Les prix des vaccins sont des prix maximum (art. 52, 3èeme al, LAMal). Ils ne s'appliquent pas aux vaccinations en série (p. ex. à celles effectuées par les services médicaux dans les écoles). Sont applicables pour ces cas, les tarifs fixés par convention entre les assureurs et les autorités compétentes ou, le cas échéant, ceux fixés par les autorités compétentes.<br>
|
2959
|
+
Pour les vaccinations en série contre l'hépatite B pour les enfants et les jeunes, le prix est de Fr. 19.80 pour une dose à condition d'une commande minimale de 100 doses à l'adresse d'un déstinataire.<br>
|
2960
|
+
Si le vaccin est obtenu au prix de série susmentionné, le médecin ne peut pas le facturer au prix par unité (= prix publique) de la LS. Cela équivaudrait à éluder manifestement l'article 56 alinéas 3 et 4 LAMal et serait considéré comme un abus de droit.</DescriptionFr>
|
2961
|
+
<DescriptionIt>L'articolo 12a OPre regola la rimunerazione nell'assicurazione obbligatoria delle cure medico-sanitarie dei vaccini per le misure di prevenzione. Le condizioni della rimunerazione di questi vaccini sono definite esaurientemente alle lettere a - m di detto articolo.<br>
|
2962
|
+
I prezzi dei vaccini sono prezzi massimi (art. 52 cpv. 3 LAMal) e non si applicano alle vaccinazioni in serie (ad es. a quelle effettuate nel servizio medico scolastico). In questi casi sono applicabili le tariffe stabilite per convenzione tra gli assicuratori e le autorità competenti o eventualmente quelli stabiliti dalle autorità.<br>
|
2963
|
+
Per le vaccinazioni in serie contro l'epatite B per bambini e adolescenti, il prezzo è di Fr. 19.80 per una dose a condizione di un'ordinazione minima di 100 dosi all'indirizzo del destinatario.<br>
|
2964
|
+
Se il vaccino viene ottentuto al prezzo di serie summenzionato, il medico non può fatturarlo al prezzo per unità (= prezzo pubblico). Ciò rappresenterebbe una manifesta disattenzione dell'articolo 56 capoversi 3 e 4 LAMal e quindi un abuso di diritto.</DescriptionIt>
|
2965
|
+
<ValidFromDate>01.01.2000</ValidFromDate>
|
2966
|
+
<ValidThruDate>31.12.9999</ValidThruDate>
|
2967
|
+
</Limitation>
|
2968
|
+
</Limitations>
|
2969
|
+
</ItCode>
|
2970
|
+
</ItCodes>
|
2971
|
+
<Status>
|
2972
|
+
<IntegrationDate>15.03.1999</IntegrationDate>
|
2973
|
+
<ValidFromDate>15.03.1999</ValidFromDate>
|
2974
|
+
<ValidThruDate>31.12.9999</ValidThruDate>
|
2975
|
+
<StatusTypeCodeSl>0</StatusTypeCodeSl>
|
2976
|
+
<StatusTypeDescriptionSl>Initialzustand</StatusTypeDescriptionSl>
|
2977
|
+
<FlagApd>N</FlagApd>
|
2978
|
+
</Status>
|
2979
|
+
</Preparation>
|
2842
2980
|
</Preparations>
|
@@ -29,6 +29,15 @@
|
|
29
29
|
<AUTH_HOLDER_NAME>Smith & Nephew Schweiz AG</AUTH_HOLDER_NAME>
|
30
30
|
<AUTH_HOLDER_GLN>7601001251861</AUTH_HOLDER_GLN>
|
31
31
|
</ITEM>
|
32
|
+
<ITEM DT="2018-03-16T00:00:00">
|
33
|
+
<ATYPE>NONPHARMA</ATYPE>
|
34
|
+
<GTIN>68711428066649</GTIN>
|
35
|
+
<PHAR>5863450</PHAR>
|
36
|
+
<NAME_DE>3M MEDIPORE+PAD Absorbtionsverb 10x15cm 8 x 25 Stk</NAME_DE>
|
37
|
+
<NAME_FR>3M MEDIPORE+PAD compr absorb 10x15cm 8 x 25 pce</NAME_FR>
|
38
|
+
<AUTH_HOLDER_NAME>3M (Schweiz) GmbH (Professional Health Care)</AUTH_HOLDER_NAME>
|
39
|
+
<AUTH_HOLDER_GLN>7610182000007</AUTH_HOLDER_GLN>
|
40
|
+
</ITEM>
|
32
41
|
<RESULT>
|
33
42
|
<OK_ERROR>OK</OK_ERROR>
|
34
43
|
<NBR_RECORD>33727</NBR_RECORD>
|
@@ -211,6 +211,17 @@
|
|
211
211
|
<AUTH_HOLDER_NAME>Farmaceutica Teofarma Suisse SA</AUTH_HOLDER_NAME>
|
212
212
|
<AUTH_HOLDER_GLN>7601001374539</AUTH_HOLDER_GLN>
|
213
213
|
</ITEM>
|
214
|
+
<ITEM DT="2018-03-16T00:00:00">
|
215
|
+
<ATYPE>PHARMA</ATYPE>
|
216
|
+
<GTIN>7680581580011</GTIN>
|
217
|
+
<PHAR>3656617</PHAR>
|
218
|
+
<SWMC_AUTHNR>58158001</SWMC_AUTHNR>
|
219
|
+
<NAME_DE>PRIORIX TETRA Trockensub c Solv Fertspr</NAME_DE>
|
220
|
+
<NAME_FR>PRIORIX TETRA subst sèche c solv ser pré</NAME_FR>
|
221
|
+
<ATC>J07BD54</ATC>
|
222
|
+
<AUTH_HOLDER_NAME>GlaxoSmithKline AG</AUTH_HOLDER_NAME>
|
223
|
+
<AUTH_HOLDER_GLN>7601001000674</AUTH_HOLDER_GLN>
|
224
|
+
</ITEM>
|
214
225
|
<RESULT>
|
215
226
|
<OK_ERROR>OK</OK_ERROR>
|
216
227
|
<NBR_RECORD>15169</NBR_RECORD>
|
Binary file
|
data/spec/data/transfer.dat
CHANGED
@@ -62,4 +62,6 @@
|
|
62
62
|
1128809544Sildenafil Suspension 7mg/ml 100ml 0030850045801000000000000000000000002
|
63
63
|
1126571270LYNPARZA Kaps 50 mg 448 Stk 564449594755100A000000076806516000142
|
64
64
|
1123727808HERBORISTERIA Seife Jasmin 150 g 0005390009004000000000032986516000151
|
65
|
+
11258634503M MEDIPORE+PAD Absorbtionsverb 10x15cm 8 x 25 Stk0108010178201000000000000000000000001
|
66
|
+
1123656617PRIORIX TETRA Trockensub c Solv Fertspr 008496010590301B080800076805815800112
|
65
67
|
1120020244FERRO-GRADUMET Depottabl 30 Stk 000896001380300C060710076803164401152
|
data/spec/extractor_spec.rb
CHANGED
@@ -180,7 +180,7 @@ describe Oddb2xml::SwissmedicExtractor do
|
|
180
180
|
@packs.find{|pack| pack[1][:ean13] == ean13.to_s }[1]
|
181
181
|
end
|
182
182
|
it 'should have correct nr of packages' do
|
183
|
-
expect(@packs.size).to eq(
|
183
|
+
expect(@packs.size).to eq(36)
|
184
184
|
end
|
185
185
|
|
186
186
|
it 'should have serocytol' do
|
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,7 @@ require 'pp'
|
|
15
15
|
|
16
16
|
begin # load pry if is available
|
17
17
|
require 'pry'
|
18
|
+
Pry.config.output = STDOUT
|
18
19
|
rescue LoadError
|
19
20
|
end
|
20
21
|
|
@@ -134,7 +135,6 @@ require 'oddb2xml'
|
|
134
135
|
|
135
136
|
module Kernel
|
136
137
|
def buildr_capture(stream)
|
137
|
-
Pry.config.output = STDOUT
|
138
138
|
begin
|
139
139
|
stream = stream.to_s
|
140
140
|
eval "$#{stream} = StringIO.new"
|
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.2
|
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-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|