oddb2xml 2.7.1 → 2.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.standard.yml +2 -0
- data/Gemfile +3 -3
- data/History.txt +8 -0
- data/README.md +1 -1
- data/Rakefile +24 -23
- data/bin/check_artikelstamm +11 -11
- data/bin/compare_v5 +23 -23
- data/bin/oddb2xml +14 -13
- data/lib/oddb2xml.rb +1 -1
- data/lib/oddb2xml/builder.rb +1070 -1038
- data/lib/oddb2xml/calc.rb +232 -233
- data/lib/oddb2xml/chapter_70_hack.rb +38 -32
- data/lib/oddb2xml/cli.rb +252 -236
- data/lib/oddb2xml/compare.rb +70 -59
- data/lib/oddb2xml/compositions_syntax.rb +448 -430
- data/lib/oddb2xml/compressor.rb +20 -20
- data/lib/oddb2xml/downloader.rb +153 -127
- data/lib/oddb2xml/extractor.rb +302 -289
- data/lib/oddb2xml/options.rb +34 -35
- data/lib/oddb2xml/parslet_compositions.rb +263 -269
- data/lib/oddb2xml/semantic_check.rb +39 -33
- data/lib/oddb2xml/util.rb +163 -163
- data/lib/oddb2xml/version.rb +1 -1
- data/lib/oddb2xml/xml_definitions.rb +32 -33
- data/oddb2xml.gemspec +31 -32
- data/spec/artikelstamm_spec.rb +111 -110
- data/spec/builder_spec.rb +489 -505
- data/spec/calc_spec.rb +552 -593
- data/spec/check_artikelstamm_spec.rb +26 -26
- data/spec/cli_spec.rb +173 -174
- data/spec/compare_spec.rb +9 -11
- data/spec/composition_syntax_spec.rb +390 -409
- data/spec/compressor_spec.rb +48 -48
- data/spec/data/transfer.dat +1 -0
- data/spec/data_helper.rb +47 -49
- data/spec/downloader_spec.rb +247 -260
- data/spec/extractor_spec.rb +171 -159
- data/spec/galenic_spec.rb +233 -256
- data/spec/options_spec.rb +116 -119
- data/spec/parslet_spec.rb +833 -861
- data/spec/spec_helper.rb +154 -153
- data/test_options.rb +39 -42
- data/tools/win_fetch_cacerts.rb +2 -3
- metadata +19 -3
data/spec/galenic_spec.rb
CHANGED
@@ -1,322 +1,299 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'spec_helper'
|
1
|
+
require "spec_helper"
|
4
2
|
require "#{Dir.pwd}/lib/oddb2xml/parslet_compositions"
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
3
|
+
require "parslet/rig/rspec"
|
4
|
+
require "parslet/convenience"
|
5
|
+
require "csv"
|
8
6
|
|
9
|
-
|
7
|
+
RUN_ALL_PARSING_EXAMPLES = false # RUN_ALL_PARSING_EXAMPLES /travis|localhost/i.match(hostname) != nil # takes about one minute to run
|
10
8
|
|
11
9
|
galenic_tests = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
TISSEEL
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
Axotide 0,
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
Rebif Neue Formulierung
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
Nutriflex
|
104
|
-
Nutriflex Lipid
|
105
|
-
Nutriflex Lipid
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
)
|
117
|
-
|
10
|
+
"1001 Blattgrün Dragées" => {prepation_name: "1001 Blattgrün ", galenic_form: "Dragées"},
|
11
|
+
"3TC 150 mg, Filmtabletten" => {prepation_name: "3TC 150 mg", galenic_form: "Filmtabletten"},
|
12
|
+
"Acetocaustin, Lösung" => {prepation_name: "Acetocaustin", galenic_form: "Lösung"},
|
13
|
+
"Alustal 3-Bäume, Injektionssuspension" => {prepation_name: "Alustal 3-Bäume", galenic_form: "Injektionssuspension"},
|
14
|
+
"Alustal Bäume, Injektionssuspension" => {prepation_name: "Alustal Bäume", galenic_form: "Injektionssuspension"},
|
15
|
+
"Amoxicillin Streuli, Granulat zur Herstellung einer Suspension" => {prepation_name: "Amoxicillin Streuli", galenic_form: "Granulat zur Herstellung einer Suspension"},
|
16
|
+
"Arkocaps Passiflore/Passionsblume, 300 mg, capsules" => {prepation_name: "Arkocaps Passiflore/Passionsblume", galenic_form: "capsules"},
|
17
|
+
"Atenativ, Antithrombin III 500 I.E., Injektionspräparat" => {prepation_name: "Atenativ", galenic_form: "Injektionspräparat"},
|
18
|
+
"Atorvastatin Helvepharm, 10 mg Filmtabletten" => {prepation_name: "Atorvastatin Helvepharm", galenic_form: "Filmtabletten"},
|
19
|
+
"Atorvastax-Drossapharm 20 mg" => {prepation_name: "Atorvastax-Drossapharm 20 mg", galenic_form: nil},
|
20
|
+
"Co-Losartan Spirig HC 50/12,5 mg" => {prepation_name: "Co-Losartan Spirig HC 50/12,5 mg", galenic_form: nil},
|
21
|
+
"Dicloabak 0,1% Augentropfen" => {prepation_name: "Dicloabak 0,1% ", galenic_form: "Augentropfen"},
|
22
|
+
"Kaliumchlorid 14,9 % B. Braun, Zusatzampullen" => {prepation_name: "Kaliumchlorid 14,9 % B. Braun", galenic_form: "Zusatzampullen"},
|
23
|
+
"Methrexx 7.5 mg / 0.75 ml,Injektionslösung in Fertigspritzen" => {prepation_name: "Methrexx 7.5 mg / 0.75 ml", galenic_form: "Injektionslösung in Fertigspritzen"},
|
24
|
+
"Nitroderm TTS 10" => {prepation_name: "Nitroderm TTS 10", galenic_form: nil},
|
25
|
+
"Ondansetron Labatec, 8mg/4ml, concentré pour perfusion" => {prepation_name: "Ondansetron Labatec", galenic_form: "concentré pour perfusion"},
|
26
|
+
"Paronex 20, Filmtabletten" => {prepation_name: "Paronex 20", galenic_form: "Filmtabletten"},
|
27
|
+
"Physioneal 35 Clear-Flex 3,86 % Peritonealdialyselösung" => {prepation_name: "Physioneal 35 Clear-Flex 3,86 % ", galenic_form: "Peritonealdialyselösung"},
|
28
|
+
"Phytopharma foie et bile capsules/Leber-Galle Kapseln" => {prepation_name: "Phytopharma foie et bile capsules", galenic_form: "Leber-Galle Kapseln"},
|
29
|
+
"Plak-out Spray 0,1 %" => {prepation_name: "Plak-out Spray 0,1 %", galenic_form: nil},
|
30
|
+
"Sandostatin 0,2 mg/mL, Injektionslösung" => {prepation_name: "Sandostatin 0,2 mg/mL", galenic_form: "Injektionslösung"},
|
31
|
+
"Sulfure de Rhénium (186Re)-RE-186-MM-1 Cis bio International, Suspension" => {prepation_name: "Sulfure de Rhénium (186Re)-RE-186-MM-1 Cis bio International", galenic_form: "Suspension"},
|
32
|
+
"Tramal 100, Injektionslösung (i.m., i.v.)" => {prepation_name: "Tramal 100", galenic_form: "Injektionslösung (i.m., i.v.)"},
|
33
|
+
"Uman Albumin Kedrion 20%" => {prepation_name: "Uman Albumin Kedrion 20%", galenic_form: nil}
|
34
|
+
}
|
35
|
+
x = %(
|
36
|
+
Testlösung zur Allergiediagnose Teomed Kaninchen (Fell) Lösung
|
37
|
+
Testlösung zur Allergiediagnose Teomed Hund (Haare) Lösung
|
38
|
+
Pandemrix (Pandemic Influenza Vaccine H1N1)
|
39
|
+
Phytopharma dragées pour la détente et le sommeil / Entspannungs- und Schlafdragées
|
40
|
+
Phytopharma dragées pour le coeur / Herz Dragées
|
41
|
+
Best Friend Katzenhalsband / Katzenhalsband Reflex ad us.vet.
|
42
|
+
Amlodipin Helvepharm 10 Tabletten
|
43
|
+
Salbu Orion Easyhaler 100 ug Inhalationspulver
|
44
|
+
TISSEEL 10 ml 2 Fertigspritzen
|
45
|
+
TISSEEL 2 ml 2 Fertigspritzen
|
46
|
+
TISSEEL 4 ml 2 Fertigspritzen
|
47
|
+
Norprolac Starter-pack 25 ug + 50 ug, Tabletten
|
48
|
+
Phostal 5-Gräser 4-Getreidemischung 10IR, Injektionssuspension
|
49
|
+
Alustal 5-Gräser 4-Getreidemischung Kombipackung, Injektionssuspension
|
50
|
+
Staloral Beifuss 5-Gräser 100IR, Injektionssuspension
|
51
|
+
Phostal Beifuss 5-Gräser 10IR, Injektionssuspension
|
52
|
+
Alustal Beifuss 5-Gräser 10IR, Injektionssuspension
|
53
|
+
Seebri Breezhaler 50 Mikrogramm, Pulver zur Inhalation, Hartkapseln
|
54
|
+
Nplate 500 mcg Pulver und Lösungsmittel zur Herstellung einer Injektionslösung
|
55
|
+
Bayvantage ad us.vet. 80 für Katzen, Lösung
|
56
|
+
Ondansetron-Teva 8mg, Filmtabletten
|
57
|
+
Soluprick SQ 3-Bäumemischung (Alnus glutinosa Betula verrucosa, Corylus avellana), Lösung
|
58
|
+
BicaVera 2,3% Glucose Calcium, Peritonealdialyselösung
|
59
|
+
Telfastin Allergo 120 comprimés pelliculés 120 mg
|
60
|
+
Multaq comprimés pelliculés de 400 mg de dronédarone
|
61
|
+
KCL 7,45% Sintetica concentrato per soluzione per infusione (fiala di 20 ml)
|
62
|
+
Alk7 Frühblühermischung Depotsuspension zur s.c. Injektion "1 Flasche B"
|
63
|
+
Alk7 Gräsermischung und Roggen Depotsuspension zur s.c. Injektion "1 Flasche B"
|
64
|
+
Relenza 5 mg Disk (Pulverinhalation)
|
65
|
+
Ventolin Dosier-Aerosol (FCKW-frei)
|
66
|
+
Axotide 0,125 mg Dosier-Aerosol (FCKW-frei)
|
67
|
+
Axotide 0,250 mg Dosier-Aerosol (FCKW-frei)
|
68
|
+
Axotide 0,050 mg Dosier-Aerosol (FCKW-frei)
|
69
|
+
Serevent Dosier-Aerosol FCKW-frei
|
70
|
+
Bronchialpastillen Dr. Welti
|
71
|
+
Conoxia Druckgasflasche 300 bar
|
72
|
+
Staloral Pollen 3-Bäume Esche 100IR, Lösung zur sublingualen Anwendung
|
73
|
+
Staloral Pollen Birke Esche 100IR, Lösung zur sublingualen Anwendung
|
74
|
+
Phostal Birke Esche 10IR, Injektionssuspension
|
75
|
+
Alustal Birke Esche 10IR, Injektionssuspension
|
76
|
+
Alustal 3-Bäume Esche Kombipackung , Injektionssuspension
|
77
|
+
Phostal 3-Bäume Esche Kombipackung, Injektionssuspension
|
78
|
+
Fisherman's Friend Eucalyptus-Menthol, sans sucre, avec sorbitol, nouvelle formule, pastilles
|
79
|
+
Victoza 6 mg/ml Fertigpen (Triple-Dose)
|
80
|
+
Fluimucil Erkältungshusten Fertigsirup mit Himbeergeschmack
|
81
|
+
Rebif Neue Formulierung 22 Fertigspritzen, Injektionslösung
|
82
|
+
Rebif Neue Formulierung 44 Fertigspritzen, Injektionslösung
|
83
|
+
Rebif Neue Formulierung 8.8 Fertigspritzen, Injektionslösung
|
84
|
+
Bonherba rocks Kräuterzucker, Kräuterbonbon 2,7 g
|
85
|
+
Ricola Kräuter, Kräuterbonbons ohne Zucker, 2,5 g
|
86
|
+
Testlösung zur Allergiediagnose Teomed Ei ganz, Lösung
|
87
|
+
Helena's Fenchelfruchttee ganze Droge
|
88
|
+
Intron A 10 Mio. I.E./1 mL gebrauchsfertige, HSA-freie Injektionslösung
|
89
|
+
Picato Gel 500 mcg/g
|
90
|
+
Duodopa Gel zur intestinalen Anwendung
|
91
|
+
Weleda Arnica-Gel Gel, anthroposophisches Arzneimittel
|
92
|
+
Burgerstein Vitamin E-Kapseln 400 I.E.
|
93
|
+
Solmucol 10 % local i.v., i.m., soluzione iniettabile
|
94
|
+
Synacthen (i.m. i.v.), Injektionslösung
|
95
|
+
Nutriflex Lipid plus ohne Elektrolyte Infusionsemulsion 1250ml
|
96
|
+
Nutriflex Omega plus Infusionsemulsion 1875 ml
|
97
|
+
SmofKabiven Infusionsemulsion 1970 ml
|
98
|
+
SmofKabiven EF Infusionsemulsion 1970 ml
|
99
|
+
Nutriflex Omega special Infusionsemulsion 2500 ml
|
100
|
+
Nutriflex Lipid special ohne Elektrolyte Infusionsemulsion 2500ml
|
101
|
+
Nutriflex Lipid peri Infusionsemulsion, 1250ml
|
102
|
+
Nutriflex Lipid plus Infusionsemulsion, 1250ml
|
103
|
+
Nutriflex Lipid special Infusionsemulsion, 1250ml
|
104
|
+
Dexdor Infusionskonzentrat 1000ug/10ml
|
105
|
+
Peditrace Infusionskonzentrat, Zusatzampulle
|
106
|
+
M Classic Eucalyptus Gummipastillen zuckerfrei
|
107
|
+
M Classic Halsbonbons zuckerfrei
|
108
|
+
Salbisan Halspastillen zuckerfrei
|
109
|
+
Madopar LIQ 125 Tabletten zur Herstellung einer Suspension zum Einnehmen
|
110
|
+
Anginazol forte tablettes à sucer
|
111
|
+
Tisane provençale No 1 tisane laxative, plantes coupées
|
112
|
+
)
|
113
|
+
puts "Have #{x.split("\n").size} more examples toDO"
|
118
114
|
describe ParseGalenicForm do
|
119
115
|
context "parse_column_c should work" do
|
120
|
-
name, gal_form =
|
116
|
+
name, gal_form = ParseGalenicForm.from_string(galenic_tests.first.first)
|
121
117
|
specify { expect(name).to eq galenic_tests.first.last[:prepation_name].strip }
|
122
118
|
specify { expect(gal_form).to eq galenic_tests.first.last[:galenic_form] }
|
123
119
|
end
|
124
120
|
|
125
|
-
galenic_tests.each{
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
end
|
121
|
+
galenic_tests.each { |string, expected|
|
122
|
+
context "should handle #{string}" do
|
123
|
+
name, form = ParseGalenicForm.from_string(string)
|
124
|
+
specify { expect(name).to eq expected[:prepation_name].strip }
|
125
|
+
specify { expect(form).to eq expected[:galenic_form] }
|
126
|
+
end
|
132
127
|
}
|
133
128
|
|
134
|
-
{
|
135
|
-
{
|
136
|
-
}
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
specify { expect(form).to eq expected[:galenic_form] }
|
142
|
-
end
|
129
|
+
{"Phytopharma dragées pour le coeur / Herz Dragées" =>
|
130
|
+
{prepation_name: "Phytopharma dragées pour le coeur", galenic_form: "Herz Dragées"}}.each { |string, expected|
|
131
|
+
context "should handle #{string}" do
|
132
|
+
name, form = ParseGalenicForm.from_string(string)
|
133
|
+
specify { expect(name).to eq expected[:prepation_name].strip }
|
134
|
+
specify { expect(form).to eq expected[:galenic_form] }
|
135
|
+
end
|
143
136
|
}
|
144
137
|
end
|
145
138
|
|
146
139
|
def test_one_string(parser, string, expected)
|
147
140
|
res1 = parser.parse_with_debug(string)
|
148
|
-
res1
|
149
|
-
res1
|
150
|
-
stringified = res1 ? res1.to_s.gsub(/@\d+/,
|
151
|
-
if res1
|
152
|
-
puts "Failed testing: #{string}"
|
141
|
+
res1&.delete(:qty)
|
142
|
+
res1&.delete(:unit)
|
143
|
+
stringified = res1 ? res1.to_s.gsub(/@\d+/, "") : nil
|
144
|
+
if res1.nil? || !stringified.eql?(expected.to_s)
|
145
|
+
puts "Failed testing: #{string}"
|
153
146
|
end
|
154
147
|
expect(stringified).to eq expected.to_s if expected
|
155
148
|
end
|
156
149
|
|
157
|
-
|
150
|
+
describe GalenicFormParser do
|
158
151
|
let(:parser) { GalenicFormParser.new }
|
159
152
|
context "identifier parsing" do
|
160
153
|
let(:galenic_parser) { parser.galenic }
|
161
154
|
let(:qty_unit_parser) { parser.qty_unit }
|
162
155
|
|
163
|
-
galenic_tests.each{
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
end
|
156
|
+
galenic_tests.each { |string, expected|
|
157
|
+
puts string
|
158
|
+
it "parses galenic #{string}" do
|
159
|
+
test_one_string(galenic_parser, string, expected)
|
160
|
+
end
|
169
161
|
}
|
170
162
|
end
|
171
|
-
end
|
163
|
+
end
|
172
164
|
|
173
|
-
if
|
165
|
+
if RUN_ALL_PARSING_EXAMPLES then describe GalenicFormParser do
|
174
166
|
context "should parse all lines in #{File.basename(AllColumn_C_Lines)}" do
|
175
167
|
let(:galenic_parser) { GalenicFormParser.new.galenic }
|
176
168
|
ausgabe = {}
|
177
169
|
count = 0
|
178
170
|
galenic_parser = GalenicFormParser.new.galenic
|
179
|
-
IO.readlines(AllColumn_C_Lines).each {
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
if res1
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
# binding.pry
|
192
|
-
end
|
171
|
+
IO.readlines(AllColumn_C_Lines).each { |string|
|
172
|
+
count += 1
|
173
|
+
# break if count > 100
|
174
|
+
puts string.strip
|
175
|
+
it "parses galenic #{string}" do
|
176
|
+
res1 = galenic_parser.parse_with_debug(string.strip)
|
177
|
+
if res1
|
178
|
+
ausgabe[res1[:prepation_name].to_s] = res1[:galenic_form] if res1
|
179
|
+
else
|
180
|
+
puts "Failed testing: #{string}"
|
181
|
+
pp res1
|
182
|
+
# binding.pry
|
193
183
|
end
|
184
|
+
end
|
194
185
|
}
|
195
|
-
csv_name = File.join(Oddb2xml::
|
196
|
-
at_exit do
|
186
|
+
csv_name = File.join(Oddb2xml::WORK_DIR, "galenic.csv")
|
187
|
+
at_exit do
|
188
|
+
CSV.open(csv_name, "w+", col_sep: ";") do |csv|
|
197
189
|
ausgabe.each do |key, value|
|
198
|
-
csv <<
|
190
|
+
csv << [key, value]
|
199
191
|
end
|
200
192
|
end
|
201
193
|
end
|
202
194
|
end
|
203
|
-
end
|
195
|
+
end
|
196
|
+
end
|
204
197
|
|
205
198
|
describe GalenicFormParser do
|
206
199
|
let(:parser) { GalenicFormParser.new }
|
207
200
|
context "gal_form parsing" do
|
208
201
|
let(:gal_form_parser) { parser.gal_form }
|
209
202
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
expect(gal_form_parser).to_not parse(id)
|
227
|
-
end
|
228
|
-
}
|
203
|
+
[
|
204
|
+
", Lösung",
|
205
|
+
", 100mg Lösung",
|
206
|
+
"Lösung",
|
207
|
+
"100mg Lösung",
|
208
|
+
"Injektionslösung (i.m., i.v.)"
|
209
|
+
].each { |id|
|
210
|
+
it "parses gal_form #{id}" do
|
211
|
+
expect(gal_form_parser).to parse(id)
|
212
|
+
end
|
213
|
+
}
|
214
|
+
[].each { |id|
|
215
|
+
it "parses gal_form #{id}" do
|
216
|
+
expect(gal_form_parser).to_not parse(id)
|
217
|
+
end
|
218
|
+
}
|
229
219
|
end
|
230
220
|
context "name_gal_form parsing" do
|
231
221
|
let(:name_gal_form_parser) { parser.name_gal_form }
|
232
222
|
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
expect(name_gal_form_parser).to_not parse(id)
|
248
|
-
end
|
249
|
-
}
|
223
|
+
[
|
224
|
+
"Dicloabak 0,1% Augentropfen",
|
225
|
+
"35 Clear-Flex 3,86 % Peritonealdialyselösung",
|
226
|
+
"Esmeron 100mg/10ml Injektionslösung"
|
227
|
+
].each { |id|
|
228
|
+
it "parses name_gal_form #{id}" do
|
229
|
+
expect(name_gal_form_parser).to parse(id)
|
230
|
+
end
|
231
|
+
}
|
232
|
+
[].each { |id|
|
233
|
+
it "parses name_gal_form #{id}" do
|
234
|
+
expect(name_gal_form_parser).to_not parse(id)
|
235
|
+
end
|
236
|
+
}
|
250
237
|
end
|
251
238
|
|
252
239
|
context "prepation_name parsing" do
|
253
240
|
let(:prepation_name_parser) { parser.prepation_name }
|
254
241
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
expect(prepation_name_parser).to_not parse(id)
|
271
|
-
end
|
272
|
-
}
|
242
|
+
[
|
243
|
+
"name",
|
244
|
+
"name more",
|
245
|
+
"name more and more",
|
246
|
+
"Dicloabak 0,1% Augentropfen"
|
247
|
+
].each { |id|
|
248
|
+
it "parses prepation_name #{id}" do
|
249
|
+
expect(prepation_name_parser).to parse(id)
|
250
|
+
end
|
251
|
+
}
|
252
|
+
[].each { |id|
|
253
|
+
it "parses prepation_name #{id}" do
|
254
|
+
expect(prepation_name_parser).to_not parse(id)
|
255
|
+
end
|
256
|
+
}
|
273
257
|
end
|
274
258
|
context "standard_galenic parsing" do
|
275
259
|
let(:standard_galenic_parser) { parser.standard_galenic }
|
276
260
|
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
end
|
295
|
-
}
|
261
|
+
[
|
262
|
+
"Antithrombin III 500 I.E., Injektionspräparat",
|
263
|
+
"Ondansetron Labatec, 8mg/4ml, concentré pour perfusion"
|
264
|
+
].each { |id|
|
265
|
+
it "parses standard_galenic #{id}" do
|
266
|
+
expect(standard_galenic_parser).to parse(id)
|
267
|
+
end
|
268
|
+
}
|
269
|
+
[
|
270
|
+
"Dicloabak 0,1% Augentropfen",
|
271
|
+
"35 Clear-Flex 3,86 % Peritonealdialyselösung",
|
272
|
+
"Esmeron 100mg/10ml Injektionslösung"
|
273
|
+
].each { |id|
|
274
|
+
it "parses standard_galenic #{id}" do
|
275
|
+
expect(standard_galenic_parser).to_not parse(id)
|
276
|
+
end
|
277
|
+
}
|
296
278
|
end
|
297
279
|
context "dose_with_pro parsing" do
|
298
280
|
let(:dose_with_pro_parser) { parser.dose_with_pro }
|
299
281
|
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
end
|
317
|
-
}
|
282
|
+
[
|
283
|
+
"100mg/10ml",
|
284
|
+
"8mg/4ml"
|
285
|
+
].each { |id|
|
286
|
+
it "parses dose_with_pro #{id}" do
|
287
|
+
expect(dose_with_pro_parser).to parse(id)
|
288
|
+
end
|
289
|
+
}
|
290
|
+
[
|
291
|
+
"100mgx10ml",
|
292
|
+
"8mgX4ml"
|
293
|
+
].each { |id|
|
294
|
+
it "parses dose_with_pro #{id}" do
|
295
|
+
expect(dose_with_pro_parser).to_not parse(id)
|
296
|
+
end
|
297
|
+
}
|
318
298
|
end
|
319
|
-
|
320
|
-
|
321
299
|
end
|
322
|
-
|