de.oddb.org - OpenDrugDatabase for Germany

Below notes go by timeline. The most uptodate is on top.

11:15 - 26.10.2010

If you want to import a PDF directly, do

$ jobs/import_gkv pdf=http://www.xxx.com/abc.pdf

15:21 - 02.09.2010

Granting PowerUser and Admin privileges:

yus_grant [email protected] login org.oddb.de.PowerUser

and

yus_grant [email protected] login org.oddb.de.Admin

14.34 - 01.09.2010

For exporting the chde.xls the

readonlyd

has to run at ch.oddb.org on localhost:10013. Also the currencyd has to run on localhost:10999

I also had to change the require path for

multilingual

from

oddb.org/src/remote/galenic_group.rb:#require 'oddb/util/multilingual'

to

/oddb.org/src/remote/galenic_group.rb:require 'src/remote/multilingual'

10.14 - 01.09.2010

The

/var/www/de.oddb.org/lib/oddb/drugs/sequence.rb

should not be overwritten with the

sequence.rb (68 lines of code)

file from the pure ODDB (64 lines of code)

Library, or the Painfo.yaml and Fachinfo.yaml will fail with a

undefined method 'cascading_name' for #<ODDB::Drugs::Sequence:0xb5080fec>

error.

16.36 - 30.08.2010

Always execute the the jobs of de.oddb.org from ../jobs otherwise the scripts will create a var directory in the jobs directory. And you don't want that!

I also noted that if you do not use the plain ODDB Library from the scm but only the files from

de.oddb.org/lib/oddb/

then you will have to add some files from the pure ODDB-Library. Follow the errors you get when you start-up

bin/oddb

08.30 - 30.08.2010

Running

sudo ./export_fachinfos

results in

/usr/lib/ruby/1.8/net/smtp.rb:562:in 'check_auth_args': both user and secret are required (ArgumentError)

