oddb2xml 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/Elexis_Artikelstamm_v003.xsd +387 -0
  4. data/Elexis_Artikelstamm_v5.xsd +513 -0
  5. data/Gemfile +2 -6
  6. data/History.txt +11 -0
  7. data/README.md +35 -27
  8. data/artikelstamm.md +68 -0
  9. data/bin/compare_v5 +41 -0
  10. data/bin/oddb2xml +3 -15
  11. data/data/article_overrides.yaml +51859 -0
  12. data/data/gtin2ignore.yaml +30510 -0
  13. data/data/product_overrides.yaml +4 -0
  14. data/lib/oddb2xml/builder.rb +543 -192
  15. data/lib/oddb2xml/cli.rb +82 -62
  16. data/lib/oddb2xml/compare.rb +189 -0
  17. data/lib/oddb2xml/compressor.rb +6 -3
  18. data/lib/oddb2xml/downloader.rb +79 -64
  19. data/lib/oddb2xml/extractor.rb +67 -40
  20. data/lib/oddb2xml/options.rb +76 -77
  21. data/lib/oddb2xml/parslet_compositions.rb +18 -1
  22. data/lib/oddb2xml/util.rb +25 -3
  23. data/lib/oddb2xml/version.rb +1 -1
  24. data/oddb2xml.gemspec +8 -5
  25. data/oddb2xml.xsd +1 -0
  26. data/spec/artikelstamm_spec.rb +383 -0
  27. data/spec/builder_spec.rb +147 -118
  28. data/spec/calc_spec.rb +3 -15
  29. data/spec/cli_spec.rb +24 -35
  30. data/spec/compare_spec.rb +24 -0
  31. data/spec/compressor_spec.rb +1 -3
  32. data/spec/data/Elexis_Artikelstamm_v5.xsd +513 -0
  33. data/spec/data/Preparations.xml +2200 -0
  34. data/spec/data/Publications.xls +0 -0
  35. data/spec/data/artikelstamm_N_010917.xml +39 -0
  36. data/spec/data/artikelstamm_N_011217.xml +17 -0
  37. data/spec/data/artikelstamm_P_010917.xml +86 -0
  38. data/spec/data/artikelstamm_P_011217.xml +63 -0
  39. data/spec/data/oddb2xml_files_lppv.txt +2 -0
  40. data/spec/data/refdata_NonPharma.xml +38 -0
  41. data/spec/data/refdata_Pharma.xml +220 -0
  42. data/spec/data/swissmedic_orphan.xlsx +0 -0
  43. data/spec/data/swissmedic_package.xlsx +0 -0
  44. data/spec/data/transfer.dat +59 -19
  45. data/spec/data/v5_first.xml +102 -0
  46. data/spec/data/v5_second.xml +184 -0
  47. data/spec/data_helper.rb +72 -0
  48. data/spec/downloader_spec.rb +19 -27
  49. data/spec/extractor_spec.rb +27 -33
  50. data/spec/fixtures/vcr_cassettes/artikelstamm.json +1 -0
  51. data/spec/options_spec.rb +73 -66
  52. data/spec/spec_helper.rb +73 -24
  53. data/test_options.rb +4 -2
  54. metadata +100 -21
  55. data/spec/data/XMLPublications.zip +0 -0
  56. data/spec/data/compressor/oddb_article.xml +0 -0
  57. data/spec/data/compressor/oddb_fi.xml +0 -0
  58. data/spec/data/compressor/oddb_fi_product.xml +0 -0
  59. data/spec/data/compressor/oddb_limitation.xml +0 -0
  60. data/spec/data/compressor/oddb_product.xml +0 -0
  61. data/spec/data/compressor/oddb_substance.xml +0 -0
@@ -608,17 +608,6 @@ Die HILFSSTOFFE sind Aqua ad iniectabilia und Natrii chloridum.
608
608
  specify { expect(argenti.chemical_substance).to eq nil }
609
609
  end
610
610
  end
611
- context 'shire Subcuvia' do
612
- # def initialize(column_c = nil, size = nil, unit = nil, active_substance = nil, composition= nil)
613
- substance = 'immunoglobulinum humanum normale'
614
- composition = 'proteina 160 mg cum immunoglobulinum humanum normale min. 95 %, glycinum, natrii chloridum, aqua ad iniectabilia, q.s. ad solutionem pro 1 ml.'
615
- info = Calc.new('Subcuvia, Injektionslösung', '5', 'ml', substance, composition)
616
- specify { expect(info.compositions.first.substances.first.name).to eq 'Proteina' }
617
- specify { expect(info.compositions.first.substances[1].name).to eq 'Cum Immunoglobulinum Humanum Normale' }
618
- specify { expect(info.compositions.first.substances[1].is_active_agent).to eq true }
619
- specify { expect(info.pkg_size).to eq '5' }
620
- end
621
-
622
611
  end
