oddb2xml 2.6.3 → 2.6.8

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
- SHA1:
3
- metadata.gz: 8de23f42038eb80cc0f1b7468b9e5fa6e40274a1
4
- data.tar.gz: '0383eb0e96e8fa789dbf89e3f74129ce9fa95624'
2
+ SHA256:
3
+ metadata.gz: 1e269835cb1d379b6d58dc3acdc2b358a2a562bf2e384335ac8b91f94cc6fe85
4
+ data.tar.gz: 31e536028c6664688a65436b7c491c750613f0894eaab3b7e960056755e794e7
5
5
  SHA512:
6
- metadata.gz: 97430a7ecb08aaa1095277cc59c5372fa55be940f73f6aa82eee0346a0a06067090ff067d03d4b4d3c1eb006f708d1efcb7dc9808af0ee84e32c2011b1b273c0
7
- data.tar.gz: 3aa0b0ab8425522ee4f0f712895b18fc9c72ac3a859ee4a771cec5d268c49bb2fbf9455dbd3c1879d470c9eca03c28cba24e3a5f5f8dd2cbf460ae31c19bcf37
6
+ metadata.gz: eca74f7c3b982ddc352476fcf517151e13bf75dc3a6293c9a30784826a341bac3b9364f78b602de6c445f4d59ecf16cef342c1e5666f03d23de1c11af222076e
7
+ data.tar.gz: 47e128df187298f95b0c21838ec974c75badaff1b55ce7dbf3583d07d87318999a51ab38fed31306d2b27abed255bce3fe54b94f5243aa4c621a7bc21837893b
@@ -11,17 +11,15 @@ before_install:
11
11
  script: bundle exec rspec
12
12
 
13
13
  rvm:
14
- - 2.2.7
15
- - 2.3.4
16
- - 2.4.1
17
- - 2.5.0
14
+ - 2.4
15
+ - 2.5
16
+ - 2.6
17
+ - 2.7
18
18
  - ruby-head
19
19
 
20
20
  matrix:
21
21
  allow_failures:
22
22
  - rvm: ruby-head
23
- - rvm: 2.2.7
24
- - rvm: 2.3.4
25
23
 
26
24
  notifications:
27
25
  email:
@@ -1,11 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- Copyright (c) 2016 MEDEVIT. All rights reserved. This program and the
3
- accompanying materials are made available under the terms of the Eclipse
4
- Public License v1.0 which accompanies this distribution, and is available
5
- at http://www.eclipse.org/legal/epl-v10.html v002 - Ergänzung K Komplementärprodukt
6
- bei generic type, Consider ATC code of length 8 (on vet.med. articles) Relax
7
- ADDSCR occurence to 0 .. 1 v003 - PRODNO hinzugefügt LIMNAMEBAG zur formal-kennzeichnung
8
- von identen limitations v4 - Major refactoring, see https://redmine.medelexis.ch/issues/4405
2
+ <!-- Copyright (c) 2016 MEDEVIT. All rights reserved. This program and the
3
+ accompanying materials are made available under the terms of the Eclipse
4
+ Public License v1.0 which accompanies this distribution, and is available
5
+ at http://www.eclipse.org/legal/epl-v10.html v002 - Ergänzung K Komplementärprodukt
6
+ bei generic type, Consider ATC code of length 8 (on vet.med. articles) Relax
7
+ ADDSCR occurence to 0 .. 1 v003 - PRODNO hinzugefügt LIMNAMEBAG zur formal-kennzeichnung
8
+ von identen limitations v4 - Major refactoring, see https://redmine.medelexis.ch/issues/4405
9
9
  Contributors: MEDEVIT <office@medevit.at> - initial API and implementation -->
10
10
  <xs:schema targetNamespace="http://elexis.ch/Elexis_Artikelstamm_v5"
11
11
  elementFormDefault="qualified" attributeFormDefault="unqualified"
@@ -339,7 +339,6 @@
339
339
  </xs:element>
340
340
  <xs:element name="GENERIC_TYPE"
341
341
  maxOccurs="1" minOccurs="0">
342
-
343
342
  <xs:simpleType>
344
343
  <xs:annotation>
345
344
  <xs:documentation>
@@ -359,6 +358,9 @@
359
358
  <xs:enumeration
360
359
  value="K">
361
360
  </xs:enumeration>
361
+ <xs:enumeration
362
+ value="C"> <!-- BAG 9.6.2020: BDer Buchstabe C bei «Original Generika Code» steht für Co-Marketing Arzneimittel -->
363
+ </xs:enumeration>
362
364
  </xs:restriction>
363
365
  </xs:simpleType>
364
366
  </xs:element>
@@ -429,6 +431,9 @@
429
431
  </xs:documentation>
430
432
  </xs:annotation>
431
433
  </xs:element>
434
+ <xs:element name="Chapter70_HACK"
435
+ type="xs:string" minOccurs="0" maxOccurs="1">
436
+ </xs:element>
432
437
  </xs:sequence>
433
438
 
434
439
 
@@ -1,3 +1,24 @@
1
+ === 2.6.8 / 26.06.2020
2
+
3
+ * Re-Add support for Ruby Version 2.4
4
+ * Specified minimal ruby version in gemspec
5
+ * Patch artikelstamm build to emit a product for Varilrix
6
+
7
+ === 2.6.7 / 25.06.2020
8
+ * Added value 'C' (Co-marketing) for field GENERIC_TYPE Elexis_Artikelstamm_v5.xsd from BAG Preparations.xml
9
+ * Fixed limitations coming from the chapte 70 hack
10
+ * Ruby 2.7 compatible (No URI.open warning)
11
+
12
+ === 2.6.6 / 11.01.2020
13
+ * Fix link for varia_De.htm
14
+
15
+ === 2.6.5 / 11.01.2020
16
+ * Fix issue #37: Update BAG Download Link
17
+ ** Pending problem: varia_De.htm for Artikelstamm cannot be found anymore
18
+
19
+ === 2.6.4 / 14.08.2019
20
+ * Fix issue #35: Missing product with ATC code for 7680005850010 Varilrix when building Artikelstamm_V5
21
+
1
22
  === 2.6.3 / 01.07.2019
2
23
  * Use https://github.com/zdavatz/cpp2sqlite/blob/master/input/atc_codes_multi_lingual.txt instead of http://download.epha.ch/data/atc/atc.csv
3
24
 
@@ -120,7 +141,7 @@
120
141
 
121
142
  === 2.4.1 / 2.12.2016
122
143
 
123
- * Update oddb2xml.gemspec to add GPL-3.0 as correct license for Rubygems as stated in LICENSE file
144
+ * Update oddb2xml.gemspec to add GPL-3.0 as correct license for Rubygems as stated in LICENSE file
124
145
  * Added a hack for 24 globulina equina which commas between brackets
125
146
 
126
147
  === 2.4.0 /25.08.2016
@@ -558,7 +579,7 @@
558
579
 
559
580
  * Improve NINCD detection
560
581
  - Update timeout handling
561
- - Improve pharmacode detection
582
+ - Improve pharmacode detection
562
583
 
563
584
  === 1.5.1 / 10.06.2013
564
585
 
@@ -16,7 +16,7 @@ require 'optimist'
16
16
  #{File.basename(__FILE__)} xml_file_to_check
17
17
  EOS
18
18
  end
19
- $stdout.sync = false
19
+ $stdout.sync = true
20
20
 
21
21
  args = ARGV
22
22
  if args.size != 1