from /home/zeno/.software/de.oddb.org/lib/oddb/util/smtp_tls.rb:8:in `do_start'
from /usr/lib/ruby/1.8/net/smtp.rb:377:in `start'
from /usr/lib/ruby/1.8/net/smtp.rb:315:in `start'
from /usr/lib/ruby/site_ruby/1.8/oddb/util/mail.rb:77:in `sendmail'
from /usr/lib/ruby/site_ruby/1.8/oddb/util/mail.rb:27:in `notify_admins'
from /home/zeno/.software/de.oddb.org/lib/oddb/export/server.rb:73:in `safe_export'
from /home/zeno/.software/de.oddb.org/lib/oddb/export/server.rb:32:in `export_fachinfo_yaml'
from ./export_fachinfo_yaml:17
from /usr/lib/ruby/site_ruby/1.8/oddb/util/job.rb:16:in `call'
from /usr/lib/ruby/site_ruby/1.8/oddb/util/job.rb:16:in `run'
from ./export_fachinfo_yaml:16

There must be a configuration somewhere that sets the Mail-sending method. Looking into this now.

08.15 - 30.08.2010

This commit made the difference to start-up de.oddb.org.

scm.ywesee.com/?p=oddb/.git;a=commit;h=d59aaecbf23461cf5c677e3c49d492600909af74

The plain ODDB Library was only setup to work with the new version of ch.oddb.org. So all the files from

/var/www/de.oddb.org/lib/oddb/ where linked to

/usr/lib/ruby/site_ruby/1.8/oddb/

But the goal is to install the ODDB-Library seperatly for de.oddb.org and ch.oddb.org. The config.rb file has also been replaced by the config.rb from /var/www/de.oddb.org/lib/oddb/ as the .config.rb was setup for ch.oddb.org - see this commit:

scm.ywesee.com/?p=oddb/.git;a=blobdiff;f=lib/oddb/config.rb;h=280cedcb751c467a58178d5c2eb24efaa2541ab2;hp=35b9efca3430ba8a6e5f83068bba117d40cc381a;hb=8e9cbd2848bd20e18ef158ea520476a183053a34;hpb=70d736e9325049dcb565f995081d65fb6298af3a

11.02 - 26.08.2010

changing

# logger.error('fatal') { error } p error

in

bin/oddbd

and getting the following output

#<NameError: uninitialized constant ODDB::Util::Server> bin/oddbd:18: uninitialized constant ODDB::Util::Server (NameError)

after running

sudo bin/oddbd

08.06 - 26.08.2010

bin/exportd

seems to run just fine once I installed

fastercsv

The version online is 1.4.0. My local version of fastercsv is 1.5.3. My

bin/oddbd

crashes right after

FEHLER: Relation ?target_id_oddb_drugs_atc_code? existiert bereits FEHLER: Relation ?target_id_oddb_drugs_sequence_atc? existiert bereits

this is shortly before this message should come (as it does with bin/exportd)

I, [2010-08-26T08:03:37.025071 #26182] INFO -- start: starting export-server on druby://localhost:11001

16.23 - 25.08.2010

This file

/usr/lib/ruby/site_ruby/1.8/encoding/character/utf-8.rb

also needs a

require 'rubygems'

to get rid of the "Internal Server Error" of Apache.

I also commened out the following lines

# server = ODDB::Util::Server.new # logger.info('start') { # sprintf("starting oddb-server on %s", url) } # logger.error('fatal') { error }

in

bin/oddb

that makes de.oddb.org startup but I can not yet search. Apache still delivers some strange errors.

15:30 - 25.08.2010

I am getting on after importing the DB with zcat (same like with oddb.org) I run

sudo bin/oddbd

It results in

FEHLER: Relation ?target_id_oddb_drugs_package_code? existiert bereits

FEHLER: Relation ?target_id_oddb_drugs_package_substance? existiert bereits

FEHLER: Relation ?target_id_oddb_drugs_atc_code? existiert bereits

FEHLER: Relation ?target_id_oddb_drugs_sequence_atc? existiert bereits

.software/de.oddb.org/bin/oddbd:30: undefined method 'error' for nil:NilClass (NoMethodError)

This looks like de.oddb.org is waiting for a service but I do not know what kind of service it could be. It may also be just another strange error.

13:52 - 25.08.2010

I added

require 'rubygems'

to the following files on my local machine

/usr/lib/ruby/site_ruby/1.8/oddb/fixes/singular.rb

In the following file

/usr/lib/ruby/site_ruby/1.8/oddb/model.rb

I changed

require 'facets/module/basename'

to

require 'facet/module/basename'

this made the following error go away:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 'gem_original_require': no such file to load -- facets/module/basename (LoadError)

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/model.rb:6
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs/active_agent.rb:4:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs/active_agent.rb:4
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs.rb:1:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs.rb:1
from bin/oddbd:9:in `require'
from bin/oddbd:9

Now I am getting

/usr/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:118:in 'initialize': FATAL: Datenbank >>oddb<< existiert nicht (DBI::OperationalError)

from /usr/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:62:in `new'
from /usr/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:62:in `connect'
from /usr/lib/ruby/site_ruby/1.8/dbi.rb:424:in `connect'
from /usr/lib/ruby/site_ruby/1.8/dbi.rb:215:in `connect'
from /usr/lib/ruby/site_ruby/1.8/odba/connection_pool.rb:60:in `_connect'
from /usr/lib/ruby/site_ruby/1.8/odba/connection_pool.rb:59:in `times'
from /usr/lib/ruby/site_ruby/1.8/odba/connection_pool.rb:59:in `_connect'
from /usr/lib/ruby/site_ruby/1.8/odba/connection_pool.rb:56:in `connect'
 ... 7 levels...
from /usr/lib/ruby/site_ruby/1.8/oddb/persistence.rb:4
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from bin/oddbd:10

I guess I need the DB now.

11:00 - 25.08.2010

The following directory also did not exist on my local machine:

/usr/lib/ruby/site_ruby/1.8/fixes

instead my local machine has the directory

/usr/lib/ruby/site_ruby/1.8/oddb/fixes

but above directory is not on thinpower.

10:00 - 25.08.2010

There is a difference in the data structure of

/var/www/de.oddb.org/lib/oddb