623
612
 
624
613
  describe Oddb2xml::Calc do
@@ -631,9 +620,8 @@ describe Oddb2xml::Calc do
631
620
  Dir.chdir(Oddb2xml::WorkDir)
632
621
  VCR.eject_cassette; VCR.insert_cassette('oddb2xml')
633
622
  @run_time_options = '--calc --skip-download'
634
- @options = Oddb2xml::Options.new
635
- @options.parser.parse!(@run_time_options.split(' '))
636
- @res = buildr_capture(:stdout){ Oddb2xml::Cli.new(@options.opts).run }
623
+ @options = Oddb2xml::Options.parse(@run_time_options)
624
+ @res = buildr_capture(:stdout){ Oddb2xml::Cli.new(@options).run }
637
625
  expect(File.exists?(Oddb_calc_xml)).to eq true
638
626
  @doc = REXML::Document.new File.read(Oddb_calc_xml)
639
627
  @nokogiri = Nokogiri::XML(File.read(Oddb_calc_xml))
@@ -802,7 +790,7 @@ describe Oddb2xml::Calc do
802
790
 
803
791
  it 'should create correct entries for Caverject' do
804
792
  expect(XPath.match( @doc, "//ARTICLE[GTIN='7680556740075']/NAME").first.text).to eq "Caverject DC 20, Injektionspräparat"
805
- expect(XPath.match( @doc, "//ARTICLE[GTIN='7680556740075']/COMPOSITIONS/COMPOSITION/SUBSTANCES/SUBSTANCE").size).to eq 6
793
+ expect(XPath.match( @doc, "//ARTICLE[GTIN='7680556740075']/COMPOSITIONS/COMPOSITION/SUBSTANCES/SUBSTANCE").size).to eq 5
806
794
  expect(XPath.match( @doc, "//ARTICLE[GTIN='7680556740075']/COMPOSITIONS/COMPOSITION/EXCIPIENS/SUBSTANCE_NAME").first.text).to eq "pro Vitro"
807
795
  end
808
796
  end
@@ -48,20 +48,17 @@ describe Oddb2xml::Cli do
48
48
  context 'when -x address option is given' do
49
49
  before(:all) do
50
50
  cleanup_directories_before_run
51
- options = Oddb2xml::Options.new
52
- options.parser.parse!('-e --log'.split(' '))
53
- @cli = Oddb2xml::Cli.new(options.opts)
51
+ options = Oddb2xml::Options.parse('-e')
52
+ # @cli = Oddb2xml::Cli.new(options); @cli.run
54
53
  @cli_output = buildr_capture(:stdout) { @cli.run }
55
54
  end
56
55
  end
57
56
  context 'when -o fi option is given' do
58
57
  before(:all) do
59
58
  cleanup_directories_before_run
60
- options = Oddb2xml::Options.new
61
- options.parser.parse!('-o fi'.split(' '))
62
- @cli = Oddb2xml::Cli.new(options.opts)
63
- # @cli_output = buildr_capture(:stdout) { @cli.run }
64
- @cli.run
59
+ options = Oddb2xml::Options.parse('-o fi')
60
+ @cli = Oddb2xml::Cli.new(options);
61
+ @cli_output = buildr_capture(:stdout) { @cli.run }
65
62
  end
66
63
  # it_behaves_like 'any interface for product'
67
64
  it 'should have nonpharma option' do
@@ -72,14 +69,13 @@ describe Oddb2xml::Cli do
72
69
  context 'when -t md option is given' do
73
70
  before(:all) do
74
71
  cleanup_directories_before_run
75
- options = Oddb2xml::Options.new
76
- options.parser.parse!('-t md'.split(' '))
77
- @cli = Oddb2xml::Cli.new(options.opts)
72
+ options = Oddb2xml::Options.parse('-t md')
73
+ @cli = Oddb2xml::Cli.new(options)
78
74
  @cli_output = buildr_capture(:stdout) { @cli.run }
79
75
  end
80
76
  it_behaves_like 'any interface for product'
81
77
  it 'should have tag_suffix option' do
82
- expect(@cli).to have_option(:tag_suffix=> 'MD')
78
+ expect(@cli).to have_option(:tag_suffix=> 'md')
83
79
  end
