oddb2xml 1.8.0 → 1.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile.lock +4 -1
- data/History.txt +22 -0
- data/Rakefile +3 -0
- data/lib/oddb2xml/builder.rb +6 -4
- data/lib/oddb2xml/downloader.rb +9 -2
- data/lib/oddb2xml/extractor.rb +100 -78
- data/lib/oddb2xml/version.rb +1 -1
- data/lib/oddb2xml/xml_definitions.rb +250 -0
- data/oddb2xml.gemspec +1 -1
- data/spec/builder_spec.rb +64 -34
- data/spec/data/Preparation.xml +642 -225
- data/spec/data/Preparations.xml +641 -98
- data/spec/data/XMLPublications.zip +0 -0
- data/spec/data/epha_interactions.csv +3 -3
- data/spec/extractor_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +20 -31
Binary file
|
@@ -1,3 +1,3 @@
|
|
1
|
-
ATC1
|
2
|
-
|
3
|
-
|
1
|
+
"ATC1","Name1","ATC2","Name2","Info","Mechanismus","Effekt","Massnahmen","Grad"
|
2
|
+
N06AB06","Sertralin","M03BX02","Tizanidin","Keine Interaktion","Tizanidin wird über CYP1A2 metabolisiert. Sertralin beeinflusst CYP1A2 jedoch nicht.","Keine Interaktion.","Die Kombination aus Sertralin und Tizanidin hat kein bekanntes Interaktionspotential.","A"
|
3
|
+
J05AE08","Atazanavir","C10AA05","Atorvastatin","Erhöhtes Risiko für Myopathie und Rhabdomyolyse","Atazanavir hemmt CYP3A4 und darüber auch den Abbau von Atorvastatin, was zu erhöhten Plasmakonzentrationen von Atorvastatin führt. .","Aufgrund der Inhibition von CYP3A4 durch Atazanavir kann die Atorvastatinkonzentration im Plasma ansteigen, was mit einem erhöhten Risiko für Myopathie und Rhabdomyolyse einhergeht .","Kombination nach Möglichkeit meiden und alternativ Statin wählen, welches nicht mit Atazanavir interagiert, wie z.B. Pravastatin. Ist nach Nutzen-Risiko-Abwägung die Kombination aus Atorvastatin und Atazanavir erforderlich, niedrige Atorvastatindosis (z.B. 10 mg/d) wählen und auf Zeichen der Myopathie und Rhabdomyolyse, wie Muskelschwäche, Muskelschmerzen, verfärbter Urin und CK-Anstieg, achten . Die Kombination aus Atazanavir und Ritonavir mit Atorvastatin ist kontraindiziert.","D"
|
data/spec/extractor_spec.rb
CHANGED
@@ -26,7 +26,7 @@ describe Oddb2xml::BagXmlExtractor do
|
|
26
26
|
expect(with_pharma[:packages].size).to eq(1)
|
27
27
|
expect(with_pharma[:packages].first[0]).to eq('1699947')
|
28
28
|
expect(with_pharma[:packages].first[1][:prices][:pub_price][:price]).to eq('205.3')
|
29
|
-
expect(@items.size).to eq(
|
29
|
+
expect(@items.size).to eq(5)
|
30
30
|
no_pharma = @items['7680620690084']
|
31
31
|
expect(no_pharma).not_to be_nil
|
32
32
|
expect(no_pharma[:atc_code]).not_to be_nil
|
data/spec/spec_helper.rb
CHANGED
@@ -156,12 +156,12 @@ module ServerMockHelper
|
|
156
156
|
end
|
157
157
|
def setup_epha_server_mock
|
158
158
|
# csv
|
159
|
-
stub_csv_url = '
|
159
|
+
stub_csv_url = 'https://download.epha.ch/cleaned/matrix.csv'
|
160
160
|
stub_response = File.read(File.expand_path('../data/epha_interactions.csv', __FILE__))
|
161
161
|
stub_request(:get, stub_csv_url).
|
162
162
|
with(:headers => {
|
163
163
|
'Accept' => '*/*',
|
164
|
-
'Host' => '
|
164
|
+
'Host' => 'download.epha.ch',
|
165
165
|
}).
|
166
166
|
to_return(
|
167
167
|
:status => 200,
|
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oddb2xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
5
|
-
prerelease:
|
4
|
+
version: 1.8.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Yasuhiro Asaka, Zeno R.R. Davatz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rubyzip
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: archive-tar-minitar
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: mechanize
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: nokogiri
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -78,7 +69,6 @@ dependencies:
|
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: savon
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
@@ -86,7 +76,6 @@ dependencies:
|
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
@@ -94,7 +83,6 @@ dependencies:
|
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: spreadsheet
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
87
|
- - ! '>='
|
100
88
|
- !ruby/object:Gem::Version
|
@@ -102,7 +90,6 @@ dependencies:
|
|
102
90
|
type: :runtime
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
94
|
- - ! '>='
|
108
95
|
- !ruby/object:Gem::Version
|
@@ -110,7 +97,6 @@ dependencies:
|
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: rubyXL
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
101
|
- - ~>
|
116
102
|
- !ruby/object:Gem::Version
|
@@ -118,15 +104,27 @@ dependencies:
|
|
118
104
|
type: :runtime
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
108
|
- - ~>
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '2.5'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sax-machine
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ! '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
126
125
|
- !ruby/object:Gem::Dependency
|
127
126
|
name: bundler
|
128
127
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
128
|
requirements:
|
131
129
|
- - ! '>='
|
132
130
|
- !ruby/object:Gem::Version
|
@@ -134,7 +132,6 @@ dependencies:
|
|
134
132
|
type: :development
|
135
133
|
prerelease: false
|
136
134
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
135
|
requirements:
|
139
136
|
- - ! '>='
|
140
137
|
- !ruby/object:Gem::Version
|
@@ -142,7 +139,6 @@ dependencies:
|
|
142
139
|
- !ruby/object:Gem::Dependency
|
143
140
|
name: rake
|
144
141
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
142
|
requirements:
|
147
143
|
- - ! '>='
|
148
144
|
- !ruby/object:Gem::Version
|
@@ -150,7 +146,6 @@ dependencies:
|
|
150
146
|
type: :development
|
151
147
|
prerelease: false
|
152
148
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
149
|
requirements:
|
155
150
|
- - ! '>='
|
156
151
|
- !ruby/object:Gem::Version
|
@@ -158,7 +153,6 @@ dependencies:
|
|
158
153
|
- !ruby/object:Gem::Dependency
|
159
154
|
name: rspec
|
160
155
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
156
|
requirements:
|
163
157
|
- - ! '>='
|
164
158
|
- !ruby/object:Gem::Version
|
@@ -166,7 +160,6 @@ dependencies:
|
|
166
160
|
type: :development
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
163
|
requirements:
|
171
164
|
- - ! '>='
|
172
165
|
- !ruby/object:Gem::Version
|
@@ -174,7 +167,6 @@ dependencies:
|
|
174
167
|
- !ruby/object:Gem::Dependency
|
175
168
|
name: webmock
|
176
169
|
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
170
|
requirements:
|
179
171
|
- - ! '>='
|
180
172
|
- !ruby/object:Gem::Version
|
@@ -182,7 +174,6 @@ dependencies:
|
|
182
174
|
type: :development
|
183
175
|
prerelease: false
|
184
176
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
177
|
requirements:
|
187
178
|
- - ! '>='
|
188
179
|
- !ruby/object:Gem::Version
|
@@ -190,7 +181,6 @@ dependencies:
|
|
190
181
|
- !ruby/object:Gem::Dependency
|
191
182
|
name: rdoc
|
192
183
|
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
184
|
requirements:
|
195
185
|
- - ! '>='
|
196
186
|
- !ruby/object:Gem::Version
|
@@ -198,7 +188,6 @@ dependencies:
|
|
198
188
|
type: :development
|
199
189
|
prerelease: false
|
200
190
|
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
191
|
requirements:
|
203
192
|
- - ! '>='
|
204
193
|
- !ruby/object:Gem::Version
|
@@ -230,6 +219,7 @@ files:
|
|
230
219
|
- lib/oddb2xml/extractor.rb
|
231
220
|
- lib/oddb2xml/util.rb
|
232
221
|
- lib/oddb2xml/version.rb
|
222
|
+
- lib/oddb2xml/xml_definitions.rb
|
233
223
|
- oddb2xml.gemspec
|
234
224
|
- spec/builder_spec.rb
|
235
225
|
- spec/cli_spec.rb
|
@@ -283,27 +273,26 @@ files:
|
|
283
273
|
homepage: https://github.com/zdavatz/oddb2xml
|
284
274
|
licenses:
|
285
275
|
- GPL-v2
|
276
|
+
metadata: {}
|
286
277
|
post_install_message:
|
287
278
|
rdoc_options: []
|
288
279
|
require_paths:
|
289
280
|
- lib
|
290
281
|
required_ruby_version: !ruby/object:Gem::Requirement
|
291
|
-
none: false
|
292
282
|
requirements:
|
293
283
|
- - ! '>='
|
294
284
|
- !ruby/object:Gem::Version
|
295
285
|
version: '0'
|
296
286
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
297
|
-
none: false
|
298
287
|
requirements:
|
299
288
|
- - ! '>='
|
300
289
|
- !ruby/object:Gem::Version
|
301
290
|
version: '0'
|
302
291
|
requirements: []
|
303
292
|
rubyforge_project:
|
304
|
-
rubygems_version:
|
293
|
+
rubygems_version: 2.2.1
|
305
294
|
signing_key:
|
306
|
-
specification_version:
|
295
|
+
specification_version: 4
|
307
296
|
summary: oddb2xml creates xml files.
|
308
297
|
test_files:
|
309
298
|
- spec/builder_spec.rb
|