<< | Index | >>
swissreg server is still error.
I could not confirm code-changes.
Maybe Configuration of Apache and Tomcat.
Plugin: ODDB::SwissregPlugin Error: RuntimeError Message: could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x00000002eeecb8> Backtrace: (druby://localhost:10007) /var/ch.oddb.org/src/util/http.rb:86:in `post' (druby://localhost:10007) /var/ch.oddb.org/ext/swissreg/src/session.rb:115:in `post' (druby://localhost:10007) /var/ch.oddb.org/ext/swissreg/src/session.rb:106:in `get_result_list' (druby://localhost:10007) /var/ch.oddb.org/ext/swissreg/src/swissreg.rb:10:in `search' ...
These value is not handled correctly by redirects on swissreg.ch.
Check request headers.
"POST https://www.swissreg.ch/srclient/faces/jsp/trademark/sr1.jsp HTTP/1.1\r\n Host: www.swissreg.ch\r\n User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0\r\n Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n Accept-Language: de-ch,en-us;q=0.7,en;q=0.3\r\n Accept-Charset: UTF-8\r\n Keep-Alive: 300\r\n Connection: keep-alive\r\n Cookie: JSESSIONID=90DF4CE295F976F7430016905CDC25B3.tomcat01\r\n Content-Type: application/x-www-form-urlencoded\r\n Content-Length: 441\r\n\r\n" <- "autoScroll=0%2C0&id_swissreg%3AmainContent%3Aid_txf_tm_no=&id_swissreg%3AmainContent%3Aid_txf_app_no=&id_swissreg%3AmainContent%3Aid_txf_tm_text=Albumin*&id_swissreg%3AmainContent%3Aid_txf_applicant=&id_swissreg%3AmainContent%3Asub_fieldset%3Aid_submit=suchen&id_swissreg_SUBMIT=1&id_swissreg%3A_idcl=&id_swissreg%3A_link_hidden_=&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAExcHQADi9qc3Avc3RhcnQuanNw"
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding gzip, deflate Accept-Language en-US,en;q=0.5 Connection keep-alive Cookie JSESSIONID=BD12C08F38C2FBF3B171EF1D97C49677.tomcat01 Host www.swissreg.ch Referer https://www.swissreg.ch/srclient/faces/jsp/trademark/sr1.jsp User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 autoScroll=0%2C0&id_swissreg%3AmainContent%3Aid_txf_tm_no=&id_swissreg%3AmainContent%3Aid_txf_app_no=&id_swissreg%3AmainContent%3Aid_txf_tm_text=Albumin*&id_swissreg%3AmainContent%3Aid_txf_applicant=&id_swissreg%3AmainContent%3Asub_fieldset%3Aid_submit=suchen&id_swissreg_SUBMIT=1&id_swissreg%3A_idcl=&id_swissreg%3A_link_hidden_=&javax.faces.ViewState=rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAIyM3B0ABYvanNwL3RyYWRlbWFyay9zcjEuanNw
oddb2.csv has wrong records, because current oddb2.csv hat broken connections on 04.01.
Currently, FI/PI data in database are already fine. (descriptions)
Then I export oddb2.csv via Job.
def export_oddb2_csv(date = @@today) subj = 'oddb2.csv' wrap_update(CsvExportPlugin, subj) { plug = CsvExportPlugin.new(@app) plug.export_drugs_extended log = Log.new(date) log.update_values(log_info(plug)) log.notify(subj) } end
keys.
def export_drugs_extended @options = { :compression => 'zip' } recipients.concat self.class::ODDB_RECIPIENTS_EXTENDED _export_drugs 'oddb2', [ :rectype, :iksnr, :ikscd, :ikskey, :barcode, :bsv_dossier, :pharmacode, :name_base, :galenic_form_de, :galenic_form_fr, :most_precise_dose, :size, :numerical_size_extended, :price_exfactory, :price_public, :company_name, :ikscat, :sl_entry, :introduction_date, :limitation, :limitation_points, :limitation_text, :lppv, :registration_date, :expiration_date, :inactive_date, :export_flag, :casrn, :generic_type, :has_generic, :deductible, :out_of_trade, :c_type, :route_of_administration, :galenic_group_de, :galenic_group_fr ] end
model = @app.atc_classes.values.sort_by { |atc| atc.code }
Confirm via bin/admin
ch.oddb> res = []; atc_classes.values.map {|atc| res.concat(atc.active_packages) }; res[6000].galenic_forms.first.description('de') -> Retard-Kapseln ch.oddb> res = []; atc_classes.values.map {|atc| res.concat(atc.active_packages) }; res[6000].galenic_forms.first.description('fr') -> Capsules retard