84
80
  it 'should not create a compressed file' do
85
81
  expect(Dir.glob(File.join(Oddb2xml::WorkDir, 'oddb_*.tar.gz')).first).to be_nil
@@ -113,9 +109,8 @@ describe Oddb2xml::Cli do
113
109
  context 'when -c tar.gz option is given' do
114
110
  before(:all) do
115
111
  cleanup_directories_before_run
116
- options = Oddb2xml::Options.new
117
- options.parser.parse!('-c tar.gz'.split(' '))
118
- @cli = Oddb2xml::Cli.new(options.opts)
112
+ options = Oddb2xml::Options.parse('-c tar.gz')
113
+ @cli = Oddb2xml::Cli.new(options)
119
114
  @cli_output = buildr_capture(:stdout) { @cli.run }
120
115
  # @cli_output = @cli.run # to debug
121
116
  end
@@ -144,9 +139,8 @@ describe Oddb2xml::Cli do
144
139
  context 'when -c zip option is given' do
145
140
  before(:all) do
146
141
  cleanup_directories_before_run
147
- options = Oddb2xml::Options.new
148
- options.parser.parse!('-c zip'.split(' '))
149
- @cli = Oddb2xml::Cli.new(options.opts)
142
+ options = Oddb2xml::Options.parse('-c zip')
143
+ @cli = Oddb2xml::Cli.new(options)
150
144
  @cli_output = buildr_capture(:stdout) { @cli.run }
151
145
  end
152
146
  it_behaves_like 'any interface for product'
@@ -170,9 +164,8 @@ describe Oddb2xml::Cli do
170
164
  context 'when -f dat option is given' do
171
165
  before(:all) do
172
166
  cleanup_directories_before_run
173
- options = Oddb2xml::Options.new
174
- options.parser.parse!('-f dat'.split(' '))
175
- @cli = Oddb2xml::Cli.new(options.opts)
167
+ options = Oddb2xml::Options.parse('-f dat')
168
+ @cli = Oddb2xml::Cli.new(options)
176
169
  @cli_output = buildr_capture(:stdout) { @cli.run }
177
170
  end
178
171
  it_behaves_like 'any interface for product'
@@ -195,9 +188,8 @@ describe Oddb2xml::Cli do
195
188
  context 'when -a nonpharma option is given' do
196
189
  before(:all) do
197
190
  cleanup_directories_before_run
198
- options = Oddb2xml::Options.new
199
- options.parser.parse!('-a nonpharma'.split(' '))
200
- @cli = Oddb2xml::Cli.new(options.opts)
191
+ options = Oddb2xml::Options.parse('-a nonpharma')
192
+ @cli = Oddb2xml::Cli.new(options)
201
193
  @cli_output = buildr_capture(:stdout) { @cli.run }
202
194
  end
203
195
  it_behaves_like 'any interface for product'
@@ -227,14 +219,13 @@ describe Oddb2xml::Cli do
227
219
  context 'when -t _swiss option is given' do
228
220
  before(:all) do
229
221
  cleanup_directories_before_run
230
- options = Oddb2xml::Options.new
231
- options.parser.parse!('-t _swiss'.split(' '))
232
- @cli = Oddb2xml::Cli.new(options.opts)
222
+ options = Oddb2xml::Options.parse('-t _swiss')
223
+ @cli = Oddb2xml::Cli.new(options)
233
224
  @cli_output = buildr_capture(:stdout) { @cli.run }
234
225
  end
235
226
  it_behaves_like 'any interface for product'
236
227
  it 'should have tag_suffix option' do
237
- expect(@cli).to have_option(:tag_suffix=> '_SWISS')
228
+ expect(@cli).to have_option(:tag_suffix=> '_swiss')
238
229
  end
239
230
  it 'should not create any compressed file' do
240
231
  expect(@cli_output).to match(/Pharma/)
@@ -259,9 +250,8 @@ describe Oddb2xml::Cli do
259
250
  context 'when -o fi option is given' do
260
251
  before(:all) do
261
252
  cleanup_directories_before_run
262
- options = Oddb2xml::Options.new
263
- options.parser.parse!('-o fi'.split(' '))
264
- @cli = Oddb2xml::Cli.new(options.opts)
253
+ options = Oddb2xml::Options.parse('-o fi')
254
+ @cli = Oddb2xml::Cli.new(options)
265
255
  @cli_output = buildr_capture(:stdout) { @cli.run }
266
256
  end
267
257
  it_behaves_like 'any interface for product'
