Iscador (IKSNR 56829) should look like this Viscum Album (Mali) Recens 0.001 mg/ml
and not as
<SUBSTANCE_NAME>Extractum Aquosum Liquidum Fermentatum 0.05 Mg Ex Viscum Album (mali) Recens</SUBSTANCE_NAME> <IS_ACTIVE_AGENT>false</IS_ACTIVE_AGENT> <QTY>0.01</QTY> <UNIT>mg/ml</UNIT>
See also http://scm.ywesee.com/?p=oddb.org/.git;a=commit;h=3d24ea905342c755819973fcdeacfc3c941b0a8e. Extract from an e-mail from Good, June 7, 2011 is Extractum aquosum liquidum fermentatum 0.05 mg ex viscum album (mali) recens 0.01 mg, natrii chloridum, aqua q.s. ad solutionem pro 1 ml.
Ausgedeutscht heisst das: Der Extrakt ist ein Auszug aus der Frischpflanze im Verhältnis 1:5, also ‚extractum 0.05 mg’ entspricht 0.01 mg frischem Mistelkraut. Es handelt sich um EINEN Wirkstoff, also „in Kombination“ ist falsch formuliert. Die HILFSSTOFFE sind Aqua ad iniectabilia und Natrii chloridum.
Redefined parsing the lines. But the codes gets worse and worse. I think it might be better to create a real parser (eg. using Parslet or Treetop) as we have to split each line and finding
I) DTPa-IPV-Komponente (Suspension):
Praeparatio cryodesiccata: virus rabiei inactivatum
coresp.
residui:
pro
/et
/ex
probably all combinations of above is found once or more.
And adapting the various regular expressions gets more and more time consuming. I think I will invest 4 hours to see whether I can get parslet work with my example. Was able to add a simple example which parses '2 mg' and create a correct dose, see Attach:dose.txt
Received the following error message
Plugin: ODDB::Atc_lessPlugin Error: ArgumentError Message: invalid byte sequence in US-ASCII Backtrace: /var/www/oddb.org/src/plugin/atc_less.rb:71:in `sub' /var/www/oddb.org/src/plugin/atc_less.rb:71:in `parse_swissindex_xml' /var/www/oddb.org/src/plugin/atc_less.rb:98:in `update_atc_codes' /var/www/oddb.org/src/util/updater.rb:558:in `update_immediate' /var/www/oddb.org/src/util/updater.rb:453:in `update_atc_less' /var/www/oddb.org/src/util/updater.rb:456:in `update_swissmedic_followers' /var/www/oddb.org/src/util/updater.rb:201:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /var/www/oddb.org/src/util/job.rb:40:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'
Trying to reproduce the problem locally running jobs/update_atc_less
. It worked without a problem on oddb-ci2. Committed Force UTF-8 encoding for atc_less which should resolve the problem on thinpower. It worked fine on oddb-ci2.
Pushing & pulling the changes and starting the import job on thinpower. There it completed successfully, too.