oddb.org 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +11 -1
- data/Manifest.txt +20 -18
- data/Rakefile +2 -1
- data/ext/analysisparse/test/test_pagehandler.rb +9 -9
- data/ext/chapterparse/src/{parser.rb → chaptparser.rb} +0 -0
- data/ext/chapterparse/test/test_integrate.rb +22 -30
- data/ext/chapterparse/test/test_parser.rb +1 -1
- data/ext/chapterparse/test/test_writer.rb +1 -1
- data/ext/comarketing/test/test_pdf_parser.rb +5 -3
- data/ext/docdata/src/{parser.rb → docparser.rb} +0 -0
- data/ext/docdata/test/{test_parser.rb → parser_test.rb} +0 -0
- data/ext/export/test/test_csv_exporter.rb +3 -3
- data/ext/export/test/test_oddbdat.rb +3 -1
- data/ext/fiparse/src/fachinfo_doc.rb +13 -1
- data/ext/fiparse/src/fachinfo_writer.rb +1 -1
- data/ext/fiparse/src/{writer.rb → fiwriter.rb} +0 -0
- data/ext/fiparse/test/data/doc/Calcitriol_f.doc +0 -0
- data/ext/fiparse/test/data/doc/Lapidar_f.doc +0 -0
- data/ext/fiparse/test/data/doc/Tendro.doc +0 -0
- data/ext/fiparse/test/data/doc/Yakona_f.doc +0 -0
- data/ext/fiparse/test/{test_fachinfo_pdf.rb → fachinfo_pdf_test.rb} +0 -0
- data/ext/fiparse/test/{test_fiparse.rb → fiparse_test.rb} +0 -0
- data/ext/fiparse/test/{test_indications.rb → indications_test.rb} +0 -0
- data/ext/fiparse/test/{test_minifi.rb → minifi_test.rb} +0 -0
- data/ext/fiparse/test/test_fachinfo_doc_parser.rb +560 -628
- data/ext/fiparse/test/test_fachinfo_hpricot.rb +9 -9
- data/ext/fiparse/test/test_patinfo_hpricot.rb +2 -1
- data/ext/fipdf/test/{test_chapter_wrapper.rb → chapter_wrapper_test.rb} +0 -0
- data/ext/fipdf/test/{test_fachinfo_wrapper.rb → fachinfo_wrapper_test.rb} +0 -0
- data/ext/fipdf/test/{test_fachinfo_writer.rb → fachinfo_writer_test.rb} +0 -0
- data/ext/fipdf/test/{test_format.rb → format_test.rb} +0 -0
- data/ext/fipdf/test/{test_paragraph_wrapper.rb → paragraph_wrapper_test.rb} +0 -0
- data/ext/fipdf/test/{test_rules.rb → rules_test.rb} +0 -0
- data/ext/fipdf/test/{test_section_wrapper.rb → section_wrapper_test.rb} +0 -0
- data/ext/fipdf/test/{test_substance_index.rb → substance_index_test.rb} +0 -0
- data/ext/meddata/src/meddata.rb +1 -1
- data/ext/meddata/src/{parser.rb → meddparser.rb} +0 -0
- data/ext/meddata/test/{test_session.rb → session_test.rb} +2 -2
- data/ext/meddata/test/test_meddata.rb +9 -5
- data/ext/meddata/test/test_result.rb +2 -4
- data/ext/suite.rb +28 -0
- data/ext/swissreg/test/data/pemetrexed_detail.html +484 -0
- data/ext/swissreg/test/test_writer.rb +0 -19
- data/lib/oddb.org.rb +1 -1
- data/src/state/drugs/fachinfo.rb +1 -1
- data/test/suite.rb +2 -1
- metadata +24 -22
File without changes
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -25,198 +25,186 @@ module ODDB
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
29
28
|
class TestFachinfoDocParser < Test::Unit::TestCase
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
2268,
|
185
|
-
4253,
|
186
|
-
].collect { |pos|
|
187
|
-
td = StubTabDescriptor.new
|
188
|
-
td.position = pos
|
189
|
-
td
|
190
|
-
}
|
191
|
-
str = "Kapseln\t\t1 Kapsel (50 mg)\tbis zu 8 Kapseln"
|
192
|
-
expected = "Kapseln 1 Kapsel (50 mg) bis zu 8 Kapseln"
|
193
|
-
assert_equal(expected, @text_handler.expand_tabs(str))
|
194
|
-
end
|
29
|
+
class StubTabDescriptor
|
30
|
+
attr_accessor :position, :align
|
31
|
+
end
|
32
|
+
def setup
|
33
|
+
@filename = File.expand_path('data/doc/fi_df_t2.doc',
|
34
|
+
File.dirname(__FILE__))
|
35
|
+
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
36
|
+
@parser = Rwv2.create_parser(@filename)
|
37
|
+
@parser.set_text_handler(@text_handler)
|
38
|
+
@parser.parse
|
39
|
+
end
|
40
|
+
def test_name1
|
41
|
+
assert_equal(2, @text_handler.writers.size)
|
42
|
+
writer = @text_handler.writers.first
|
43
|
+
assert_match(/Tramadol Helvepharm.* Kapseln\/Tropfen\/Suppositorien/, writer.name)
|
44
|
+
writer = @text_handler.writers.last
|
45
|
+
assert_match(/Tramadol Helvepharm.* Capsules\/Gouttes\/Suppositoires/, writer.name)
|
46
|
+
end
|
47
|
+
def test_company1
|
48
|
+
writer = @text_handler.writers.first
|
49
|
+
chapter = writer.company
|
50
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
51
|
+
assert_equal('HELVEPHARM', chapter.heading)
|
52
|
+
assert_equal(0, chapter.sections.size)
|
53
|
+
writer = @text_handler.writers.last
|
54
|
+
chapter = writer.company
|
55
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
56
|
+
assert_equal('HELVEPHARM', chapter.heading)
|
57
|
+
assert_equal(0, chapter.sections.size)
|
58
|
+
end
|
59
|
+
def test_galenic_form_de1
|
60
|
+
writer = @text_handler.writers.first
|
61
|
+
chapter = writer.galenic_form
|
62
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
63
|
+
assert_equal('', chapter.heading)
|
64
|
+
assert_equal(1, chapter.sections.size)
|
65
|
+
section = chapter.sections.first
|
66
|
+
assert_instance_of(ODDB::Text::Section, section)
|
67
|
+
assert_equal("Zentralwirksames Analgetikum\n", section.subheading)
|
68
|
+
assert_equal(0, section.paragraphs.size)
|
69
|
+
end
|
70
|
+
def test_galenic_form_fr1
|
71
|
+
writer = @text_handler.writers.last
|
72
|
+
chapter = writer.galenic_form
|
73
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
74
|
+
assert_equal('', chapter.heading)
|
75
|
+
assert_equal(1, chapter.sections.size)
|
76
|
+
section = chapter.sections.first
|
77
|
+
assert_instance_of(ODDB::Text::Section, section)
|
78
|
+
assert_match(/Analg.+sique d\'action centrale/, section.subheading)
|
79
|
+
assert_equal(0, section.paragraphs.size)
|
80
|
+
end
|
81
|
+
def test_composition1
|
82
|
+
writer = @text_handler.writers.first
|
83
|
+
chapter = writer.composition
|
84
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
85
|
+
assert_equal('Zusammensetzung', chapter.heading)
|
86
|
+
assert_equal(10, chapter.sections.size)
|
87
|
+
section = chapter.sections.first
|
88
|
+
assert_instance_of(ODDB::Text::Section, section)
|
89
|
+
assert_equal('Wirkstoff:', section.subheading)
|
90
|
+
assert_equal(1, section.paragraphs.size)
|
91
|
+
paragraph = section.paragraphs.first
|
92
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
93
|
+
assert_equal('Tramadolhydrochlorid.',paragraph.text)
|
94
|
+
end
|
95
|
+
def test_effects1
|
96
|
+
writer = @text_handler.writers.first
|
97
|
+
chapter = writer.effects
|
98
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
99
|
+
assert_equal('Eigenschaften/Wirkungen', chapter.heading)
|
100
|
+
assert_equal(1, chapter.sections.size)
|
101
|
+
section = chapter.sections.first
|
102
|
+
assert_instance_of(ODDB::Text::Section, section)
|
103
|
+
assert_equal('', section.subheading)
|
104
|
+
assert_equal(2, section.paragraphs.size)
|
105
|
+
paragraph = section.paragraphs.first
|
106
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
107
|
+
assert_equal('Tramadol ist ein Cyclohexanol-Derivat mit opiatagonistischen Eigenschaften. Die Wirkung von Tramadol beruht teilweise auf adrenerge Effekte der Muttersubstanz. Sein aktiver Hauptmetabolit O-Desmethyl-Tramadol ist ein nicht selektiver, reiner Agonist der Opiatrezeptoren, ohne Bevorzugung bestimmter Populationen.',paragraph.text)
|
108
|
+
end
|
109
|
+
def test_kinetic1
|
110
|
+
writer = @text_handler.writers.first
|
111
|
+
chapter = writer.kinetic
|
112
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
113
|
+
assert_equal('Pharmakokinetik', chapter.heading)
|
114
|
+
assert_equal(6, chapter.sections.size)
|
115
|
+
end
|
116
|
+
def test_indications1
|
117
|
+
writer = @text_handler.writers.first
|
118
|
+
chapter = writer.indications
|
119
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
120
|
+
assert_match(/Indikationen\/Anwendungsm.*glichkeiten/, chapter.heading)
|
121
|
+
assert_equal(1, chapter.sections.size)
|
122
|
+
end
|
123
|
+
def test_usage1
|
124
|
+
writer = @text_handler.writers.first
|
125
|
+
chapter = writer.usage
|
126
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
127
|
+
assert_equal('Dosierung/Anwendung', chapter.heading)
|
128
|
+
assert_equal(10, chapter.sections.size)
|
129
|
+
section = chapter.sections.first
|
130
|
+
assert_equal(5, section.paragraphs.size)
|
131
|
+
paragraph = section.paragraphs.at(1)
|
132
|
+
expected = /\-+\nApplikations\- Einzeldosis Tagesdosis\nform\n\-+\nKapseln 1 Kapsel \(50 mg\) bis zu 8 Kapseln\nTropfen 20 Tropfen \(50 mg\) bis zu\n.* 20 Tropfen\nSuppositorien 1 Suppositorium bis zu\n +\(100 mg\) 4 Suppositorien \n\-+\n/
|
133
|
+
assert_equal(true, paragraph.preformatted?)
|
134
|
+
assert_match(expected, paragraph.text)
|
135
|
+
end
|
136
|
+
def test_expand_tabs1a
|
137
|
+
str = '12345 67890'
|
138
|
+
assert_equal(str, @text_handler.expand_tabs(str))
|
139
|
+
@text_handler.tabs = [
|
140
|
+
0,
|
141
|
+
959,
|
142
|
+
4795,
|
143
|
+
5754,
|
144
|
+
6713,
|
145
|
+
7672,
|
146
|
+
8631,
|
147
|
+
1701,
|
148
|
+
2268,
|
149
|
+
4253,
|
150
|
+
].collect { |pos|
|
151
|
+
td = StubTabDescriptor.new
|
152
|
+
td.position = pos
|
153
|
+
td
|
154
|
+
}
|
155
|
+
str = "Applikations-\tEinzeldosis"
|
156
|
+
expected = "Applikations- Einzeldosis"
|
157
|
+
assert_equal(expected, @text_handler.expand_tabs(str))
|
158
|
+
str = "Applikations-\tEinzeldosis\tTagesdosis"
|
159
|
+
expected = "Applikations- Einzeldosis Tagesdosis"
|
160
|
+
assert_equal(expected, @text_handler.expand_tabs(str))
|
161
|
+
end
|
162
|
+
def test_expand_tabs1b
|
163
|
+
@text_handler.tabs = [
|
164
|
+
0,
|
165
|
+
959,
|
166
|
+
4795,
|
167
|
+
5754,
|
168
|
+
6713,
|
169
|
+
7672,
|
170
|
+
8631,
|
171
|
+
1701,
|
172
|
+
2268,
|
173
|
+
4253,
|
174
|
+
].collect { |pos|
|
175
|
+
td = StubTabDescriptor.new
|
176
|
+
td.position = pos
|
177
|
+
td
|
178
|
+
}
|
179
|
+
str = "Kapseln\t\t1 Kapsel (50 mg)\tbis zu 8 Kapseln"
|
180
|
+
expected = "Kapseln 1 Kapsel (50 mg) bis zu 8 Kapseln"
|
181
|
+
assert_equal(expected, @text_handler.expand_tabs(str))
|
182
|
+
end
|
195
183
|
end
|
196
184
|
class TestFachinfoDocParser2 < Test::Unit::TestCase
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
185
|
+
class StubTabDescriptor
|
186
|
+
attr_accessor :position
|
187
|
+
end
|
188
|
+
def setup
|
189
|
+
@filename = File.expand_path('data/doc/fi_df_am.doc',
|
190
|
+
File.dirname(__FILE__))
|
191
|
+
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
192
|
+
@parser = Rwv2.create_parser(@filename)
|
193
|
+
@parser.set_text_handler(@text_handler)
|
194
|
+
@parser.parse
|
195
|
+
end
|
196
|
+
def test_effects2
|
197
|
+
writer = @text_handler.writers.first
|
198
|
+
chapter = writer.effects
|
199
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
200
|
+
assert_equal('Eigenschaften/Wirkungen', chapter.heading)
|
201
|
+
assert_equal(3, chapter.sections.size)
|
202
|
+
section = chapter.sections.first
|
203
|
+
assert_instance_of(ODDB::Text::Section, section)
|
204
|
+
assert_equal('', section.subheading)
|
205
|
+
assert_equal(6, section.paragraphs.size)
|
206
|
+
paragraph = section.paragraphs.at(2)
|
207
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
220
208
|
expected = <<-EOS
|
221
209
|
------------------------------------------------------------------------
|
222
210
|
Disktest (10 �g)
|
@@ -246,265 +234,203 @@ Bakterien < 8 > 32
|
|
246
234
|
Haemophilus < 1 > 4
|
247
235
|
------------------------------------------------------------------------
|
248
236
|
EOS
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
puts ">#{expected[0..idx.next]}<"
|
254
|
-
puts ">#{txt[0..idx.next]}<"
|
255
|
-
break
|
256
|
-
end
|
257
|
-
}
|
258
|
-
assert_equal(expected.strip, txt)
|
259
|
-
end
|
260
|
-
end
|
261
|
-
class TestFachinfoDocParser3 < Test::Unit::TestCase
|
262
|
-
def setup
|
263
|
-
@filename = File.expand_path('data/doc/fi_df_a2.doc',
|
264
|
-
File.dirname(__FILE__))
|
265
|
-
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
266
|
-
@parser = Rwv2.create_parser(@filename)
|
267
|
-
@parser.set_text_handler(@text_handler)
|
268
|
-
@parser.parse
|
269
|
-
end
|
270
|
-
def test_usage3
|
271
|
-
writer = @text_handler.writers.first
|
272
|
-
chapter = writer.usage
|
273
|
-
assert_instance_of(ODDB::Text::Chapter, chapter)
|
274
|
-
assert_equal('Dosierung/Anwendung', chapter.heading)
|
275
|
-
assert_equal(11, chapter.sections.size)
|
276
|
-
section = chapter.sections.at(9)
|
277
|
-
assert_instance_of(ODDB::Text::Section, section)
|
278
|
-
assert_equal("Allgemein\n", section.subheading)
|
279
|
-
assert_equal(3, section.paragraphs.size)
|
280
|
-
paragraph = section.paragraphs.at(2)
|
281
|
-
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
282
|
-
expected = <<-EOS
|
283
|
-
-----------------------------------------------------------------
|
284
|
-
Kreatinin-Clearance Erhaltungsdosis
|
285
|
-
(ml/Min.)
|
286
|
-
-----------------------------------------------------------------
|
287
|
-
0 100 mg jeden 3. Tag
|
288
|
-
10 100 mg jeden 2. Tag
|
289
|
-
20 100 mg t�glich
|
290
|
-
40 150 mg t�glich
|
291
|
-
60 200 mg t�glich
|
292
|
-
80 250 mg t�glich
|
293
|
-
-----------------------------------------------------------------
|
294
|
-
EOS
|
295
|
-
assert_equal(expected.strip, paragraph.text)
|
296
|
-
end
|
297
|
-
def test_kinetic3
|
298
|
-
writer = @text_handler.writers.first
|
299
|
-
chapter = writer.kinetic
|
300
|
-
assert_instance_of(ODDB::Text::Chapter, chapter)
|
301
|
-
assert_equal('Pharmakokinetik', chapter.heading)
|
302
|
-
assert_equal(4, chapter.sections.size)
|
303
|
-
section = chapter.sections.first
|
304
|
-
assert_equal("Absorption\n", section.subheading)
|
305
|
-
end
|
237
|
+
txt = paragraph.text
|
238
|
+
expected = /\-+\n +Disktest \(10 .*g\)\n +Durchmesser \(mm\)\n +sensibel +.* +resistent\n\-+\nStaphylokokken +\> 29 +\- +\< 28\nEnterokokken +\> 17 +\- +\< 16\nStreptokokken +\> 30 +22\-29 +\< 21\nListeria mono\-\nCytogenes +\> 20 +\- +\< 19\nGram-negative\nDarmbakterien +\> 17 +14\-16 +\< 13\nHaemophilus +\> 22 +19\-21 +\< 18\n\-+\n +Ver.*nungstest\n +MHK \(mg\/l\)\n +sensibel resistent\n\-+\nStaphylokokken +\< 0,25 +Penicil\-\n +linase\nEnterokokken +\- +\> 16\nStreptokokken +\< 0,12 +\> 4\nListeria monocytogenes +\< 2 +\> 4\nGram\-negative Darm\-\nBakterien +\< 8 +\> 32\nHaemophilus +\< 1 +\> 4\n\-+/
|
239
|
+
assert_match(expected, txt)
|
240
|
+
end
|
306
241
|
end
|
307
242
|
class TestFachinfoDocParser4 < Test::Unit::TestCase
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
assert_instance_of(ODDB::Text::Chapter, chapter)
|
403
|
-
assert_equal('Zulassungsinhaberin', chapter.heading)
|
404
|
-
end
|
243
|
+
def setup
|
244
|
+
@filename = File.expand_path('data/doc/felodil_12_01.doc',
|
245
|
+
File.dirname(__FILE__))
|
246
|
+
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
247
|
+
@parser = Rwv2.create_parser(@filename)
|
248
|
+
@parser.set_text_handler(@text_handler)
|
249
|
+
@parser.parse
|
250
|
+
end
|
251
|
+
def test_name4
|
252
|
+
assert_equal(2, @text_handler.writers.size)
|
253
|
+
writer = @text_handler.writers.first
|
254
|
+
assert_match(/Felodil.* 5\/10\n/, writer.name)
|
255
|
+
writer = @text_handler.writers.last
|
256
|
+
assert_match(/Felodil.* 5\/10\n/, writer.name)
|
257
|
+
end
|
258
|
+
def test_composition4
|
259
|
+
writer = @text_handler.writers.first
|
260
|
+
chapter = writer.composition
|
261
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
262
|
+
assert_equal('Zusammensetzung', chapter.heading)
|
263
|
+
assert_equal(2, chapter.sections.size)
|
264
|
+
section = chapter.sections.first
|
265
|
+
assert_instance_of(ODDB::Text::Section, section)
|
266
|
+
assert_equal('a) Wirkstoff:', section.subheading)
|
267
|
+
assert_equal(1, section.paragraphs.size)
|
268
|
+
paragraph = section.paragraphs.first
|
269
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
270
|
+
assert_equal('Felodipin',paragraph.text)
|
271
|
+
section = chapter.sections.at(1)
|
272
|
+
assert_instance_of(ODDB::Text::Section, section)
|
273
|
+
assert_equal('b) Hilfsstoffe:', section.subheading)
|
274
|
+
assert_equal(1, section.paragraphs.size)
|
275
|
+
paragraph = section.paragraphs.first
|
276
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
277
|
+
assert_equal('Excipiens pro compresso obducto.',paragraph.text)
|
278
|
+
end
|
279
|
+
def test_galenic_form_de4
|
280
|
+
writer = @text_handler.writers.first
|
281
|
+
chapter = writer.galenic_form
|
282
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
283
|
+
assert_equal('Galenische Form und Wirkstoffmenge pro Einheit', chapter.heading)
|
284
|
+
assert_equal(1, chapter.sections.size)
|
285
|
+
section = chapter.sections.first
|
286
|
+
assert_instance_of(ODDB::Text::Section, section)
|
287
|
+
assert_equal("", section.subheading)
|
288
|
+
assert_equal(2, section.paragraphs.size)
|
289
|
+
end
|
290
|
+
def test_indications4
|
291
|
+
writer = @text_handler.writers.first
|
292
|
+
chapter = writer.indications
|
293
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
294
|
+
assert_match(/Indikationen \/ Anwendungsm.*glichkeiten/, chapter.heading)
|
295
|
+
assert_equal(1, chapter.sections.size)
|
296
|
+
end
|
297
|
+
def test_usage4
|
298
|
+
writer = @text_handler.writers.first
|
299
|
+
chapter = writer.usage
|
300
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
301
|
+
assert_equal('Dosierung / Anwendung', chapter.heading)
|
302
|
+
assert_equal(5, chapter.sections.size)
|
303
|
+
end
|
304
|
+
def test_effects4
|
305
|
+
writer = @text_handler.writers.first
|
306
|
+
chapter = writer.effects
|
307
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
308
|
+
assert_equal('Eigenschaften / Wirkungen', chapter.heading)
|
309
|
+
assert_equal(1, chapter.sections.size)
|
310
|
+
section = chapter.sections.first
|
311
|
+
assert_instance_of(ODDB::Text::Section, section)
|
312
|
+
assert_equal('', section.subheading)
|
313
|
+
assert_equal(19, section.paragraphs.size)
|
314
|
+
paragraph = section.paragraphs.at(17)
|
315
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
316
|
+
expected = /In der HOT\-Studie \(Hypertension Optimal Treatment\) wurde Felodipin entweder als Monotherapie oder bei Bedarf in Kombination mit b\-Blockern und\/oder ACE\-Hemmern und\/oder Diuretika verabreicht. Die Wirkung auf die .*ufigsten kardiovasku.*ren Ereignisse \(z\.B\. akuter Myokardinfarkt, Herzschlag und Herztod\) wurde in Beziehung zu den angestrebten diastolischen Blutdruck\-Werten untersucht\. Insgesamt wurden 18 790 Patienten mit an.*nglichen diastolischen Blutdruck\-Werten von 100\-115 mmHg im Alter zwischen 50\-80 Jahren .*hrend durchschnittlich 3,8 \(Bereich 3,3\-4,9\) Jahren in die Studie miteinbezogen\./
|
317
|
+
assert_match(expected, paragraph.text)
|
318
|
+
end
|
319
|
+
def test_iksnrs4
|
320
|
+
writer = @text_handler.writers.first
|
321
|
+
chapter = writer.iksnrs
|
322
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
323
|
+
assert_equal('Zulassungsvermerk', chapter.heading)
|
324
|
+
assert_equal(1, chapter.sections.size)
|
325
|
+
section = chapter.sections.first
|
326
|
+
assert_equal(1, section.paragraphs.size)
|
327
|
+
paragraph = section.paragraphs.first
|
328
|
+
result = paragraph.text
|
329
|
+
assert_match(/56.*170/, result)
|
330
|
+
end
|
331
|
+
def test_registration_owner4
|
332
|
+
writer = @text_handler.writers.first
|
333
|
+
chapter = writer.registration_owner
|
334
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
335
|
+
assert_equal('Zulassungsinhaberin', chapter.heading)
|
336
|
+
end
|
405
337
|
end
|
406
338
|
class TestFachinfoDocParser5 < Test::Unit::TestCase
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
writer = @text_handler.writers.first
|
503
|
-
chapter = writer.packages
|
504
|
-
assert_instance_of(ODDB::Text::Chapter, chapter)
|
505
|
-
assert_equal('Packungen', chapter.heading)
|
506
|
-
assert_equal(1, chapter.sections.size)
|
507
|
-
end
|
339
|
+
def setup
|
340
|
+
@filename = File.expand_path('data/doc/Calcitriol_d_10.03.doc',
|
341
|
+
File.dirname(__FILE__))
|
342
|
+
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
343
|
+
@parser = Rwv2.create_parser(@filename)
|
344
|
+
@parser.set_text_handler(@text_handler)
|
345
|
+
@parser.parse
|
346
|
+
end
|
347
|
+
def test_name5
|
348
|
+
assert_equal(1, @text_handler.writers.size)
|
349
|
+
writer = @text_handler.writers.first
|
350
|
+
assert_equal("Calcitriol Salmon Pharma\n", writer.name)
|
351
|
+
end
|
352
|
+
def test_company5
|
353
|
+
writer = @text_handler.writers.first
|
354
|
+
chapter = writer.company
|
355
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
356
|
+
assert_equal("Salmon Pharma", chapter.heading)
|
357
|
+
end
|
358
|
+
def test_composition5
|
359
|
+
writer = @text_handler.writers.first
|
360
|
+
chapter = writer.composition
|
361
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
362
|
+
assert_equal('Zusammensetzung', chapter.heading)
|
363
|
+
assert_equal(2, chapter.sections.size)
|
364
|
+
section = chapter.sections.first
|
365
|
+
assert_instance_of(ODDB::Text::Section, section)
|
366
|
+
assert_equal('Wirkstoff:', section.subheading)
|
367
|
+
assert_equal(1, section.paragraphs.size)
|
368
|
+
paragraph = section.paragraphs.first
|
369
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
370
|
+
end
|
371
|
+
def test_galenic_form5
|
372
|
+
writer = @text_handler.writers.first
|
373
|
+
chapter = writer.galenic_form
|
374
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
375
|
+
assert_equal('Galenische Form und Wirkstoffmenge pro Einheit', chapter.heading)
|
376
|
+
assert_equal(1, chapter.sections.size)
|
377
|
+
section = chapter.sections.first
|
378
|
+
assert_instance_of(ODDB::Text::Section, section)
|
379
|
+
assert_equal("Kapseln\n", section.subheading)
|
380
|
+
assert_equal(1, section.paragraphs.size)
|
381
|
+
end
|
382
|
+
def test_indications5
|
383
|
+
writer = @text_handler.writers.first
|
384
|
+
chapter = writer.indications
|
385
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
386
|
+
assert_match(/Indikationen\/Anwendungsm.*glichkeiten/, chapter.heading)
|
387
|
+
assert_equal(1, chapter.sections.size)
|
388
|
+
end
|
389
|
+
def test_usage5
|
390
|
+
writer = @text_handler.writers.first
|
391
|
+
chapter = writer.usage
|
392
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
393
|
+
assert_equal('Dosierung/Anwendung', chapter.heading)
|
394
|
+
assert_equal(7, chapter.sections.size)
|
395
|
+
end
|
396
|
+
def test_iksnrs5
|
397
|
+
writer = @text_handler.writers.first
|
398
|
+
chapter = writer.iksnrs
|
399
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
400
|
+
assert_equal('Zulassungsvermerk', chapter.heading)
|
401
|
+
assert_equal(1, chapter.sections.size)
|
402
|
+
assert_equal(1, chapter.sections.first.paragraphs.size)
|
403
|
+
paragraph = chapter.sections.first.paragraphs.first
|
404
|
+
assert_equal("55950 (Swissmedic)", paragraph.text)
|
405
|
+
end
|
406
|
+
def test_registration_owner5
|
407
|
+
writer = @text_handler.writers.first
|
408
|
+
chapter = writer.registration_owner
|
409
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
410
|
+
assert_equal('Zulassungshinhaberin:', chapter.heading)
|
411
|
+
end
|
412
|
+
def test_pregnancy5
|
413
|
+
writer = @text_handler.writers.first
|
414
|
+
chapter = writer.pregnancy
|
415
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
416
|
+
assert_equal('Schwangerschaft/Stillzeit', chapter.heading)
|
417
|
+
assert_equal(1, chapter.sections.size)
|
418
|
+
section = chapter.sections.first
|
419
|
+
assert_equal('', section.subheading)
|
420
|
+
paragraph = section.paragraphs.at(1)
|
421
|
+
expected = /Tierexperimentelle Studien haben eine Fetotoxizit.*t gezeigt \(s\..*Pr.*klinische Daten.*\)\./
|
422
|
+
assert_match(expected, paragraph.text)
|
423
|
+
paragraph = section.paragraphs.at(2)
|
424
|
+
expected = /Es gibt keine Hinweise daf.*r\, dass Vitamin D .* selbst in sehr hohen Dosen .* beim Menschen teratogen wirkt\. Calcitriol Salmon Pharma sollte w.*hrend der Schwangerschaft nur dann angewandt werden\, wenn dies klar notwendig ist\./
|
425
|
+
assert_match(expected, paragraph.text)
|
426
|
+
end
|
427
|
+
def test_packages5
|
428
|
+
writer = @text_handler.writers.first
|
429
|
+
chapter = writer.packages
|
430
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
431
|
+
assert_equal('Packungen', chapter.heading)
|
432
|
+
assert_equal(1, chapter.sections.size)
|
433
|
+
end
|
508
434
|
end
|
509
435
|
class TestFachinfoDocParser6 < Test::Unit::TestCase
|
510
436
|
class ReplHandler
|
@@ -512,163 +438,164 @@ class TestFachinfoDocParser6 < Test::Unit::TestCase
|
|
512
438
|
puts "inline_replacement_handler received: #{args.inspect}"
|
513
439
|
end
|
514
440
|
end
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
441
|
+
def setup
|
442
|
+
@filename = File.expand_path('data/doc/Cimzia_d_07.doc',
|
443
|
+
File.dirname(__FILE__))
|
444
|
+
@parser = Rwv2.create_parser(@filename)
|
445
|
+
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
446
|
+
@parser.set_text_handler(@text_handler)
|
521
447
|
@table_handler = @text_handler.table_handler
|
522
448
|
@parser.set_table_handler(@table_handler)
|
523
449
|
@parser.set_inline_replacement_handler(ReplHandler.new)
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
450
|
+
@parser.parse
|
451
|
+
end
|
452
|
+
def test_name6
|
453
|
+
assert_equal(1, @text_handler.writers.size)
|
454
|
+
writer = @text_handler.writers.first
|
455
|
+
#assert_equal("CIMZIA\256, Pulver\n", writer.name)
|
456
|
+
assert_match(/CIMZIA.* Pulver\n/, writer.name)
|
457
|
+
end
|
458
|
+
def test_composition6
|
459
|
+
writer = @text_handler.writers.first
|
460
|
+
chapter = writer.composition
|
461
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
462
|
+
assert_equal('Zusammensetzung', chapter.heading)
|
463
|
+
assert_equal(2, chapter.sections.size)
|
464
|
+
section = chapter.sections.first
|
465
|
+
assert_instance_of(ODDB::Text::Section, section)
|
466
|
+
assert_equal('Wirkstoff:', section.subheading)
|
467
|
+
assert_equal(1, section.paragraphs.size)
|
468
|
+
paragraph = section.paragraphs.first
|
469
|
+
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
470
|
+
end
|
471
|
+
def test_galenic_form6
|
472
|
+
writer = @text_handler.writers.first
|
473
|
+
chapter = writer.galenic_form
|
474
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
475
|
+
assert_equal('Galenische Form und Wirkstoffmenge pro Einheit', chapter.heading)
|
476
|
+
assert_equal(1, chapter.sections.size)
|
477
|
+
section = chapter.sections.first
|
478
|
+
assert_instance_of(ODDB::Text::Section, section)
|
479
|
+
assert_equal("", section.subheading)
|
480
|
+
assert_equal(2, section.paragraphs.size)
|
481
|
+
end
|
482
|
+
def test_indications6
|
483
|
+
writer = @text_handler.writers.first
|
484
|
+
chapter = writer.indications
|
485
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
486
|
+
assert_match(/Indikationen\/Anwendungsm.*glichkeiten/, chapter.heading)
|
487
|
+
assert_equal(1, chapter.sections.size)
|
488
|
+
end
|
489
|
+
def test_usage6
|
490
|
+
writer = @text_handler.writers.first
|
491
|
+
chapter = writer.usage
|
492
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
493
|
+
assert_equal('Dosierung/Anwendung', chapter.heading)
|
494
|
+
assert_equal(1, chapter.sections.size)
|
495
|
+
end
|
496
|
+
def test_contra_indiations6
|
497
|
+
writer = @text_handler.writers.first
|
498
|
+
chapter = writer.contra_indications
|
499
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
500
|
+
assert_equal('Kontraindikationen', chapter.heading)
|
501
|
+
assert_equal(1, chapter.sections.size)
|
502
|
+
end
|
503
|
+
def test_restrictions6
|
504
|
+
writer = @text_handler.writers.first
|
505
|
+
chapter = writer.restrictions
|
506
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
507
|
+
assert_equal('Warnhinweise und Vorsichtsmassnahmen', chapter.heading)
|
508
|
+
assert_equal(1, chapter.sections.size)
|
509
|
+
end
|
510
|
+
def test_interactions6
|
511
|
+
writer = @text_handler.writers.first
|
512
|
+
chapter = writer.interactions
|
513
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
514
|
+
assert_equal('Interaktionen', chapter.heading)
|
515
|
+
assert_equal(1, chapter.sections.size)
|
516
|
+
end
|
517
|
+
def test_pregnancy6
|
518
|
+
writer = @text_handler.writers.first
|
519
|
+
chapter = writer.pregnancy
|
520
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
521
|
+
assert_equal('Schwangerschaft, Stillzeit', chapter.heading)
|
522
|
+
assert_equal(2, chapter.sections.size)
|
523
|
+
section = chapter.sections.first
|
524
|
+
assert_equal("Schwangerschaft\n", section.subheading)
|
525
|
+
paragraph = section.paragraphs.at(0)
|
526
|
+
expected = /In tierexperimentellen Untersuchungen mit Ratten von bis zu 100 mg\/kg eines pegylierten Fab Fragmentes eines Nager-anti-murinen Antik.*rpers \(cTN3 PF\) .*hnlich Certolizumab pegol wurden keine Anzeichen von maternaler Toxizit.*t oder Teratogenit.*t beobachtet. Im Zuge einer embryof.*talen Entwicklungsstudie traten bei 20 mg\/kg spontane Missbildungen der Niere auf, die in den historischen Kontrollen nicht aufscheinen aber nicht dosisabh.*ngig waren. Es liegen keine kontrollierten Studien mit Schwangeren vor\. Auf Grund seiner inhibitorischen Wirkung auf TNF.* k.*nnte sich Certolizumab pegol bei einer Anwendung w.*hrend der Schwangerschaft auf die normalen Immunreaktionen beim Neugeborenen auswirken. Cimzia sollte daher w.*hrend der Schwangerschaft nicht angewendet werden, es sei denn, dies ist klar notwendig\. Frauen im geb.*rf.*higen Alter wird dringend empfohlen, durch geeignete empf.*ngnisverh.*tende Massnahmen einer Schwangerschaft vorzubeugen und diese nach Ende der Behandlung mit Cimzia noch mindestens 4 Monate lang anzuwenden\./
|
527
|
+
assert_match(expected, paragraph.text)
|
528
|
+
section = chapter.sections.last
|
529
|
+
assert_equal("Stillzeit\n", section.subheading)
|
530
|
+
paragraph = section.paragraphs.at(0)
|
531
|
+
expected = /In Tierstudien wurde ein Transfer von cTN3 PF in die Muttermilch von Ratten mit einer Milch.*Plasma Ratio von ca\. 10 \% gemessen\. Es ist nicht bekannt, ob Certolizumab pegol .*ber die menschliche Muttermilch ausgeschieden wird\. Es wird daher empfohlen, Cimzia w.*hrend der Schwangerschaft nicht anzuwenden\./
|
532
|
+
assert_match(expected, paragraph.text)
|
533
|
+
end
|
534
|
+
def test_driving_ability6
|
535
|
+
writer = @text_handler.writers.first
|
536
|
+
chapter = writer.driving_ability
|
537
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
538
|
+
assert_match(/Wirkung auf die Fahrt.*chtigkeit und auf das Bedienen von Maschinen/,
|
612
539
|
chapter.heading)
|
613
|
-
|
540
|
+
assert_equal(1, chapter.sections.size)
|
614
541
|
paragraph = chapter.sections.first.paragraphs.first
|
615
|
-
|
542
|
+
assert_match(/Es wurden keine entsprechenden Studien durchgef.*hrt\./,
|
616
543
|
paragraph.text)
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
544
|
+
end
|
545
|
+
def test_unwanted_effects6
|
546
|
+
writer = @text_handler.writers.first
|
547
|
+
chapter = writer.unwanted_effects
|
548
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
549
|
+
assert_match(/Unerw.*nschte Wirkungen/, chapter.heading)
|
550
|
+
assert_equal(1, chapter.sections.size)
|
624
551
|
section = chapter.sections.first
|
625
552
|
assert_instance_of(ODDB::Text::Section, section)
|
626
|
-
|
553
|
+
assert_match(/Tabelle 1\:.*Unerw.*nschte Wirkungen in klinischen Studien/,
|
627
554
|
section.paragraphs.at(7).text)
|
628
555
|
table = section.paragraphs.at(8)
|
629
556
|
assert_instance_of ODDB::Text::Table, table
|
630
557
|
assert_equal(47, table.rows.size)
|
631
558
|
assert_equal('Systemorganklasse', table.cell(0,0).text)
|
632
|
-
|
633
|
-
|
559
|
+
assert_match(/H.*ufigkeit/, table.cell(0,1).text)
|
560
|
+
assert_match(/Unerw.*nschte Ereignisse/, table.cell(0,2).text)
|
634
561
|
assert_equal('Infektionen', table.cell(1,0).text)
|
635
|
-
|
562
|
+
assert_match(/H.*ufig/, table.cell(1,1).text)
|
636
563
|
assert_equal('Infektionen der Harnwege, Herpes simplex, Infektionen der oberen Atemwege',
|
637
564
|
table.cell(1,2).text)
|
638
565
|
assert_equal('', table.cell(2,0).text)
|
639
566
|
assert_equal('Gelegentlich', table.cell(2,1).text)
|
640
|
-
|
567
|
+
assert_match(/Influenza, perianale Abszesse, Bronchitis, Sinusitis, Abszesse, Cellulitis, Herpes zoster, abdominale Abszesse, Pilzinfektionen, Candidiasis, Otitis externa, Pharyngitis, perirektale Abszesse, Infektionen der Atemwege, Tonsillitis, Vaginalmykosen, Furunkel, Gastroenteritis, Pneumonie \(mit teilweise t.*dlichem Verlauf\), Varizellen/,
|
641
568
|
table.cell(2,2).text)
|
642
569
|
assert_equal('Atmungsorgane', table.cell(24,0).text)
|
643
570
|
assert_equal('Gelegentlich', table.cell(24,1).text)
|
644
571
|
assert_equal('Dyspnoe, Rhinitis, Pleuraerguss', table.cell(24,2).text)
|
645
|
-
|
572
|
+
assert_match(/Gastrointestinale St.*rungen/, table.cell(26,0).text)
|
646
573
|
assert_equal('Untersuchungen', table.cell(46,0).text)
|
647
574
|
assert_equal('Selten', table.cell(46,1).text)
|
648
|
-
|
575
|
+
assert_match(/Verl.*ngerte Gerinnungszeit/, table.cell(46,2).text)
|
649
576
|
next_par = section.paragraphs.at(9)
|
650
|
-
|
651
|
-
next_par.text
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
577
|
+
assert_match(/In klinischen Studien sind in seltenen F.*llen Blasenbildung, Verletzungen, Erstickung und Erm.*dungsbr.*che aufgetreten\./,
|
578
|
+
next_par.text)
|
579
|
+
end
|
580
|
+
def test_overdose6
|
581
|
+
writer = @text_handler.writers.first
|
582
|
+
chapter = writer.overdose
|
583
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
584
|
+
assert_match(/.*berdosierung/, chapter.heading)
|
585
|
+
end
|
586
|
+
def test_effects6
|
587
|
+
writer = @text_handler.writers.first
|
588
|
+
chapter = writer.effects
|
589
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
590
|
+
assert_equal('Eigenschaften/Wirkungen', chapter.heading)
|
664
591
|
assert_equal(4, chapter.sections.size)
|
665
592
|
section = chapter.sections.at(0)
|
666
593
|
assert_equal('ATC-Code:', section.subheading)
|
667
594
|
assert_equal(2, section.paragraphs.size)
|
668
595
|
section = chapter.sections.at(3)
|
669
596
|
assert_equal "Klinische Wirksamkeit:\n", section.subheading
|
670
|
-
|
671
|
-
section.paragraphs.at(4).text
|
597
|
+
assert_match(/Tabelle 2\:.*PRECiSE 1 .* Klinisches Ansprechen; gesamte Studienpopulation/,
|
598
|
+
section.paragraphs.at(4).text)
|
672
599
|
table = section.paragraphs.at(5)
|
673
600
|
assert_instance_of ODDB::Text::Table, table
|
674
601
|
assert_equal 19, table.rows.size
|
@@ -679,43 +606,43 @@ class TestFachinfoDocParser6 < Test::Unit::TestCase
|
|
679
606
|
assert_equal(0..23, fmts.first.range)
|
680
607
|
assert_equal([], fmts.last.values)
|
681
608
|
assert_equal(24..-1, fmts.last.range)
|
682
|
-
|
683
|
-
table.cell(18,0).text
|
609
|
+
assert_match(/.* p\-Wert nicht berechnet\n\* p\-value \< 0,05 logistischer Regressionstest/,
|
610
|
+
table.cell(18,0).text)
|
684
611
|
assert_equal(3, table.cell(18,0).col_span)
|
685
612
|
next_par = section.paragraphs.at(6)
|
686
|
-
|
687
|
-
next_par.text
|
688
|
-
|
689
|
-
section.paragraphs.at(17).text
|
613
|
+
assert_match(/Die Anwendung von Immunsuppressiva oder Kortikosteroiden zum Baseline.*Zeitpunkt hatte keine Auswirkungen auf das klinische Ansprechen auf Cimzia\. Cimzia war wirksam in Bezug auf die Induktion und Aufrechterhaltung des Ansprechens in der Subpopulation der mit Infliximab vorbehandelten Patienten \(Woche 6: 24,5\% vs 20,0\%\; Wochen 6 und 26\: 15,5\% vs 10,6\% f.*r Cimzia bzw\. Placebo\)\./,
|
614
|
+
next_par.text)
|
615
|
+
assert_match(/Tabelle 3\:.*PRECiSE 2 .* Klinisches Ansprechen \(Response\) und klinische Remission in der Gesamt.*Studienpopulation/,
|
616
|
+
section.paragraphs.at(17).text)
|
690
617
|
table = section.paragraphs.at(18)
|
691
618
|
assert_instance_of ODDB::Text::Table, table
|
692
619
|
assert_equal 5, table.cell(7,0).col_span
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
620
|
+
end
|
621
|
+
def test_kinetic6
|
622
|
+
writer = @text_handler.writers.first
|
623
|
+
chapter = writer.kinetic
|
624
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
625
|
+
assert_equal('Pharmakokinetik', chapter.heading)
|
626
|
+
assert_equal(5, chapter.sections.size)
|
700
627
|
assert_equal("", chapter.sections.at(0).subheading)
|
701
628
|
assert_equal("Absorption\n", chapter.sections.at(1).subheading)
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
629
|
+
end
|
630
|
+
def test_iksnrs6
|
631
|
+
writer = @text_handler.writers.first
|
632
|
+
chapter = writer.iksnrs
|
633
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
634
|
+
assert_equal('Zulassungsnummer', chapter.heading)
|
635
|
+
assert_equal(1, chapter.sections.size)
|
636
|
+
assert_equal(1, chapter.sections.first.paragraphs.size)
|
637
|
+
paragraph = chapter.sections.first.paragraphs.first
|
638
|
+
assert_match(/57.*856 \(Swissmedic\)/, paragraph.text)
|
639
|
+
end
|
640
|
+
def test_registration_owner6
|
641
|
+
writer = @text_handler.writers.first
|
642
|
+
chapter = writer.registration_owner
|
643
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
644
|
+
assert_equal('Zulassungsinhaberin', chapter.heading)
|
645
|
+
end
|
719
646
|
end
|
720
647
|
=begin ## this file consists of some kind of layout table - ignore for the moment
|
721
648
|
class TestFachinfoDocParser7 < Test::Unit::TestCase
|
@@ -911,17 +838,18 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
911
838
|
def test_name8
|
912
839
|
assert_equal(1, @text_handler.writers.size)
|
913
840
|
writer = @text_handler.writers.first
|
914
|
-
|
841
|
+
assert_match(/Togal.+ ASS 300\/500\n/, writer.name)
|
915
842
|
end
|
916
843
|
def test_composition8
|
917
844
|
writer = @text_handler.writers.first
|
918
845
|
chapter = writer.composition
|
919
846
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
847
|
+
assert_instance_of(ODDB::Text::Chapter, chapter)
|
920
848
|
assert_equal('Composition', chapter.heading)
|
921
849
|
assert_equal(2, chapter.sections.size)
|
922
850
|
section = chapter.sections.first
|
923
851
|
assert_instance_of(ODDB::Text::Section, section)
|
924
|
-
|
852
|
+
assert_match(/Principe actif.*\:/, section.subheading)
|
925
853
|
assert_equal(1, section.paragraphs.size)
|
926
854
|
paragraph = section.paragraphs.first
|
927
855
|
assert_instance_of(ODDB::Text::Paragraph, paragraph)
|
@@ -930,7 +858,7 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
930
858
|
writer = @text_handler.writers.first
|
931
859
|
chapter = writer.galenic_form
|
932
860
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
933
|
-
|
861
|
+
assert_match(/Forme gal.*nique et quantit.* de principe actif par unit.+/, chapter.heading)
|
934
862
|
assert_equal(1, chapter.sections.size)
|
935
863
|
section = chapter.sections.first
|
936
864
|
assert_instance_of(ODDB::Text::Section, section)
|
@@ -941,14 +869,14 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
941
869
|
writer = @text_handler.writers.first
|
942
870
|
chapter = writer.indications
|
943
871
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
944
|
-
|
872
|
+
assert_match(/Indications\/Possibilit.*s d.*emploi/, chapter.heading)
|
945
873
|
assert_equal(1, chapter.sections.size)
|
946
874
|
end
|
947
875
|
def test_usage8
|
948
876
|
writer = @text_handler.writers.first
|
949
877
|
chapter = writer.usage
|
950
878
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
951
|
-
|
879
|
+
assert_match(/Posologie\/Mode d.*emploi/, chapter.heading)
|
952
880
|
assert_equal(2, chapter.sections.size)
|
953
881
|
end
|
954
882
|
def test_contra_indiations8
|
@@ -962,14 +890,14 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
962
890
|
writer = @text_handler.writers.first
|
963
891
|
chapter = writer.restrictions
|
964
892
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
965
|
-
|
893
|
+
assert_match(/Mises en garde et pr.*cautions/, chapter.heading)
|
966
894
|
assert_equal(1, chapter.sections.size)
|
967
895
|
section = chapter.sections.first
|
968
896
|
paragraph = section.paragraphs.at(6)
|
969
|
-
|
897
|
+
assert_match(/carence en glucose-6-phosphate-d.*shydrog.*nase d.*origine g.*n.*tique;/,
|
970
898
|
paragraph.text)
|
971
899
|
paragraph = section.paragraphs.at(7)
|
972
|
-
|
900
|
+
assert_match(/traitement concomitant par des anticoagulants.*;/,
|
973
901
|
paragraph.text)
|
974
902
|
end
|
975
903
|
def test_interactions8
|
@@ -988,19 +916,19 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
988
916
|
section = chapter.sections.first
|
989
917
|
assert_equal("Grossesse\n", section.subheading)
|
990
918
|
paragraph = section.paragraphs.at(0)
|
991
|
-
expected =
|
992
|
-
|
919
|
+
expected = /La prudence s.*impose lors de l.*utilisation de salicylates durant le premier et le deuxi.*me trimestres de la grossesse\. En exp.*rimentation animale, les salicylates ont montr.* des effets ind.*sirables sur le f.*tus \(tels qu.*une augmentation de la mortalit.*, des troubles de la croissance, des intoxications aux salicylates\), mais il n.*existe pas d.*tudes contr.*l.*es chez la femme enceinte\. En fonction des exp.*riences actuelles, il semble cependant que ce risque soit minime aux doses th.*rapeutiques normales\. Au cours du dernier trimestre de la grossesse, la prise de salicylates peut entra.*ner une inhibition des contractions et des h.*morragies, une prolongation de la dur.*e de la gestation et une fermeture pr.*matur.*e du canal art.*riel \(ductus arteriosus\)\. Voici pourquoi ils sont contre\-indiqu.*s\./
|
920
|
+
assert_match(expected, paragraph.text)
|
993
921
|
section = chapter.sections.last
|
994
922
|
assert_equal("Allaitement\n", section.subheading)
|
995
923
|
paragraph = section.paragraphs.at(0)
|
996
|
-
expected =
|
997
|
-
|
924
|
+
expected = /Les salicylates passent dans le lait maternel\. La concentration dans le lait maternel est la m.*me ou m.*me plus haute que dans le plasma maternel. Aux doses habituelles utilis.*es .* court terme \(pour l.*analg.*sie et l.*action antipyr.*tique\), aucune cons.*quence nuisible pour le nourrisson n.*est .* pr.*voir. Une interruption de l.*allaitement n.*est pas n.*cessaire si le m.*dicament est utilis.* occasionnellement aux doses recommand.*es. L.*allaitement devrait .*tre interrompu si le m.*dicament est utilis.* de mani.*re prolong.*e, resp\. .* des doses plus .*lev.*es\./
|
925
|
+
assert_match(expected, paragraph.text)
|
998
926
|
end
|
999
927
|
def test_driving_ability8
|
1000
928
|
writer = @text_handler.writers.first
|
1001
929
|
chapter = writer.driving_ability
|
1002
930
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1003
|
-
|
931
|
+
assert_match(/Effet sur l.*aptitude .* la conduite et .* l.*utilisation de machines/,
|
1004
932
|
chapter.heading)
|
1005
933
|
assert_equal(1, chapter.sections.size)
|
1006
934
|
end
|
@@ -1008,7 +936,7 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
1008
936
|
writer = @text_handler.writers.first
|
1009
937
|
chapter = writer.unwanted_effects
|
1010
938
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1011
|
-
|
939
|
+
assert_match(/Effets ind.*sirables/, chapter.heading)
|
1012
940
|
assert_equal(21, chapter.sections.size)
|
1013
941
|
section = chapter.sections.first
|
1014
942
|
end
|
@@ -1032,7 +960,7 @@ class TestFachinfoDocParser8 < Test::Unit::TestCase
|
|
1032
960
|
writer = @text_handler.writers.first
|
1033
961
|
chapter = writer.registration_owner
|
1034
962
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1035
|
-
|
963
|
+
assert_match(/Titulaire de l.*autorisation/, chapter.heading)
|
1036
964
|
end
|
1037
965
|
end
|
1038
966
|
class TestFachinfoDocParser9 < Test::Unit::TestCase
|
@@ -1054,6 +982,9 @@ class TestFachinfoDocParser9 < Test::Unit::TestCase
|
|
1054
982
|
@text_handler.cutoff_fontsize = @text_handler.max_fontsize
|
1055
983
|
@parser.parse
|
1056
984
|
end
|
985
|
+
def test_test
|
986
|
+
assert(true)
|
987
|
+
end
|
1057
988
|
def test_name9
|
1058
989
|
## the difficulty here is that we have no uniquely largest fontsize.
|
1059
990
|
assert_equal(1, @text_handler.writers.size)
|
@@ -1065,7 +996,7 @@ class TestFachinfoDocParser9 < Test::Unit::TestCase
|
|
1065
996
|
writer = @text_handler.writers.first
|
1066
997
|
chapter = writer.registration_owner
|
1067
998
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1068
|
-
|
999
|
+
assert_match(/Titulaire de l.*autorisation/, chapter.heading)
|
1069
1000
|
end
|
1070
1001
|
end
|
1071
1002
|
class TestFachinfoDocParser10 < Test::Unit::TestCase
|
@@ -1075,6 +1006,7 @@ class TestFachinfoDocParser10 < Test::Unit::TestCase
|
|
1075
1006
|
end
|
1076
1007
|
end
|
1077
1008
|
def setup
|
1009
|
+
#@filename = File.expand_path('data/doc/test.doc',
|
1078
1010
|
@filename = File.expand_path('data/doc/Tendro.doc',
|
1079
1011
|
File.dirname(__FILE__))
|
1080
1012
|
@text_handler = ODDB::FiParse::FachinfoTextHandler.new
|
@@ -1113,14 +1045,14 @@ class TestFachinfoDocParser10 < Test::Unit::TestCase
|
|
1113
1045
|
assert_equal(1, chapter.sections.size)
|
1114
1046
|
section = chapter.sections.first
|
1115
1047
|
assert_instance_of(ODDB::Text::Section, section)
|
1116
|
-
|
1048
|
+
assert_match(/Tropfen\. 1 ml enth.*lt\:\n/, section.subheading)
|
1117
1049
|
assert_equal(1, section.paragraphs.size)
|
1118
1050
|
end
|
1119
1051
|
def test_indications10
|
1120
1052
|
writer = @text_handler.writers.first
|
1121
1053
|
chapter = writer.indications
|
1122
1054
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1123
|
-
|
1055
|
+
assert_match(/Indikationen\/Anwendungsm.*glichkeiten/, chapter.heading)
|
1124
1056
|
assert_equal(1, chapter.sections.size)
|
1125
1057
|
end
|
1126
1058
|
def test_iksnrs10
|
@@ -1131,7 +1063,7 @@ class TestFachinfoDocParser10 < Test::Unit::TestCase
|
|
1131
1063
|
assert_equal(1, chapter.sections.size)
|
1132
1064
|
assert_equal(1, chapter.sections.first.paragraphs.size)
|
1133
1065
|
paragraph = chapter.sections.first.paragraphs.first
|
1134
|
-
assert_equal("
|
1066
|
+
assert_equal("47831 (Swissmedic)", paragraph.text)
|
1135
1067
|
end
|
1136
1068
|
def test_registration_owner10
|
1137
1069
|
writer = @text_handler.writers.first
|
@@ -1192,7 +1124,7 @@ class TestFachinfoDocParser11 < Test::Unit::TestCase
|
|
1192
1124
|
writer = @text_handler.writers.first
|
1193
1125
|
chapter = writer.indications
|
1194
1126
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1195
|
-
|
1127
|
+
assert_match(/Indikationen\/Anwendungsm.*glichkeiten/, chapter.heading)
|
1196
1128
|
assert_equal(1, chapter.sections.size)
|
1197
1129
|
end
|
1198
1130
|
def test_iksnrs11
|
@@ -1252,7 +1184,7 @@ class TestFachinfoDocParser12 < Test::Unit::TestCase
|
|
1252
1184
|
writer = @text_handler.writers.first
|
1253
1185
|
chapter = writer.galenic_form
|
1254
1186
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1255
|
-
|
1187
|
+
assert_match(/Forme gal.*nique et quantit.* de principe actif par unit.*/,
|
1256
1188
|
chapter.heading)
|
1257
1189
|
assert_equal(1, chapter.sections.size)
|
1258
1190
|
section = chapter.sections.first
|
@@ -1264,7 +1196,7 @@ class TestFachinfoDocParser12 < Test::Unit::TestCase
|
|
1264
1196
|
writer = @text_handler.writers.first
|
1265
1197
|
chapter = writer.indications
|
1266
1198
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1267
|
-
|
1199
|
+
assert_match(/Indications\/domaines d.*application/, chapter.heading)
|
1268
1200
|
assert_equal(1, chapter.sections.size)
|
1269
1201
|
end
|
1270
1202
|
def test_iksnrs12
|
@@ -1281,7 +1213,7 @@ class TestFachinfoDocParser12 < Test::Unit::TestCase
|
|
1281
1213
|
writer = @text_handler.writers.first
|
1282
1214
|
chapter = writer.registration_owner
|
1283
1215
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1284
|
-
|
1216
|
+
assert_match(/Titulaire de l.*autorisation/, chapter.heading)
|
1285
1217
|
end
|
1286
1218
|
end
|
1287
1219
|
class TestFachinfoDocParser13 < Test::Unit::TestCase
|
@@ -1306,7 +1238,7 @@ class TestFachinfoDocParser13 < Test::Unit::TestCase
|
|
1306
1238
|
def test_name13
|
1307
1239
|
assert_equal(1, @text_handler.writers.size)
|
1308
1240
|
writer = @text_handler.writers.first
|
1309
|
-
|
1241
|
+
assert_match(/LAPIDAR .* 10\n/, writer.name)
|
1310
1242
|
end
|
1311
1243
|
def test_composition13
|
1312
1244
|
writer = @text_handler.writers.first
|
@@ -1324,14 +1256,14 @@ class TestFachinfoDocParser13 < Test::Unit::TestCase
|
|
1324
1256
|
writer = @text_handler.writers.first
|
1325
1257
|
chapter = writer.indications
|
1326
1258
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1327
|
-
|
1259
|
+
assert_match(/Indications\/possibilit.*s d.*emploi/, chapter.heading)
|
1328
1260
|
assert_equal(2, chapter.sections.size)
|
1329
1261
|
end
|
1330
1262
|
def test_preclinic13
|
1331
1263
|
writer = @text_handler.writers.first
|
1332
1264
|
chapter = writer.preclinic
|
1333
1265
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1334
|
-
|
1266
|
+
assert_match(/Donn.*s pr.*cliniques/, chapter.heading)
|
1335
1267
|
assert_equal(2, chapter.sections.size)
|
1336
1268
|
end
|
1337
1269
|
def test_iksnrs13
|
@@ -1348,13 +1280,13 @@ class TestFachinfoDocParser13 < Test::Unit::TestCase
|
|
1348
1280
|
writer = @text_handler.writers.first
|
1349
1281
|
chapter = writer.registration_owner
|
1350
1282
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1351
|
-
|
1283
|
+
assert_match(/Titulaire de l.*autorisation/, chapter.heading)
|
1352
1284
|
end
|
1353
1285
|
def test_date13
|
1354
1286
|
writer = @text_handler.writers.first
|
1355
1287
|
chapter = writer.date
|
1356
1288
|
assert_instance_of(ODDB::Text::Chapter, chapter)
|
1357
|
-
|
1289
|
+
assert_match(/Mise .* jour de l.*information/, chapter.heading)
|
1358
1290
|
paragraph = chapter.sections.first.paragraphs.first
|
1359
1291
|
assert_equal("Mai 2006", paragraph.text)
|
1360
1292
|
end
|