@@ -293,9 +283,8 @@ describe Oddb2xml::Cli do
293
283
  context 'when -x address option is given' do
294
284
  before(:all) do
295
285
  cleanup_directories_before_run
296
- options = Oddb2xml::Options.new
297
- options.parser.parse!('-x address'.split(' '))
298
- @cli = Oddb2xml::Cli.new(options.opts)
286
+ options = Oddb2xml::Options.parse('-x address')
287
+ @cli = Oddb2xml::Cli.new(options)
299
288
  @cli_output = buildr_capture(:stdout) { @cli.run }
300
289
  end
301
290
  it_behaves_like 'any interface for address'
@@ -320,4 +309,4 @@ describe Oddb2xml::Cli do
320
309
  end.to_a.length).to equal expected
321
310
  end
322
311
  end if false # TODO: pending medreg
323
- end
312
+ end
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+ require 'spec_helper'
3
+ require "rexml/document"
4
+ require "oddb2xml/compare"
5
+
6
+ describe Oddb2xml::CompareV5 do
7
+
8
+ context 'when comparing v5' do
9
+ before(:all) do
10
+ @first = File.join(Oddb2xml::SpecData, 'v5_first.xml')
11
+ @second = File.join(Oddb2xml::SpecData, 'v5_second.xml')
12
+ expect(File.exist?(@second)).to eq true
13
+ expect(File.exist?(@first)).to eq true
14
+ @result = Oddb2xml::CompareV5.new(@first, @second).compare
15
+ end
16
+ it 'should return true' do
17
+ expected = {"PRODUCTS"=>{"NR_COMPARED"=>1, "PRODNO"=>0, "SALECD"=>0, "DSCR"=>1, "DSCRF"=>0, "ATC"=>0, "SUBSTANCE"=>1},
18
+ "LIMITATIONS"=>{"NR_COMPARED"=>3, "LIMNAMEBAG"=>0, "DSCR"=>0, "DSCRF"=>0, "LIMITATION_PTS"=>1},
19
+ "ITEMS"=>{"NR_COMPARED"=>4, "PHARMATYPE"=>0, "GTIN"=>0, "SALECD"=>0, "DSCR"=>0, "DSCRF"=>0, "PEXF"=>2, "PPUB"=>2, "PKG_SIZE"=>0,
20
+ "MEASURE"=>0, "DOSAGE_FORM"=>3, "PRODNO"=>0, "PHAR"=>0, "IKSCAT"=>0}}
21
+ expect(@result).to eq(expected)
22
+ end
23
+ end
24
+ end
@@ -4,17 +4,15 @@ require 'spec_helper'
4
4
 
5
5
  shared_examples_for 'any compressor' do
6
6
  it 'should create compress file' do
7
- allow(File).to receive(:unlink).and_return(false)
8
7
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_article.xml')
9
8
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_product.xml')
10
9
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_substance.xml')
11
10
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_limitation.xml')
12
11
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_fi.xml')
13
12
  @compressor.contents << File.join(Oddb2xml::SpecCompressor, 'oddb_fi_product.xml')
14
- expect(@compressor.finalize!).to eq(true)
13
+ expect(@compressor.finalize!).not_to be nil
15
14
  compress_file = @compressor.instance_variable_get(:@compress_file)
16
15
  expect(File.exists?(compress_file)).to eq(true)
17
- allow(File).to receive(:unlink).and_call_original
18
16
  @compressor = nil
19
17
  end
20
18
  end