@@ -859,7 +859,7 @@ module Oddb2xml
859
859
  @articles.sort! { |a,b| a[:ean13] <=> b[:ean13] }
860
860
  @articles.each do |obj|
861
861
  idx += 1
862
- Oddb2xml.log "build_article #{idx} of #{@articles.size} articles" if idx % 500 == 0
862
+ Oddb2xml.log "build_article #{obj[:ean13]}: #{idx} of #{@articles.size} articles" if idx % 500 == 0
863
863
  item = @items[obj[:ean13]]
864
864
  pac,no8 = nil,obj[:ean13].to_s[4..11] # BAG-XML(SL/LS)
865
865
  pack_info = nil
@@ -1449,7 +1449,7 @@ module Oddb2xml
1449
1449
  obj = @packs[no8] # obj not yet in refdata. Use data from swissmedic_package.xlsx
1450
1450
  end
1451
1451
  nr_items += 1
1452
- Oddb2xml.log "build_article #{nr_items} of #{gtins.size} articles" if nr_items % 5000 == 0
1452
+ Oddb2xml.log "build_artikelstamm #{ean13}: #{nr_items} of #{gtins.size} articles" if nr_items % 5000 == 0
1453
1453
  item = @items[ean13]
1454
1454
  pack_info = nil
1455
1455
  pack_info = @packs[no8] if no8 && /#{ean13}/.match(@packs[no8].to_s) # info from Packungen.xlsx from swissmedic_info
@@ -1509,7 +1509,7 @@ module Oddb2xml
1509
1509
  name_fr ||= (obj[:name_fr] + ', ' + obj[:desc_fr]).strip if obj[:name_fr]
1510
1510
  # ZuRorse has only german names
1511
1511
  name_fr ||= (item[:name_fr] + ', ' + item[:desc_fr]) if item
1512
- name_fr ||= '--missing--'
1512
+ name_fr ||= name
1513
1513
  xml.DSCRF(name_fr)
1514
1514
  xml.COMP do # Manufacturer
1515
1515
  xml.NAME obj[:company_name]
@@ -1557,20 +1557,31 @@ module Oddb2xml
1557
1557
  when 'N'; xml.DEDUCTIBLE 10; # 10%
1558
1558
  end if item && item[:deductible]
1559
1559
  prodno = Oddb2xml.getProdnoForEan13(pkg_gtin)
1560
+ atc = package[:atc_code]
1561
+ atc ||= @refdata[pkg_gtin][:seq][:atc_code] if @refdata[pkg_gtin]
1562
+ unless prodno # find a prodno from packages for vaccinations
1563
+ if atc && /^J07/.match(atc) && !/^J07AX/.match(atc)
1564
+ pack = @packs.values.find{ |v| v && v[:atc_code].eql?(atc)}
1565
+ if pack
1566
+ prodno = pack[:prodno]
1567
+ Oddb2xml.log "Patching vaccination for #{pkg_gtin} #{atc} #{name} via prodno #{prodno}"
1568
+ else
1569
+ Oddb2xml.log "unable to find a pack/prodno for vaccination for #{pkg_gtin} #{atc} #{name}"
1570
+ end
1571
+ end
1572
+ end
1560
1573
  xml.PRODNO prodno if prodno
1561
1574
  csv = []
1562
1575
  @csv_file << [pkg_gtin, name, package[:unit], measure,
1563
1576
  pexf ? pexf : '',
1564
1577
  ppub ? ppub : '',
1565
- package[:prodno], package[:atc_code], package[:substance_swissmedic],
1578
+ prodno, atc, package[:substance_swissmedic],
1566
1579
  sequence[:org_gen_code], package[:ith_swissmedic],
1567
1580
  @items[pkg_gtin] ? 'SL' : '',
1568
1581
  ]
1569
1582
  end
1570
1583
  end
1571
1584
  else # non pharma
1572
- @csv_file << [ ean13, (obj[:desc_de] || obj[:description]), '', '',
1573
- obj[:price], obj[:pub_price], '', '', '', '', '', '' ]
1574
1585
  if @@emitted_v5_gtins.index(ean13)
1575
1586
  next
1576
1587
  else
@@ -1589,17 +1600,38 @@ module Oddb2xml
1589
1600
  xml.GTIN ean13.to_s.rjust(13, '0')
1590
1601
  xml.PHAR obj[:pharmacode]
1591
1602
  emit_salecd(xml, ean13, obj)
1592
- xml.DSCR(obj[:desc_de] || obj[:description]) # for description for zur_rose
1603
+ description = obj[:desc_de] || obj[:description] # for description for zur_rose
1604
+ xml.DSCR(description)
1593
1605
  xml.DSCRF(obj[:desc_fr] || '--missing--')
1594
1606
  xml.COMP do
1595
1607
  xml.GLN obj[:company_ean]
1596
1608
  end if obj[:company_ean] && !obj[:company_ean].empty?
1597
- xml.PEXF obj[:price] if obj[:price] && !obj[:price].empty?
1598
- xml.PPUB obj[:pub_price] if obj[:pub_price] && !obj[:pub_price].empty?
1609
+ if !(obj[:price] && !obj[:price].empty?) || !(obj[:pub_price] && !obj[:pub_price].empty?)
1610
+ zur_rose_detail = @infos_zur_rose.values.find{|x| x[:ean13].to_i == ean13.to_i}
1611
+ end
1612
+ ppub = nil; pexf=nil
1613
+ if obj[:price] && !obj[:price].empty?
1614
+ xml.PEXF (pexf = obj[:price])
1615
+ elsif zur_rose_detail
1616
+ if zur_rose_detail[:price] && !zur_rose_detail[:price].empty? && !zur_rose_detail[:price].eql?('0.00')
1617
+ Oddb2xml.log "NonPharma: #{ean13} adding PEXF #{zur_rose_detail[:price]} #{description}"
1618
+ xml.PEXF (pexf = zur_rose_detail[:price])
1619
+ end
1620
+ end
1621
+ if obj[:pub_price] && !obj[:pub_price].empty?
1622
+ xml.PPUB (ppub = obj[:pub_price])
1623
+ elsif zur_rose_detail
1624
+ if zur_rose_detail[:pub_price] && !zur_rose_detail[:pub_price].empty? && !zur_rose_detail[:pub_price].eql?('0.00')
1625
+ Oddb2xml.log "NonPharma: #{ean13} adding PPUB #{zur_rose_detail[:pub_price]} #{description}"
1626
+ xml.PPUB (ppub = zur_rose_detail[:pub_price])
1627
+ end
1628
+ end
1629
+ @csv_file << [ ean13, description, '', '', pexf, ppub, '', '', '', '', '', '' ]
1599
1630
  if chap70
1600
- xml.comment "Chapter70 hack"
1631
+ xml.comment "Chapter70 hack"
1601
1632
  xml.SL_ENTRY 'true'
1602
1633
  xml.PRODNO obj[:pharmacode]
1634
+ xml.Chapter70_HACK 'true'
1603
1635
  end
1604
1636
  end
1605
1637
  end
@@ -1658,18 +1690,20 @@ module Oddb2xml
1658
1690
  sequence ||= @products[ean][:seq] if @products[ean]
1659
1691
  next unless check_name(obj, :de)
1660
1692
  ppac = ((_ppac = @packs[ean.to_s[4..11]] and !_ppac[:is_tier]) ? _ppac : {})
1661
- unless ppac
1662
- ppac = @packs.find{|pac| pac.ean == ean }.first
1663
- end
1664
1693
  prodno = ppac[:prodno] if ppac[:prodno] and !ppac[:prodno].empty?
