<< | Index | >>
The Swissmedic Info Klacid® i.v., contains long lines which are no broken up and lead to a horizontal scroll bar. We find however the HTML tag <BR>
after "der parenteralen Form belegt.".
Must we manually insert a <br>
after e.g. 80 character. Or should the style limit the width?
Usually (e.g. 60551/Calvive) there is a space before the Wirkstoff.
Analysing Ponstan. Looking at original of http://www.swissmedicinfo.ch/. The relevant section in the HTML file looks like this
<div class="paragraph"> <h2><a name="7840">Was ist in Ponstan enthalten?</a></h2> <p class="spacing1"><span style="font-style:italic; ">Wirkstoff:</span> Mefenaminsäure.</p> <h3><span style="font-style:italic; ">Filmtabletten</span></h3> <p class="spacing1">500 mg Mefenaminsäure sowie Vanillin (Aromaticum) und andere Hilfsstoffe.</p> <h3><span style="font-style:italic; ">Kapseln</span></h3> <p class="spacing1">250 mg Mefenaminsäure, Farbstoff: Indigotin (E 132) und andere Hilfsstoffe.</p> <h3><span style="font-style:italic; ">Zäpfchen</span></h3> <p class="spacing1">125 bzw. 500 mg Mefenaminsäure und Hilfsstoffe.</p> <h3><span style="font-style:italic; ">Suspension</span></h3> <p class="spacing1">5 ml enthalten 50 mg Mefenaminsäure, Konservierungsmittel: Natriumbenzoat (E 211), Saccharin, Vanillin, Aromatica und andere Hilfsstoffe.</p> <p class="noSpacing">5 ml enthalten 1 g Zucker (0,1 Brotwert).</p> </div>
The Unit-Test ./ext/fiparse/test/test_patinfo_hpricot.rb contains already a (failing) test for this case at line 546. See
11) Failure: test_composition4(ODDB::FiParse::TestPatinfoHpricotPonstanDe) [./ext/fiparse/test/test_patinfo_hpricot.rb:546]: <"Wirkstoff: Mefenaminsäure."> expected but was <"Wirkstoff:Mefenaminsäure.">.
The same for fachinfo
1) Failure: test_chapter(ODDB::FiParse::TestFachinfoHpricot) [./ext/fiparse/test/test_fachinfo_hpricot.rb:66]: Expected /Hilfsstoffe: Saccharinum, Cyclamas, Aromatica, Color.: E.*120./ to match "Hilfsstoffe:Saccharinum, Cyclamas, Aromatica, Color.: E 120.".
Found a fix to reduce problems. There are now just a few spaces too much as reflected in the following error
1) Failure: test_galenic_form(ODDB::FiParse::TestFachinfoHpricot58106De) [/opt/src/oddb.org/ext/fiparse/test/test_fachinfo_hpricot.rb:325]: <"Galenische Form und Wirkstoffmenge pro Einheit\nFilmtabletten zu 5 mg Finasterid.\n "> expected but was <"Galenische Form und Wirkstoffmenge pro Einheit\nFilmt abletten zu 5 mg Finasterid .\n ">. 2) Failure: test_galenic_form(ODDB::FiParse::TestFachinfoHpricotZyloricDe) [/opt/src/oddb.org/ext/fiparse/test/test_fachinfo_hpricot.rb:241]: <"Galenische Form und Wirkstoffmenge pro Einheit\nTabletten zu 100 mg und 300 mg.\n "> expected but was <"Galenische Form und Wirkstoffmenge pro Einheit\nTabletten zu 100 mg und 300 mg .\n ">.
The whole problem is tricky. Rename the procedures to better match the expected behaviour handle_element
-> handle_all_children
Pushed the commit
Run the following test case ruby jobs/update_textinfo_swissmedicinfo no-download --target=fi 30785 51759 51608 60551 --reparse
Searched for the definition of "Wirkstoff" data/html/fachinfo/de/Klaciped__-\ Forte_swissmedicinfo.yaml. Looks good
preformatted: false raw_txt: text: "Wirkstoff: Clarithromycin ." - !ruby/object:ODDB::Text::Paragraph format: &id002 !ruby/object:ODDB::Text::Format end: -1 start: 11 values: []
Had to send a HUP-signal to all ODDB-processes and redo the import a second time, as I forget the HUP.
Problem stems probably from the following commit: http://scm.ywesee.com/?p=oddb.org/.git;a=commit;h=50c6bcd0453683dbde5817835698c304cb128709. To reproduce the problem I am using the following ruby jobs/update_textinfo_swissmedicinfo --target=fi --reparse Bayer
There are two problems:
51177, 51178
or
54‘909
Created a fix, but running the import resulted with Message: ERROR: prepared statement already exists
error:
Plugin: ODDB::TextInfoPlugin Error: DBI::ProgrammingError Message: ERROR: prepared statement "ruby-dbi:Pg:727122201373876544.0743499" already exists Backtrace: /usr/local/lib64/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:62:in `rescue in execute' /usr/local/lib64/ruby/gems/1.9.1/gems/dbd-pg-0.3.9/lib/dbd/pg/statement.rb:37:in `execute' /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in `execute' /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:81:in `execute' /usr/local/lib64/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi/handles/database.rb:128:in `select_all' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:39:in `block in method_missing' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:29:in `next_connection' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/connection_pool.rb:38:in `method_missing' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/storage.rb:508:in `restore_collection' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:236:in `fetch_collection' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:632:in `restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:318:in `block in fetch_or_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `call' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `fetch_or_do' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:317:in `fetch_or_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:65:in `block in bulk_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:62:in `each' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:62:in `bulk_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:56:in `bulk_fetch' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:260:in `fetch_collection' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:632:in `restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:318:in `block in fetch_or_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `call' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `fetch_or_do' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:317:in `fetch_or_restore' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:640:in `restore_object' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:605:in `load_object' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:226:in `block in fetch' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `call' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:313:in `fetch_or_do' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/cache.rb:225:in `fetch' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:49:in `odba_receiver' /usr/local/lib64/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/util/oddbapp.rb:216:in `clean_invoices' /var/www/oddb.org/src/util/oddbapp.rb:1440:in `clean' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/drbserver.rb:140:in `block (3 levels) in run_cleaner' <internal:prelude>:10:in `synchronize' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/drbserver.rb:139:in `block (2 levels) in run_cleaner' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/drbserver.rb:137:in `loop' /usr/local/lib64/ruby/gems/1.9.1/gems/sbsm-1.2.3/lib/sbsm/drbserver.rb:137:in `block in run_cleaner'