@@ -0,0 +1,513 @@
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
9
+ Contributors: MEDEVIT <office@medevit.at> - initial API and implementation -->
10
+ <xs:schema targetNamespace="http://elexis.ch/Elexis_Artikelstamm_v5"
11
+ elementFormDefault="qualified" attributeFormDefault="unqualified"
12
+ version="4" id="Elexis_Artikelstamm_v003" xmlns="http://elexis.ch/Elexis_Artikelstamm_v5" xmlns:xs="http://www.w3.org/2001/XMLSchema">
13
+ <xs:element name="ARTIKELSTAMM">
14
+ <xs:annotation>
15
+ <xs:documentation xml:lang="EN">Information on
16
+ medicaments
17
+ </xs:documentation>
18
+ </xs:annotation>
19
+ <xs:complexType>
20
+ <xs:sequence>
21
+ <xs:element name="PRODUCTS" minOccurs="1"
22
+ maxOccurs="1">
23
+ <xs:complexType>
24
+ <xs:sequence>
25
+ <xs:element name="PRODUCT" minOccurs="0"
26
+ maxOccurs="unbounded">
27
+ <xs:complexType>
28
+ <xs:sequence>
29
+ <xs:element name="PRODNO"
30
+ type="PRODNOType" minOccurs="1" maxOccurs="1">
31
+ </xs:element>
32
+ <xs:element name="SALECD" type="SALECDType" minOccurs="1" maxOccurs="1">
33
+ </xs:element>
34
+ <xs:element name="DSCR"
35
+ type="DSCRType" minOccurs="1" maxOccurs="1">
36
+ </xs:element>
37
+ <xs:element name="DSCRF"
38
+ type="DSCRType" minOccurs="1" maxOccurs="1">
39
+ </xs:element>
40
+ <xs:element name="ATC"
41
+ nillable="false" maxOccurs="1" minOccurs="0">
42
+ <xs:annotation>
43
+ <xs:documentation
44
+ xml:lang="EN">
45
+ ATC Code beinhaltet
46
+ Information ob Item
47
+ ein Impfstoff ist.
48
+ Dies ist der Fall
49
+ wenn der ATC Code
50
+ mit J07 startet.
51
+ </xs:documentation>
52
+ </xs:annotation>
53
+ <xs:simpleType>
54
+ <xs:restriction
55
+ base="xs:string">
56
+ <xs:maxLength
57
+ value="8" />
58
+ </xs:restriction>
59
+ </xs:simpleType>
60
+ </xs:element>
61
+ <xs:element name="LIMNAMEBAG"
62
+ type="xs:string" minOccurs="0" maxOccurs="1">
63
+ </xs:element>
64
+
65
+ <xs:element name="SUBSTANCE"
66
+ type="xs:string" minOccurs="0" maxOccurs="1">
67
+ </xs:element>
68
+ <xs:element name="SUBSTANCEF"
69
+ type="xs:string" minOccurs="0" maxOccurs="1">
70
+ </xs:element>
71
+ </xs:sequence>
72
+ </xs:complexType>
73
+ <xs:unique name="uniqueProdno">
74
+ <xs:selector xpath="PRODNO" />
75
+ <xs:field xpath="." />
76
+ </xs:unique>
77
+ </xs:element>
78
+ </xs:sequence>
79
+ </xs:complexType>
80
+ </xs:element>
81
+ <xs:element name="LIMITATIONS" minOccurs="1"
82
+ maxOccurs="1">
83
+ <xs:complexType>
84
+ <xs:sequence>
85
+ <xs:element name="LIMITATION" minOccurs="0"
86
+ maxOccurs="unbounded">
87
+ <xs:complexType>
88
+ <xs:sequence>
89
+ <xs:element name="LIMNAMEBAG"
90
+ type="xs:string" minOccurs="1" maxOccurs="1">
91
+ </xs:element>
92
+ <xs:element name="DSCR"
93
+ type="DSCRType" minOccurs="1" maxOccurs="1">
94
+ </xs:element>
95
+ <xs:element name="DSCRF"
96
+ type="DSCRType" minOccurs="1" maxOccurs="1">
97
+ </xs:element>
98
+ <xs:element
99
+ name="LIMITATION_PTS" type="xs:int" maxOccurs="1"
100
+ minOccurs="0">
101
+ <xs:annotation>
102
+ <xs:documentation>
103
+ Limitationspunkte
104
+ </xs:documentation>
105
+ </xs:annotation>
106
+ </xs:element>
107
+ </xs:sequence>
108
+ </xs:complexType>
109
+ </xs:element>
110
+ </xs:sequence>
111
+ </xs:complexType>
112
+ </xs:element>
113
+
114
+ <xs:element name="ITEMS" minOccurs="1" maxOccurs="1">
115
+ <xs:complexType>
116
+ <xs:sequence>
117
+ <xs:element name="ITEM" minOccurs="0"
118
+ maxOccurs="unbounded">
119
+ <xs:complexType>
120
+ <xs:annotation>
121
+ <xs:documentation>
122
+ Packungsgröße verrechnet,
123
+ also Anzahl der beinhalteten
124
+ Elemente (bspw. 100
125
+ Tabletten)
126
+ </xs:documentation>
127
+ </xs:annotation>
128
+ <xs:sequence>
129
+
130
+ <xs:element name="GTIN"
131
+ nillable="false" minOccurs="0" maxOccurs="1">
132
+ <xs:annotation>
133
+ <xs:documentation
134
+ xml:lang="EN">
135
+ Reference number
136
+ (GTIN = Global trade
137
+ item number)
138
+ </xs:documentation>
139
+ </xs:annotation>
140
+ <xs:simpleType>
141
+ <xs:restriction
142
+ base="xs:string">
143
+
144
+ </xs:restriction>
145
+ </xs:simpleType>
146
+ </xs:element>
147
+ <xs:element name="PHAR"
148
+ nillable="false" minOccurs="0" maxOccurs="1">
149
+ <xs:annotation>
150
+ <xs:documentation
151
+ xml:lang="EN">
152
+ Pharmacode
153
+ </xs:documentation>
154
+ </xs:annotation>
155
+ <xs:simpleType>
156
+ <xs:restriction
157
+ base="xs:integer" />
158
+ </xs:simpleType>
159
+ </xs:element>
160
+
161
+
162
+ <xs:element name="SALECD" type="SALECDType" minOccurs="1" maxOccurs="1">
163
+ <xs:annotation>
164
+ <xs:documentation></xs:documentation>
165
+ </xs:annotation>
166
+ </xs:element>
167
+ <xs:element name="DSCR"
168
+ nillable="false" type="DSCRType" minOccurs="1"
169
+ maxOccurs="1">
170
+ <xs:annotation>
171
+ <xs:documentation
172
+ xml:lang="EN">
173
+ Product description,
174
+ e.g. Adalat retard
175
+ Tabletten 20 mg
176
+ </xs:documentation>
177
+ </xs:annotation>
178
+ </xs:element>
179
+ <xs:element name="DSCRF"
180
+ type="xs:string" minOccurs="1" maxOccurs="1">
181
+ </xs:element>
182
+ <xs:element name="COMP"
183
+ minOccurs="0">
184
+ <xs:annotation>
185
+ <xs:documentation
186
+ xml:lang="EN">
187
+ Manufacturer
188
+ </xs:documentation>
189
+ </xs:annotation>
190
+ <xs:complexType>
191
+ <xs:sequence>
192
+ <xs:element
193
+ name="NAME" minOccurs="0" maxOccurs="1">
194
+ <xs:annotation>
195
+ <xs:documentation>
196
+ CompanyName
197
+ </xs:documentation>
198
+ </xs:annotation>
199
+ <xs:simpleType>
200
+ <xs:restriction
201
+ base="xs:string">
202
+ <xs:maxLength
203
+ value="101" />
204
+ </xs:restriction>
205
+ </xs:simpleType>
206
+ </xs:element>
207
+ <xs:element
208
+ name="GLN" nillable="false" minOccurs="0" maxOccurs="1">
209
+ <xs:annotation>
210
+ <xs:documentation
211
+ xml:lang="EN">
212
+ Company
213
+ GLN
214
+ </xs:documentation>
215
+ </xs:annotation>
216
+ <xs:simpleType>
217
+ <xs:restriction
218
+ base="xs:string">
219
+ <xs:maxLength
220
+ value="13" />
221
+ </xs:restriction>
222
+ </xs:simpleType>
223
+ </xs:element>
224
+ </xs:sequence>
225
+ </xs:complexType>
226
+ </xs:element>
227
+ <xs:element name="PEXF"
228
+ type="xs:double" minOccurs="0" maxOccurs="1">
229
+ <xs:annotation>
230
+ <xs:documentation>
231
+ Exfactorypreis in
232
+ Franken und Rappen
233
+ (exkl. MWSt)
234
+ </xs:documentation>
235
+ </xs:annotation>
236
+ </xs:element>
237
+ <xs:element name="PPUB"
238
+ type="xs:double" minOccurs="0" maxOccurs="1">
239
+ <xs:annotation>
240
+ <xs:documentation>
241
+ Publikumspreis in
242
+ Franken und Rappen
243
+ (inkl.MWSt)
244
+ </xs:documentation>
245
+ </xs:annotation>
246
+ </xs:element>
247
+ <xs:element name="PKG_SIZE"
248
+ type="xs:int" maxOccurs="1" minOccurs="0">
249
+ </xs:element>
250
+ <xs:element name="MEASURE" type="xs:string" minOccurs="0" maxOccurs="1">
251
+ <xs:annotation>
252
+ <xs:documentation>
253
+ Measurement Unit,
254
+ e.g. Pills or
255
+ milliliters
256
+ </xs:documentation>
257
+ </xs:annotation>
258
+ </xs:element>
259
+ <xs:element
260
+ name="MEASUREF" type="xs:string" minOccurs="0"
261
+ maxOccurs="1">
262
+ </xs:element>
263
+ <xs:element name="DOSAGE_FORM" type="xs:string" minOccurs="0" maxOccurs="1">
264
+ <xs:annotation>
265
+ <xs:documentation>
266
+ Die Darreichungsform
267
+ dieses Items. zB
268
+ Tablette(n) oder
269
+ Spritze(n)
270
+ </xs:documentation>
271
+ </xs:annotation>
272
+ </xs:element>
273
+ <xs:element name="DOSAGE_FORMF" type="xs:string" minOccurs="0" maxOccurs="1">
274
+ <xs:annotation>
275
+ <xs:documentation>Die Darreichungsform dieses Items. zB Tablette(n) oder Spritze(n) in französicher Sprache
276
+ </xs:documentation>
277
+ </xs:annotation>
278
+ </xs:element>
279
+ <xs:element name="SL_ENTRY"
280
+ type="xs:boolean" minOccurs="0" maxOccurs="1">
281
+ <xs:annotation>
282
+ <xs:documentation>
283
+ Item ist in der
284
+ Spezialitätenliste
285
+ (SL) eingetragen
286
+ </xs:documentation>
287
+ </xs:annotation>
288
+ </xs:element>
289
+ <xs:element name="IKSCAT"
290
+ maxOccurs="1" minOccurs="0">
291
+ <xs:annotation>
292
+ <xs:documentation>
293
+ Abgabekategorie
294
+ </xs:documentation>
295
+ </xs:annotation>
296
+
297
+ <xs:simpleType>
298
+ <xs:annotation>
299
+ <xs:documentation>
300
+ Abgabekategorie,
301
+ A-E A:
302
+ verschärft
303
+ rezeptpflichtig
304
+ B:
305
+ Rezeptpflichtig
306
+ C: erhältlich in
307
+ Apotheken ohne
308
+ Rezept D:
309
+ erhältlich in
310
+ Apotheken und
311
+ Drogerien E:
312
+ keine
313
+ Kategorisierung
314
+ </xs:documentation>
315
+ </xs:annotation>
316
+ <xs:restriction
317
+ base="xs:string">
318
+ <xs:enumeration
319
+ value="A">
320
+ </xs:enumeration>
321
+ <xs:enumeration
322
+ value="B">
323
+ </xs:enumeration>
324
+ <xs:enumeration
325
+ value="C">
326
+ </xs:enumeration>
327
+ <xs:enumeration
328
+ value="D">
329
+ </xs:enumeration>
330
+ <xs:enumeration
331
+ value="E">
332
+ </xs:enumeration>
333
+ </xs:restriction>
334
+ </xs:simpleType>
335
+ </xs:element>
336
+ <xs:element name="GENERIC_TYPE"
337
+ maxOccurs="1" minOccurs="0">
338
+
339
+ <xs:simpleType>
340
+ <xs:annotation>
341
+ <xs:documentation>
342
+ O Original G
343
+ Generikum K
344
+ Komplementärprodukt
345
+ </xs:documentation>
346
+ </xs:annotation>
347
+ <xs:restriction
348
+ base="xs:string">
349
+ <xs:enumeration
350
+ value="O">
351
+ </xs:enumeration>
352
+ <xs:enumeration
353
+ value="G">
354
+ </xs:enumeration>
355
+ <xs:enumeration
356
+ value="K">
357
+ </xs:enumeration>
358
+ </xs:restriction>
359
+ </xs:simpleType>
360
+ </xs:element>
361
+ <xs:element name="HAS_GENERIC"
362
+ type="xs:boolean" minOccurs="0" maxOccurs="1">
363
+ <xs:annotation>
364
+ <xs:documentation>
365
+ Generikum zu diesem
366
+ Produkt vorhanden
367
+ ja/nein
368
+ </xs:documentation>
369
+ </xs:annotation>
370
+ </xs:element>
371
+ <xs:element name="LPPV"
372
+ type="xs:boolean" maxOccurs="1" minOccurs="0">
373
+ <xs:annotation>
374
+ <xs:documentation>
375
+ Ist eingetragen in
376
+ Liste
377
+ pharmazeutischer
378
+ Präparate mit
379
+ spezieller
380
+ Verwendung (LPPV)
381
+ </xs:documentation>
382
+ </xs:annotation>
383
+ </xs:element>
384
+
385
+ <xs:element name="DEDUCTIBLE"
386
+ type="xs:int" maxOccurs="1" minOccurs="0">
387
+ <xs:annotation>
388
+ <xs:documentation>
389
+ Selbstbehalt für
390
+ SL-Produkte in
391
+ prozent
392
+ </xs:documentation>
393
+ </xs:annotation>
394
+ </xs:element>
395
+ <xs:element name="NARCOTIC"
396
+ type="xs:boolean" maxOccurs="1" minOccurs="0">
397
+ <xs:annotation>
398
+ <xs:documentation>
399
+ Produkt ist
400
+ Betäubungsmittel
401
+ ja/nein
402
+ </xs:documentation>
403
+ </xs:annotation>
404
+ </xs:element>
405
+ <xs:element name="NARCOTIC_CAS"
406
+ type="xs:string" maxOccurs="1" minOccurs="0">
407
+ <xs:annotation>
408
+ <xs:documentation>
409
+ Wenn
410
+ Betäubungsmittel
411
+ (NARCOTIC == true)
412
+ dann CAS Register
413
+ Nummer des Artikels
414
+ </xs:documentation>
415
+ </xs:annotation>
416
+ </xs:element>
417
+
418
+
419
+ <xs:element name="PRODNO"
420
+ minOccurs="0" maxOccurs="1" type="PRODNOType">
421
+ <xs:annotation>
422
+ <xs:documentation>
423
+ Produktnummer des
424
+ Artikels
425
+ </xs:documentation>
426
+ </xs:annotation>
427
+ </xs:element>
428
+ </xs:sequence>
429
+
430
+
431
+
432
+ <xs:attribute name="PHARMATYPE">
433
+ <xs:annotation>
434
+ <xs:documentation>
435
+ If a PRODNO is defined,
436
+ the PharmaType is P
437
+ </xs:documentation>
438
+ </xs:annotation>
439
+ <xs:simpleType>
440
+ <xs:restriction
441
+ base="xs:string">
442
+ <xs:enumeration
443
+ value="N">
444
+ </xs:enumeration>
445
+ <xs:enumeration
446
+ value="P">
447
+ </xs:enumeration>
448
+ </xs:restriction>
449
+ </xs:simpleType>
450
+ </xs:attribute>
451
+ </xs:complexType>
452
+ </xs:element>
453
+ </xs:sequence>
454
+ </xs:complexType>
455
+ </xs:element>
456
+ </xs:sequence>
457
+ <xs:attribute name="CREATION_DATETIME" type="xs:dateTime"
458
+ use="required">
459
+ <xs:annotation>
460
+ <xs:documentation>Erstellungszeitpunkt des QuellDatensatzes (siehe DATA_SOURCE)
461
+ </xs:documentation>
462
+ </xs:annotation>
463
+ </xs:attribute>
464
+
465
+ <xs:attribute name="BUILD_DATETIME" type="xs:dateTime">
466
+ <xs:annotation>
467
+ <xs:documentation>Der Zeitpunkt zu dem dieser Datensatz erstellt wurde.
468
+ </xs:documentation>
469
+ </xs:annotation>
470
+ </xs:attribute>
471
+ <xs:attribute name="DATA_SOURCE" type="DATASOURCEType">
472
+ <xs:annotation>
473
+ <xs:documentation></xs:documentation>
474
+ </xs:annotation></xs:attribute>
475
+ </xs:complexType>
476
+ </xs:element>
477
+
478
+
479
+
480
+
481
+
482
+
483
+ <xs:simpleType name="PRODNOType">
484
+ <xs:restriction base="xs:string"></xs:restriction>
485
+ </xs:simpleType>
486
+
487
+ <xs:simpleType name="DSCRType">
488
+ <xs:restriction base="xs:string"></xs:restriction>
489
+ </xs:simpleType>
490
+
491
+
492
+
493
+ <xs:simpleType name="DATASOURCEType">
494
+ <xs:annotation>
495
+ <xs:documentation>The data source this Artikelstamm is generated from.
496
+ </xs:documentation>
497
+ </xs:annotation>
498
+ <xs:restriction base="xs:string">
499
+ <xs:enumeration value="oddb2xml"></xs:enumeration>
500
+ <xs:enumeration value="medindex"></xs:enumeration>
501
+ </xs:restriction>
502
+ </xs:simpleType>
503
+
504
+ <xs:simpleType name="SALECDType">
505
+ <xs:annotation>
506
+ <xs:documentation>Bedeutung ist 'A' = Aktiv,'I' = inaktiv == Ausser Handel</xs:documentation>
507
+ </xs:annotation>
508
+ <xs:restriction base="xs:string">
509
+ <xs:enumeration value="I"></xs:enumeration>
510
+ <xs:enumeration value="A"></xs:enumeration>
511
+ </xs:restriction>
512
+ </xs:simpleType>
513
+ </xs:schema>