1665
1694
  prodno = obj[:pharmacode] if obj[:chapter70]
1695
+ myPack = @packs.values.find{ |x| x[:iksnr].to_i == obj[:seq][:swissmedic_number5].to_i } if obj[:seq]
1696
+ if myPack && !prodno
1697
+ prodno ||= myPack[:prodno]
1698
+ puts "Setting prodno #{prodno} for #{ean13} #{myPack[:sequence_name]}"
1699
+ end
1666
1700
  next unless prodno
1667
1701
  next if emitted_prodno.index(prodno)
1668
1702
  sequence ||= @articles.find{|x| x[:ean13].eql?(ean)}
1669
1703
  unless obj[:chapter70]
1670
1704
  next unless sequence && (sequence[:name_de] || sequence[:desc_de])
1671
- if Oddb2xml.getEan13forProdno(prodno).size == 0
1672
- puts "No item found for prodno #{prodno} no8 #{obj[:no8]} #{sequence[:name_de]} "
1705
+ if Oddb2xml.getEan13forProdno(prodno).size == 0 && !obj[:no8].eql?(Oddb2xml.getNo8ForEan13(ean))
1706
+ puts "No item found for prodno #{prodno} no8 #{obj[:no8]} #{sequence[:name_de]}"
1673
1707
  next
1674
1708
  end
1675
1709
  end
@@ -1699,12 +1733,14 @@ module Oddb2xml
1699
1733
  used_limitations << lim_code unless used_limitations.index(lim_code)
1700
1734
  xml.LIMNAMEBAG lim_code
1701
1735
  elsif obj[:chapter70]
1702
- used_limitations << obj[:code]
1703
1736
  xml.comment "Chapter70 hack"
1704
1737
  xml.SALECD('A') # these products are always active!
1705
1738
  xml.DSCR obj[:description]
1706
1739
  xml.DSCRF ''
1707
- xml.LIMNAMEBAG obj[:code]
1740
+ if @limitations.index(obj[:code])
1741
+ xml.LIMNAMEBAG obj[:code]
1742
+ used_limitations << obj[:code]
1743
+ end
1708
1744
  end
1709
1745
  if sequence && sequence[:substances]
1710
1746
  value = nil
@@ -12,7 +12,7 @@ module Oddb2xml
12
12
  puts "parse_td returns: #{res}" if $VERBOSE
13
13
  rescue => exc
14
14
  puts "Unable to pars #{elem} #{exc}"
15
- binding.pry
15
+ # binding.pry
16
16
  return nil
17
17
  end
18
18
  res.flatten # .join("\t")
@@ -26,14 +26,14 @@ module Oddb2xml
26
26
  def self.items
27
27
  @@items
28
28
  end
29
- def self.parse(html_file = 'http://bag.e-mediat.net/Sl2007.web.external/varia_De.htm')
29
+ def self.parse(html_file = 'http://www.spezialitaetenliste.ch/varia_De.htm')
30
30
  data = Hash.new{|h,k| h[k] = [] }
31
31
  Ox.default_options = {
32
32
  mode: :generic,
33
33
  effort: :tolerant,
34
34
  smart: true
35
35
  }
36
- res = Ox.load(open(html_file).read, mode: :hash_no_attrs).values.first['body']
36
+ res = Ox.load(Oddb2xml.uri_open(html_file).read, mode: :hash_no_attrs).values.first['body']
37
37
  result = []
38
38
  idx = 0
39
39
  @@items = {}
@@ -50,15 +50,16 @@ module Oddb2xml
50
50
  data = {}
51
51
  pharma_code = entry.first
52
52
  ean13 = (Oddb2xml::FAKE_GTIN_START + pharma_code.to_s)
53
- german = entry[2].force_encoding('ISO-8859-1').encode('UTF-8')
54
- while !german.eql?(HTMLEntities.new.decode(german))
55
- german = HTMLEntities.new.decode(german)
53
+ if entry[2].encoding.to_s.eql?('ASCII-8BIT')
54
+ german = CGI.unescape(entry[2].force_encoding('ISO-8859-1'))
55
+ else
56
+ german = entry[2]
56
57
  end