between thinpower and the my local machine _after_ I done a git pull. There must be some files missing that where not added with

git add

The files that seem to be missing on my local machine are

business.rb text.rb

09:00 - 25.08.2010

Trying to setup de.oddb.org results in the following error:

/usr/lib/ruby/site_ruby/1.8/oddb/fixes/singular.rb:4:in 'require': no such file to load -- active_support/inflector (LoadError)

from /usr/lib/ruby/site_ruby/1.8/oddb/fixes/singular.rb:4
from /usr/lib/ruby/site_ruby/1.8/oddb/model.rb:4:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/model.rb:4
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs/active_agent.rb:4:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs/active_agent.rb:4
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs.rb:1:in `require'
from /usr/lib/ruby/site_ruby/1.8/oddb/drugs.rb:1
from bin/oddbd:9:in `require'
from bin/oddbd:9

Debugging now.

Date: 2008-08-09-11:08

Short Description: de.oddb.org is an OpenDrugDatabase that enables the search for Drugs by their ActiveAgent, Name, Producer, ATC-Code and much more. You can do a price comparison between the Original Drug and the Generic by Clicking on the Drug's Name. The database tells you a lot about the officially registerted Drugs in Germany (In Germany any drug on the market needs to be registered at Bfarm - Bundesinstitut f?r Arzneimittel). ODDB.org exports the complete Data in the YAML.org Format (34117 registred products at the moment).

For for more information about the background see:

* http://www.ywesee.com

* www.oddb.org * dev.ywesee.com

License


* GPLv2.0

Source Code Download with GIT


* URL: http://scm.ywesee.com/de.oddb.org

Background


A discussion on www.linuxmednews.org

Post by Zeno: In Switzerland we have the problem that there is only one provider of the data. And that provider serves all hospitals, doctors, old age homes, pharmacies etc. As they have the monopoly the could issue a tax on every transaction that is done with there data; Example: The docotor in the hospital prescribes one drug to the patient. That info goes into the system and then gets passed on the specialist (external of hospital) and then gets passed on to the insurance etc. Imagine you must pay 50cent for every transaction of the data...

Post by Tim: This certainly carries some pretty scary scenarios. Are there not laws to prevent abuse? It would seem that a government monoploy has been issued here and there would be protections in place.

Post by Zeno: 1. Yes, that is exactly the problem. The company that has the monopoly also is working for the government and administrating the database of all drugs that are covered by the public health insurance.

2. I have taken the above issues to antitrust department and the 'price governing' department of Switzerland. The first pushed the issue to the second and vice versa. I then contacted the leading consumer representative of Switzerland and she gave the issue some momentum.

3. The result of the above was ch.oddb.org an independent database for Switzerland. My personal interest is the acceleration of the electronic data interchange in the healthcare industry. This can only take place on open standards.

More here:

* http://www.ywesee.com/pmwiki.php/Main/WekoBlog

* www.ywesee.com/pmwiki.php/Main/Bundesgerichtsurteil

Requirements


1 ruby 1.8, mod_ruby, drbsession, spreadsheet
2 apache, ruby-zlib, rubyzip, tarsimple, madeleine, rockit, tmail
3 rpdf2txt, rwv2, htmlgrid, datastructure, parseexcel, ywesee session-management

Note: For 1 and 2 please search with Google. For 3 please download from * scm.ywesee.com

Install


Just copy everything into a directory of your choice, Configure your favorite Webserver to serve the $ODDBDIR/doc directory and to rewrite urls as follows: your.tld/(w2)/(w+)/(w+)/(w+) => your.tld/index.rbx?language=1&flavor=2&3=4 If you're interested in having the data that we provide online we can send you our ODBA snapshot. Please contact us at [email protected]

Install Instructions


* http://dev.ywesee.com/wiki.php/Oddb/InstallOddb

Usage


* Normal Consumer
* Health Insurance (Krankenkasse)
* Pharmacie
* Hospital
* Doctor / Physician
* Pharma Marketing

Authors


* ywesee GmbH
* Hannes Wyss <[email protected]>

Author of this README


* Zeno Davatz <[email protected]>