57
58
  @@items[ean13] = {
58
59
  :data_origin => 'Chapter70',
59
60
  :line => entry.join(","),
60
61
  :ean13 => ean13,
61
- :description => Oddb2xml.html_decode(entry[2]),
62
+ :description => german,
62
63
  :quantity => entry[3],
63
64
  :pharmacode => pharma_code,
64
65
  :pub_price => entry[4],
@@ -70,5 +71,3 @@ module Oddb2xml
70
71
  end
71
72
  end
72
73
  end
73
-
74
-
@@ -23,7 +23,7 @@ module Oddb2xml
23
23
  else
24
24
  begin
25
25
  io = File.open(file, option)
26
- data = open(@url).read
26
+ data = Oddb2xml.uri_open(@url).read
27
27
  io.write(data)
28
28
  rescue => error
29
29
  puts "error #{error} while fetching #{@url}"
@@ -197,7 +197,7 @@ module Oddb2xml
197
197
  include DownloadMethod
198
198
  def init
199
199
  super
200
- @url ||= 'http://bag.e-mediat.net/SL2007.Web.External/File.axd?file=XMLPublications.zip'
200
+ @url ||= 'http://www.xn--spezialittenliste-yqb.ch/File.axd?file=XMLPublications.zip'
201
201
  end
202
202
  def download
203
203
  file = File.join(WorkDir, 'XMLPublications.zip')
@@ -283,7 +283,7 @@ module Oddb2xml
283
283
  include DownloadMethod
284
284
  def initialize(type=:orphan, options = {})
285
285
  url = BASE_URL + '/swissmedic/de/home/services/listen_neu.html'
286
- doc = Nokogiri::HTML(open(url))
286
+ doc = Nokogiri::HTML(Oddb2xml.uri_open(url))
287
287
  @type = type
288
288
  @options = options
289
289
  case @type
@@ -319,6 +319,7 @@ module Oddb2xml
319
319
  Oddb2xml.setEan13forProdno(prodno, ean13)
320
320
  Oddb2xml.setEan13forNo8(no8, ean13)
321
321
  data[no8] = {
322
+ :iksnr => row[iksnr].value.to_i,
322
323
  :no8 => no8,
323
324
  :ean13 => ean13,
324
325
  :prodno => prodno,
@@ -64,7 +64,7 @@ module Oddb2xml
64
64
  end
65
65
  end
66
66
  end
67
-
67
+
68
68
  def everyPharmaArticleHasAProductItem
69
69
  result = true
70
70
  puts "#{Time.now.strftime("%H:%M:%S")}: everyPharmaArticleHasAProductItem"
@@ -74,7 +74,7 @@ module Oddb2xml
74
74
  unless allProductNumbers.index(item[:PRODNO])
75
75
  puts "Item #{item[:GTIN]} has no Product #{item[:PRODNO]} #{item[:DSCR]}"
76
76
  result = false
77
- end
77
+ end unless item[:Chapter70_HACK]
78
78
  end
79
79
  result
80
80
  end
@@ -91,17 +91,19 @@ module Oddb2xml
91
91
  end
92
92
  result
93
93
  end
94
-
94
+
95
95
  def everyReferencedLimitationIsIncluded
96
+ result = true
96
97
  puts "#{Time.now.strftime("%H:%M:%S")}: everyReferencedLimitationIsIncluded"
97
98
  allLimitations = limitations.collect{ |lim| lim[:LIMNAMEBAG] }
98
99
  products.each do |product|
99
100
  next unless product[:LIMNAMEBAG]
100
101
  unless allLimitations.index(product[:LIMNAMEBAG])
101
102
  puts "product #{product[:PRODNO]} has no limitation #{product[:LIMNAMEBAG]} #{product[:DSCR]}"
102
- return false
103
+ result = false
103
104
  end
104
105
  end
106
+ result
105
107
  end
106
108
 
107
109
  def checkPackageSize
@@ -7,6 +7,14 @@ module Oddb2xml
7
7
  def Oddb2xml.gen_prodno(iksnr, seqnr)
8
8
  sprintf('%05d',iksnr) + sprintf('%02d', seqnr)
9
9
  end
10
+ def Oddb2xml.uri_open(url)
11
+ version = RUBY_VERSION.split('.').map { |x| x.to_i }
12
+ if (version <=> [2,5,0]) >= 0
13
+ URI.open(url)
14
+ else
15
+ open(url)
16
+ end
17
+ end
10
18
  def Oddb2xml.calc_checksum(str)
11
19
  str = str.strip
12
20
  sum = 0
@@ -34,7 +42,7 @@ module Oddb2xml
34
42
  end
35
43
  Oddb2xml.patch_some_utf8(german).gsub('<br>',"\n")
36
44
  end
37
-
45
+
38
46
  def Oddb2xml.patch_some_utf8(line)
39
47
  begin
40
48
  line = line.encode('utf-8')
@@ -86,7 +94,7 @@ module Oddb2xml
86
94
  def Oddb2xml.skip_download?
87
95
  @options[:skip_download]
88
96
  end
89
-
97
+
90
98
  def Oddb2xml.skip_download(file)
91
99
  return false if defined?(VCR)
92
100
  dest = "#{Downloads}/#{File.basename(file)}"
@@ -96,7 +104,7 @@ module Oddb2xml
96
104
  end
97
105
  false
98
106
  end
99
-
107
+
100
108
  def Oddb2xml.download_finished(file, remove_file = true)
101
109
  src = "#{WorkDir}/#{File.basename(file)}"
102
110
  dest = "#{Downloads}/#{File.basename(file)}"
@@ -232,7 +240,7 @@ COLUMNS_FEBRUARY_2019= {
232
240
  @@ean13_to_no8 = {}
233
241
  def Oddb2xml.setEan13forProdno(prodno, ean13)
234
242
  if ean13.to_i == 7680006660045 || ean13.to_i == 7680006660014
235
- puts "setEan13forProdno #{prodno} ean13 #{ean13}"
243
+ Oddb2xml.log "setEan13forProdno #{prodno} ean13 #{ean13}"
236
244
  end
237
245
  @@prodno_to_ean13[prodno] ||= []
238
246
  @@prodno_to_ean13[prodno] << ean13
@@ -240,13 +248,13 @@ COLUMNS_FEBRUARY_2019= {
240
248
  end
241
249
  def Oddb2xml.setEan13forNo8(no8, ean13)
242
250
  if ean13.to_i == 7680006660045 || ean13.to_i == 7680006660014
243
- puts "setEan13forNo8 #{no8} ean13 #{ean13}"
251
+ Oddb2xml.log "setEan13forNo8 #{no8} ean13 #{ean13}"
244
252
  end
245
253
  if @@no8_to_ean13[no8].nil?
246
254
  @@no8_to_ean13[no8] = ean13
247
255
  @@ean13_to_no8[ean13] = no8
248
256
  elsif !@@no8_to_ean13[no8].eql?(ean13)
249
- puts "@@no8_to_ean13[no8] #{@@no8_to_ean13[no8]} not overridden by #{ean13}"
257
+ Oddb2xml.log "@@no8_to_ean13[no8] #{@@no8_to_ean13[no8]} not overridden by #{ean13}"
250
258
  end
251
259
  end
252
260
  def Oddb2xml.getEan13forProdno(prodno)
@@ -1,3 +1,3 @@
1
1
  module Oddb2xml
2
- VERSION = "2.6.3"
2
+ VERSION = "2.6.8"
3
3
  end
@@ -16,6 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ["lib"]
19
+ spec.required_ruby_version = ">= 2.2.0"
19
20
 
20
21
  # We fix the version of the spec to newer versions only in the third position
21
22
  # hoping that these version fix only security/severe bugs
@@ -121,7 +121,7 @@ describe Oddb2xml::Builder do
121
121
  it 'should find price from Preparations.xml by setting' do
122
122
  expect(File.exists?(@elexis_v5_csv)).to eq true
123
123
  inhalt = File.open(@elexis_v5_csv, 'r+').read
124
- expected = %(7680658560014,Dibase 10'000 Tropfen 10000 IE/ml Fl 10 ml,,Flasche(n),5,9.25,,,,"",,SL)
124
+ expected = %(7680658560014,Dibase 10'000 Tropfen 10000 IE/ml Fl 10 ml,,Flasche(n),5,9.25,6585601,A11CC05,,"",,SL)
125
125
  expect(inhalt.index(expected)).to be > 0
126
126
  end
127
127
 
@@ -139,7 +139,7 @@ describe Oddb2xml::Builder do
139
139
  it 'should have a price for Lynparza' do
140
140
  expect(File.exists?(@elexis_v5_csv)).to eq true
141
141
  inhalt = File.open(@elexis_v5_csv, 'r+').read
142
- expect(inhalt.index('7680651600014,Lynparza Kaps 50 mg 448 Stk,,Kapsel(n),5562.48,5947.55,,,,"",,SL')).not_to be nil
142
+ expect(inhalt.index('7680651600014,Lynparza Kaps 50 mg 448 Stk,,Kapsel(n),5562.48,5947.55,6516001,L01XX46,,"",,S')).not_to be nil
143
143
  end
144
144
  it 'should trim the ean13 to 13 length' do
145
145
  gtin14 = "00040565124346"
@@ -184,7 +184,7 @@ describe Oddb2xml::Builder do
184
184
  @inhalt = IO.read(@artikelstamm_name)
185
185
  expect(@inhalt.index('BIOMARIS Voll Meersalz 500 g')).not_to be nil
186
186
  end
187
-
187
+
188
188
  it 'Should not contain PHAR 8809544 Sildenavil with pexf and ppub 0.0' do
189
189
  #1128809544Sildenafil Suspension 7mg/ml 100ml 0030850045801000000000000000000000002
190
190
  @inhalt = IO.read(@artikelstamm_name)
@@ -211,29 +211,33 @@ describe Oddb2xml::Builder do
211
211
  it 'shoud contain GENERIC_TYPE' do
212
212
  expect(@inhalt.index('<GENERIC_TYPE')).not_to be nil
213
213
  end
214
-
214
+
215
215
  it 'should contain DIBASE with phar' do
216
216
  expected = %(<ITEM PHARMATYPE="P">
217
- <GTIN>7680658570013</GTIN>
218
- <!--override with-->
217
+ <GTIN>7680658560014</GTIN>
218
+ <!--obsolete override-->
219
+ <PHAR>7199565</PHAR>
219
220
  <SALECD>A</SALECD>
220
- <DSCR>DIBASE 25'000, Lösung zum Einnehmen</DSCR>
221
- <DSCRF>--missing--</DSCRF>
221
+ <DSCR>Dibase 10'000 Tropfen 10000 IE/ml Fl 10 ml</DSCR>
222
+ <DSCRF>Dibase 10'000 gouttes 10000 UI/ml fl 10 ml</DSCRF>
222
223
  <COMP>
223
224
  <NAME>Gebro Pharma AG</NAME>
224
- <GLN/>
225
+ <GLN>7612053000000</GLN>
225
226
  </COMP>
227
+ <PEXF>5</PEXF>
228
+ <PPUB>9.25</PPUB>
226
229
  <PKG_SIZE>1</PKG_SIZE>
227
230
  <MEASURE>Flasche(n)</MEASURE>
228
231
  <MEASUREF>Flasche(n)</MEASUREF>
229
- <DOSAGE_FORM>Lösung</DOSAGE_FORM>
230
- <DOSAGE_FORMF>Solution</DOSAGE_FORMF>
232
+ <DOSAGE_FORM>orale Tropflösung</DOSAGE_FORM>
233
+ <SL_ENTRY>true</SL_ENTRY>
231
234
  <IKSCAT>D</IKSCAT>
232
- <PRODNO>6585701</PRODNO>
233
- </ITEM>)
235
+ <DEDUCTIBLE>10</DEDUCTIBLE>
236
+ <PRODNO>6585601</PRODNO>
237
+ </ITEM)
234
238
  expect(@inhalt.index(expected)).not_to be nil
235
239
  end
236
-
240
+
237
241
  it 'should contain PEVISONE Creme 30 g' do
238
242
  expect(@inhalt.index('Pevisone Creme 15 g')).not_to be nil # 7680406620144
239
243
  expect(@inhalt.index('Pevisone Creme 30 g')).not_to be nil # 7680406620229
@@ -329,7 +333,7 @@ describe Oddb2xml::Builder do
329
333
  <DEDUCTIBLE>10</DEDUCTIBLE>
330
334
  <PRODNO>1610501</PRODNO>
331
335
  </ITEM>),
332
- 'item 7680161050743 100g ' =>
336
+ 'item 7680161050743 Hirudoid Creme 3 mg/g 100 g' =>
333
337
  %( <ITEM PHARMATYPE="P">
334
338
  <GTIN>7680161050743</GTIN>
335
339
  <PHAR>2731179</PHAR>
@@ -345,7 +349,7 @@ describe Oddb2xml::Builder do
345
349
  <SL_ENTRY>true</SL_ENTRY>
346
350
  <IKSCAT>D</IKSCAT>
347
351
  <DEDUCTIBLE>10</DEDUCTIBLE>
348
- </ITEM>),
352
+ </ITEM>),
349
353
  'item 7680284860144 ANCOPIR' =>'<ITEM PHARMATYPE="P">
350
354
  <GTIN>7680284860144</GTIN>
351
355
  <PHAR>0177804</PHAR>
@@ -387,7 +391,7 @@ describe Oddb2xml::Builder do
387
391
  <DOSAGE_FORMF>Compresse</DOSAGE_FORMF>
388
392
  <IKSCAT>C</IKSCAT>
389
393
  <PRODNO>3164402</PRODNO>
390
- </ITEM>),
394
+ </ITEM>),
391
395
  'product 3TC Filmtabl' => %(<PRODUCT>
392
396
  <PRODNO>5366201</PRODNO>
393
397
  <SALECD>A</SALECD>
@@ -435,20 +439,38 @@ describe Oddb2xml::Builder do
435
439
  <DEDUCTIBLE>20</DEDUCTIBLE>
436
440
  <PRODNO>5329001</PRODNO>
437
441
  </ITEM>),
438
- 'Chapter 70 limitation' => %(<LIMITATION>
439
- <!--Chapter70 hack-->
440
- <LIMNAMEBAG>L1, L2</LIMNAMEBAG>
441
- <DSCR>Eine Flasche zu 20 ml Urtinktur einer bestimmten Pflanze pro Monat. Für Aesculus, Carduus Marianus, Ginkgo, Hedera helix, Hypericum perforatum, Lavandula, Rosmarinus officinalis, Taraxacum officinale.</DSCR>
442
- <DSCRF/>
443
- <LIMITATION_PTS>1</LIMITATION_PTS>
444
- </LIMITATION>),
442
+ 'Varilrix product' => %(<PRODUCT>
443
+ <PRODNO>0058501</PRODNO>
444
+ <SALECD>A</SALECD>
445
+ <DSCR>Varilrix Trockensub c solv</DSCR>
446
+ <DSCRF>Varilrix subst sèche c solv</DSCRF>
447
+ <ATC>J07BK01</ATC>
448
+ <LIMNAMEBAG>0808</LIMNAMEBAG>
449
+ <SUBSTANCE>Vaccinum virus varicellae vivus attenuat. (Stamm OKA)</SUBSTANCE>
450
+ </PRODUCT>),
451
+ 'Varilrix item' => %(<ITEM PHARMATYPE="P">
452
+ <GTIN>7680005850010</GTIN>
453
+ <PHAR>1770177</PHAR>
454
+ <SALECD>A</SALECD>
455
+ <DSCR>Varilrix Trockensub c solv Fertspr 0.500 ml</DSCR>
456
+ <DSCRF>Varilrix subst sèche c solv ser prê 0.500 ml</DSCRF>
457
+ <COMP>
458
+ <NAME>GlaxoSmithKline AG</NAME>
459
+ <GLN>7601001000674</GLN>
460
+ </COMP>
461
+ <PEXF>43.64</PEXF>
462
+ <PPUB>66.5</PPUB>
463
+ <SL_ENTRY>true</SL_ENTRY>
464
+ <IKSCAT>B</IKSCAT>
465
+ <DEDUCTIBLE>10</DEDUCTIBLE>
466
+ <PRODNO>0058501</PRODNO>
467
+ </ITEM),
445
468
  'Chapter 70 product' => %(<PRODUCT>
446
469
  <PRODNO>2069639</PRODNO>
447
470
  <!--Chapter70 hack-->
448
471
  <SALECD>A</SALECD>
449
472
  <DSCR>Ceres Urtinkturen gemäss L2</DSCR>
450
473
  <DSCRF/>
451
- <LIMNAMEBAG>L1, L2</LIMNAMEBAG>
452
474
  </PRODUCT>),
453
475
  'Chapter 70 item' => %(<ITEM PHARMATYPE="P">
454
476
  <GTIN>2500000588532</GTIN>
@@ -461,6 +483,7 @@ describe Oddb2xml::Builder do
461
483
  <!--Chapter70 hack-->
462
484
  <SL_ENTRY>true</SL_ENTRY>
463
485
  <PRODNO>2069639</PRODNO>
486
+ <Chapter70_HACK>true</Chapter70_HACK>
464
487
  </ITEM>),
465
488
  'HTML-encoded limitation' => %(<DSCR>Zur Erhaltungstherapie (Monotherapie) bei erwachsenen Patientinnen mit rezidiviertem, fortgeschrittenem Ovarialkarzinom mit BRCA Mutation im Anschluss an eine platinhaltige Chemotherapie bei Vorliegen einer kompletten oder partiellen Remission.
466
489
 
@@ -59,7 +59,7 @@ ARTICLE_NAROPIN = %(1
59
59
  <BCSTAT>A</BCSTAT>
60
60
  </ARTBAR>
61
61
  </ART>)
62
-
62
+
63
63
  ARTICLE_COMMON_ELEMENTS = [
64
64
  ['ARTICLE/ART/REF_DATA', '1'],
65
65
  ['ARTICLE/ART/SMCAT', 'A'],
@@ -256,7 +256,7 @@ def check_result(inhalt, nbr_record)
256
256
  expect(inhalt.index('<ERROR_CODE/>')).to be > 0
257
257
  m = /<NBR_RECORD>(\d+)<\/NBR_RECORD>/.match(inhalt)
258
258
  expect(m).not_to be nil
259
- expect(m[1].to_i).to eq nbr_record
259
+ expect(m[1].to_i).to eq nbr_record
260
260
  end
261
261
 
262
262
  def checkItemForRefdata(doc, pharmacode, isRefdata)
@@ -473,15 +473,15 @@ def checkProductXml(nbr_record = -1)
473
473
  end
474
474
 
475
475
  describe Oddb2xml::Builder do
476
- NrExtendedArticles = 76
477
- NrSubstances = 27
478
- NrLimitations = 14
479
-
476
+ NrExtendedArticles = 78
477
+ NrSubstances = 28
478
+ NrLimitations = 15
479
+
480
480
  NrInteractions = 2
481
481
  NrCodes = 5
482
482
  NrProdno = 31
483
- NrPackages = 44
484
- NrProducts = 39
483
+ NrPackages = 46
484
+ NrProducts = 40
485
485
  RegExpDesitin = /1125819012LEVETIRACETAM DESITIN Mini Filmtab 250 mg 30 Stk/
486
486
  include ServerMockHelper
487
487
  def common_run_init(options = {})
@@ -532,7 +532,7 @@ describe Oddb2xml::Builder do
532
532
 
533
533
  check_attributes(oddb_article_xml, ARTICLE_ATTRIBUTE_TESTS)
534
534
  check_elements(oddb_article_xml, ARTICLE_COMMON_ELEMENTS)
535
-
535
+
536
536
  it 'should validate XSD article' do
537
537
  @inhalt = File.read(oddb_article_xml)
538
538
  # This fails on Ruby < 2.4 as NAROPIN INJ LÖS 0.2 % 10 is wrongly encoded
@@ -552,7 +552,7 @@ describe Oddb2xml::Builder do
552
552
  end
553
553
 
554
554
  it 'should have a correct insulin (gentechnik) for 7680532900196' do
555
- expect(XPath.match( @rexml, "//ART/[BC='7680532900196']").size).to eq 1
555
+ expect(@inhalt.match(/.*<BC>7680532900196<\/BC>.*/).class).to be MatchData
556
556
  expect(XPath.match( @rexml, "//ART//GEN_PRODUCTION").size).to be >= 1
557
557
  expect(XPath.match( @rexml, "//ART//GEN_PRODUCTION").first.text).to eq 'X'
558
558
  expect(XPath.match( @rexml, "//ART//INSULIN_CATEGORY").size).to eq 1
@@ -568,7 +568,7 @@ describe Oddb2xml::Builder do
568
568
  ean_with_drug_index = 7680555610041
569
569
  it "should have a correct drug information for #{ean_with_drug_index}" do
570
570
  doc = REXML::Document.new IO.read(checkAndGetArticleXmlName)
571
- expect(XPath.match( @rexml, "//ART/[BC='#{ean_with_drug_index}']").size).to eq 1
571
+ expect(@inhalt.match(/.*<BC>#{ean_with_drug_index}<\/BC>.*/).class).to be MatchData
572
572
  expect(XPath.match( @rexml, "//ART//DRUG_INDEX").size).to eq 1
573
573
  expect(XPath.match( @rexml, "//ART//DRUG_INDEX").first.text).to eq 'd'
574
574
  found = false
@@ -605,11 +605,11 @@ describe Oddb2xml::Builder do
605
605
  <CPT/>)
606
606
  expect(oddb_product_xml.index(text2)).to be >= 1
607
607
  end
608
-
608
+
609
609
  it 'should generate SALECD A for swissmedic packages' do
610
610
  expect(IO.read(oddb_article_xml).index('<SALECD>A<!--Overriding status I nincd 10 for 7680658560014 as in refdata_pharma--></SALECD>')).to be >= 1
611
611
  end
612
-
612
+
613
613
  end
614
614
 
615
615
  context 'when -o for fachinfo is given' do
@@ -1,5 +1,141 @@
1
1
  <?xml version="1.0" encoding="utf-8" standalone="yes"?>
2
2
  <Preparations ReleaseDate="01.12.2013">
3
+ <Preparation ProductCommercial="9801">
4
+ <NameDe>Varilrix</NameDe>
5
+ <NameFr>Varilrix</NameFr>
6
+ <NameIt>Varilrix</NameIt>
7
+ <DescriptionDe>Trockensub c solv</DescriptionDe>
8
+ <DescriptionFr>subst sèche c solv </DescriptionFr>
9
+ <DescriptionIt>sost secca c solv </DescriptionIt>
10
+ <AtcCode>J07BK01</AtcCode>
11
+ <SwissmedicNo5>585</SwissmedicNo5>
12
+ <FlagItLimitation>Y</FlagItLimitation>
13
+ <OrgGenCode />
14
+ <FlagSB20>N</FlagSB20>
15
+ <CommentDe />
16
+ <CommentFr />
17
+ <CommentIt />
18
+ <VatInEXF>N</VatInEXF>
19
+ <Packs>
20
+ <Pack ProductKey="9801" PackId="14418">
21
+ <DescriptionDe>Fertspr 0.500 ml</DescriptionDe>
22
+ <DescriptionFr>ser prê 0.500 ml</DescriptionFr>
23
+ <DescriptionIt>sir preriempita 0.500 ml</DescriptionIt>
24
+ <SwissmedicCategory>B</SwissmedicCategory>
25
+ <SwissmedicNo8>585001</SwissmedicNo8>
26
+ <FlagNarcosis>N</FlagNarcosis>
27
+ <FlagModal />
28
+ <BagDossierNo>18076</BagDossierNo>
29
+ <GTIN>7680005850010</GTIN>
30
+ <SizePack />
31
+ <PrevPharmacode />
32
+ <Limitations />
33
+ <PointLimitations />
34
+ <Prices>
35
+ <ExFactoryPrice>
36
+ <Price>43.64</Price>
37
+ <ValidFromDate>01.12.2019</ValidFromDate>
38
+ <DivisionDescription />
39
+ <PriceTypeCode>PEXF</PriceTypeCode>
40
+ <PriceTypeDescriptionDe>Ex-Factory Preis</PriceTypeDescriptionDe>
41
+ <PriceTypeDescriptionFr>Prix ex-factory</PriceTypeDescriptionFr>
42
+ <PriceTypeDescriptionIt>Prix ex-factory</PriceTypeDescriptionIt>
43
+ <PriceChangeTypeCode>3JUEBERPRUEF</PriceChangeTypeCode>
44
+ <PriceChangeTypeDescriptionDe>Preisänderung nach 3-jährlicher Überprüfung der Aufnahmebedingungen</PriceChangeTypeDescriptionDe>
45
+ <PriceChangeTypeDescriptionFr>Réduction de prix à cause du réexamen des conditions d’admission tous les trois ans</PriceChangeTypeDescriptionFr>
46
+ <PriceChangeTypeDescriptionIt>Preisänderung nach 3-jährlicher Überprüfung der Aufnahmebedingungen</PriceChangeTypeDescriptionIt>
47
+ </ExFactoryPrice>
48
+ <PublicPrice>
49
+ <Price>66.5</Price>
50
+ <ValidFromDate>01.12.2019</ValidFromDate>
51
+ <DivisionDescription />
52
+ <PriceTypeCode>PPUB</PriceTypeCode>
53
+ <PriceTypeDescriptionDe>Publikumspreis</PriceTypeDescriptionDe>
54
+ <PriceTypeDescriptionFr>Prix public</PriceTypeDescriptionFr>
55
+ <PriceTypeDescriptionIt>Prix public</PriceTypeDescriptionIt>
56
+ <PriceChangeTypeCode>3JUEBERPRUEF</PriceChangeTypeCode>
57
+ <PriceChangeTypeDescriptionDe>Preisänderung nach 3-jährlicher Überprüfung der Aufnahmebedingungen</PriceChangeTypeDescriptionDe>
58
+ <PriceChangeTypeDescriptionFr>Réduction de prix à cause du réexamen des conditions d’admission tous les trois ans</PriceChangeTypeDescriptionFr>
59
+ <PriceChangeTypeDescriptionIt>Preisänderung nach 3-jährlicher Überprüfung der Aufnahmebedingungen</PriceChangeTypeDescriptionIt>
60
+ </PublicPrice>
61
+ </Prices>
62
+ <Partners>
63
+ <Partner>
64
+ <PartnerType>V</PartnerType>
65
+ <Description>GlaxoSmithKline AG</Description>
66
+ <Street>Talstrasse 3-5</Street>
67
+ <ZipCode>3053</ZipCode>
68
+ <Place>Münchenbuchsee</Place>
69
+ <Phone>+41318622111</Phone>
70
+ </Partner>
71
+ </Partners>
72
+ <Status>
73
+ <IntegrationDate>01.01.2005</IntegrationDate>
74
+ <ValidFromDate>01.01.2005</ValidFromDate>
75
+ <ValidThruDate>31.12.9999</ValidThruDate>
76
+ <StatusTypeCodeSl>0</StatusTypeCodeSl>
77
+ <StatusTypeDescriptionSl>Initialzustand</StatusTypeDescriptionSl>
78
+ <FlagApd>N</FlagApd>
79
+ </Status>
80
+ </Pack>
81
+ </Packs>
82
+ <Substances>
83
+ <Substance>
84
+ <DescriptionLa>Vaccinum virus varicellae vivus attenuat. (Stamm OKA)</DescriptionLa>
85
+ <Quantity>10^3.3</Quantity>
86
+ <QuantityUnit>U</QuantityUnit>
87
+ </Substance>
88
+ </Substances>
89
+ <Limitations />
90
+ <ItCodes>
91
+ <ItCode Code="08.">
92
+ <DescriptionDe>INFEKTIONSKRANKHEITEN</DescriptionDe>
93
+ <DescriptionFr>MALADIES INFECTIEUSES</DescriptionFr>
94
+ <DescriptionIt>MALATTIE INFETTIVE </DescriptionIt>
95
+ <Limitations />
96
+ </ItCode>
97
+ <ItCode Code="08.08.">
98
+ <DescriptionDe>Impfstoffe</DescriptionDe>
99
+ <DescriptionFr>Vaccins</DescriptionFr>
100
+ <DescriptionIt>Vaccini </DescriptionIt>
101
+ <Limitations>
102
+ <Limitation>
103
+ <LimitationCode>0808</LimitationCode>
104
+ <LimitationType>KOM</LimitationType>
105
+ <LimitationNiveau>I</LimitationNiveau>
106
+ <DescriptionDe>Die Kostenübernahme der Impfstoffe als Teil einer präventiven Massnahme im Rahmen der obligatorischen Krankenpflegeversicherung richtet sich nach den in Artikel 12a KLV für die jeweiligen Impfungen abschliessend festgelegten Voraussetzungen. Bei beruflicher und reisemedizinischer Indikation erfolgt keine Kostenübernahme durch die obligatorische Krankenpflegeversicherung.&lt;br&gt;
107
+ 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. Wenn der Impfstoff zu einem günstigeren Preis bezogen wird (z.B. im Rahmen von Reihenimpfungen), darf der Arzt oder die Ärztin nicht den Publikumspreis der SL verrechnen. Die Vergünstigung muss gemäss Artikel 56 Absatz 3 KVG weitergegeben werden.&lt;br&gt;
108
+ &lt;br&gt;
109
+ Die Vergünstigung muss gemäss Artikel 56 Absatz 3 KVG weitergegeben werden, ausser es bestehen Vereinbarungen nach Artikel 56 Absatz 3bis KVG.&lt;br&gt;
110
+ &lt;br&gt;
111
+ </DescriptionDe>
112
+ <DescriptionFr>La prise en charge des coûts des vaccins au titre de mesure préventive dans le cadre de l'assurance maladie obligatoire des soins est régie par les conditions contraignantes fixées à l'article 12a OPAS pour les vaccinations correspondantes. En cas d'indication professionnelle et de recommandation médicale aux voyageurs, la vaccination n'est pas prise en charge par l'assurance maladie obligatoire des soins. Les prix des vaccins sont des prix maximaux (art. 52, al. 3, LAMal) et ne s'appliquent pas aux vaccinations en série (par ex. dans le service médical scolaire). Dans ce cas, les tarifs négociés par les assureurs maladie avec les autorités compétentes ou, le cas échéant, ceux fixés par les autorités, sont applicables. Si le vaccin est acheté à un prix inférieur (par exemple dans le cadre d'une série de vaccinations), le médecin ne peut pas le facturer au prix public de la LS. L'avantage doit être répercuté conformément à l'article 56, al. 3, LAMal.&lt;br&gt;
113
+ &lt;br&gt;
114
+ L'avantage doit être répercuté conformément à l'article 56, al. 3, LAMal, hormis si des conventions au sens de l'art. 56, al. 3bis, LAMal, ont été conclues.&lt;br&gt;
115
+ &lt;br&gt;
116
+
117
+ </DescriptionFr>
118
+ <DescriptionIt>L’assunzione dei costi dei vaccini, in quanto misura di prevenzione parziale nel quadro dell’assicurazione obbligatoria delle cure medico-sanitarie, è disciplinata in modo esauriente dalle condizioni fissate per i vaccini interessati nell’articolo 12a OPre. In caso di indicazione professionale e di medicina di viaggio, l’assicurazione obbligatoria delle cure medico-sanitarie non ne assume i costi.&lt;br&gt;
119
+ I prezzi dei vaccini sono prezzi massimi (art. 52 cpv. 3 LAMal) e non si applicano alle vaccinazioni in serie (ad. es. quelle effettuate nell’ambito del servizio medico scolastico). In questi casi sono applicabili le tariffe negoziate dagli assicuratori malattie con le autorità competenti o quelle eventualmente stabilite dalle autorità. Se il vaccino è acquistato a un prezzo più conveniente (p. es. nel quadro di vaccinazioni in serie), il medico non può fatturare il prezzo per il pubblico che figura nell’ES. Lo sconto deve essere fatto usufruire al debitore secondo l’articolo 56 capoverso 3 LAMal.&lt;br&gt;
120
+ &lt;br&gt;
121
+ Lo sconto deve essere fatto usufruire al debitore secondo l’articolo 56 capoverso 3 LAMal, tranne in caso di accordi di cui all’articolo 56 capoverso 3bis LAMal.&lt;br&gt;
122
+ &lt;br&gt;
123
+ </DescriptionIt>
124
+ <ValidFromDate>01.01.2000</ValidFromDate>
125
+ <ValidThruDate>31.12.9999</ValidThruDate>
126
+ </Limitation>
127
+ </Limitations>
128
+ </ItCode>
129
+ </ItCodes>
130
+ <Status>
131
+ <IntegrationDate>01.01.2005</IntegrationDate>
132
+ <ValidFromDate>01.01.2005</ValidFromDate>
133
+ <ValidThruDate>31.12.9999</ValidThruDate>
134
+ <StatusTypeCodeSl>0</StatusTypeCodeSl>
135
+ <StatusTypeDescriptionSl>Initialzustand</StatusTypeDescriptionSl>
136
+ <FlagApd>N</FlagApd>
137
+ </Status>
138
+ </Preparation>
3
139
  <Preparation ProductCommercial="394">
4
140
  <NameDe>Ancopir</NameDe>
5
141
  <NameFr>Ancopir</NameFr>
@@ -1239,7 +1375,7 @@
1239
1375
  <StatusTypeDescriptionSl>Initialzustand</StatusTypeDescriptionSl>
1240
1376
  <FlagApd>N</FlagApd>
1241
1377
  </Status>
1242
- </Preparation>
1378
+ </Preparation>
1243
1379
  <Preparation ProductCommercial="25550">
1244
1380
  <NameDe>Adcetris</NameDe>
1245
1381
  <NameFr>Adcetris</NameFr>
@@ -2913,8 +3049,8 @@ Le médecin traitant est tenu de saisir en continu les données requises dans l'
2913
3049
  2) Date du début de traitement, posologie, ajustements posologiques, date de fin de traitement.
2914
3050
 
2915
3051
  </DescriptionFr>
2916
- <DescriptionIt>Per la terapia di mantenimento (monoterapia) in pazienti adulte con carcinoma ovarico avanzato e recidivo, con mutazione BRCA, successivamente a una chemioterapia a base di platino e in presenza di una remissione parziale o completa.&lt;br&gt;
2917
- Il medico curante è tenuto a raccogliere costantemente i dati necessari nell’apposito strumento internet del registro, disponibile su http://www.olaparib-registry.ch. È necessario il consenso scritto della paziente. Devono essere raccolti i seguenti dati:&lt;br&gt;
3052
+ <DescriptionIt>Per la terapia di mantenimento (monoterapia) in pazienti adulte con carcinoma ovarico avanzato e recidivo, con mutazione BRCA, successivamente a una chemioterapia a base di platino e in presenza di una remissione parziale o completa.&lt;br&gt;
3053
+ Il medico curante è tenuto a raccogliere costantemente i dati necessari nell’apposito strumento internet del registro, disponibile su http://www.olaparib-registry.ch. È necessario il consenso scritto della paziente. Devono essere raccolti i seguenti dati:&lt;br&gt;
2918
3054
  1) Anno di nascita e terapie precedenti per il carcinoma ovarico&lt;br&gt;
2919
3055
  2) Data di inizio della terapia, dosaggio, aggiustamenti del dosaggio, data di conclusione della terapia.
2920
3056
  </DescriptionIt>
@@ -2,6 +2,17 @@
2
2
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3
3
  <soap:Body>
4
4
  <ARTICLE xmlns="http://refdatabase.refdata.ch/Article_out" CREATION_DATETIME="2017-12-01T09:41:49.5856186+01:00">
5
+ <ITEM DT="2018-12-05T00:00:00">
6
+ <ATYPE>PHARMA</ATYPE>
7
+ <GTIN>7680005850010</GTIN>
8
+ <PHAR>1770177</PHAR>
9
+ <SWMC_AUTHNR>00585001</SWMC_AUTHNR>
10
+ <NAME_DE>VARILRIX Trockensub c Solv Fertspr 0.5 ml</NAME_DE>
11
+ <NAME_FR>VARILRIX subst sèche c solv ser pré 0.5 ml</NAME_FR>
12
+ <ATC>J07BK01</ATC>
13
+ <AUTH_HOLDER_NAME>GlaxoSmithKline AG</AUTH_HOLDER_NAME>
14
+ <AUTH_HOLDER_GLN>7601001000674</AUTH_HOLDER_GLN>
15
+ </ITEM>
5
16
  <ITEM DT="2017-12-14T00:00:00">
6
17
  <ATYPE>PHARMA</ATYPE>
7
18
  <GTIN>7680545340019</GTIN>
@@ -69,4 +69,5 @@
69
69
  1122069562EINF ARZNEI Urtinktur 1-10g/ml 0010040013401000000000025000005884712
70
70
  1122069639EINF ARZNEI Ceres Urtinktur spez 20ml 0023440031301000000000025000005885322
71
71
  1122069622EINF ARZNEI Ceres Urtinktur 20ml 0018870025201000000000025000005885252
72
-
72
+ 1131770177VARILRIX Trockensub c Solv (alt) Fertspr 0.5 ml 004768006650101B080800076800058500102
73
+ 1127766692VARILRIX Trockensub c Solv Fertspr 0.5 ml 004767006650101B080800076800058500342
@@ -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(40)
185
+ expect(@packs.size).to eq(41)
186
186
  end
187
187
 
188
188
  it 'should have serocytol' do
@@ -966,7 +966,7 @@
966
966
  ]
967
967
  },
968
968
  "method": "get",
969
- "uri": "http://bag.e-mediat.net/SL2007.Web.External/File.axd?file=XMLPublications.zip"
969
+ "uri": "http://www.xn--spezialittenliste-yqb.ch/File.axd?file=XMLPublications.zip"
970
970
  },
971
971
  "response": {
972
972
  "body": {
@@ -256,8 +256,8 @@ def mock_downloads
256
256
  'http://pillbox.oddb.org/TRANSFER.ZIP' => 'transfer.zip',
257
257
  'https://github.com/zdavatz/cpp2sqlite/blob/master/input/atc_codes_multi_lingual.txt' => 'atc.csv',
258
258
  'https://raw.githubusercontent.com/zdavatz/oddb2xml_files/master/LPPV.txt' => 'oddb2xml_files_lppv.txt',
259
- 'http://bag.e-mediat.net/SL2007.Web.External/File.axd?file=XMLPublications.zip' => 'XMLPublications.zip',
260
- 'http://bag.e-mediat.net/Sl2007.web.external/varia_De.htm' => 'varia_De.htm',
259
+ 'http://www.xn--spezialittenliste-yqb.ch/File.axd?file=XMLPublications.zip' => 'XMLPublications.zip',
260
+ 'http://www.spezialitaetenliste.ch/varia_De.htm' => 'varia_De.htm',
261
261
  # 'http://refdatabase.refdata.ch/Service/Article.asmx?WSDL' => 'refdata_Pharma.xml',
262
262
  }.each do |url, file|
263
263
  inhalt = File.read(File.join(Oddb2xml::SpecData, file))
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.6.3
4
+ version: 2.6.8
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: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -479,15 +479,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
479
479
  requirements:
480
480
  - - ">="
481
481
  - !ruby/object:Gem::Version
482
- version: '0'
482
+ version: 2.2.0
483
483
  required_rubygems_version: !ruby/object:Gem::Requirement
484
484
  requirements:
485
485
  - - ">="
486
486
  - !ruby/object:Gem::Version
487
487
  version: '0'
488
488
  requirements: []
489
- rubyforge_project:
490
- rubygems_version: 2.6.8
489
+ rubygems_version: 3.1.2
491
490
  signing_key:
492
491
  specification_version: 4
493
492
  summary: oddb2xml creates xml files.