view · edit · sidebar · attach · print · history

20130418-update-swissregd-medwin-updater

<< | Index | >>


Summary

  • Update swissreg updater Report
  • Update MedWin Updater

Commits

Index


Update swissreg-updater-report

change_flags (Updater target) come from swissmedic updater.

    def update_news
      substances = []
      if((group = @app.log_group(:swissmedic)) && (log = group.latest))
        log.change_flags.each_key { |ptr|
          if(reg = ptr.resolve(@app))
            @registrations += 1
            update_registrations(reg.iksnr)
          end
        }
      end 
    end
[1] 1.9.3-p194(#<ODDB::SwissregPlugin>)> log.change_flags.values.length
=> 134

Almost iksnrs are not found in swissreg.ch

"00705"
"14825"
"20550"
"21672"
"29792"
"29800"
"30219"
"30724"
...
"49714"
"50353"
"51908"
"52342"
"53055"
"53112"
"54024"
...

Add Updates/Failures/NotFound to Report.
And add Registrations count, also.

Checked   134 Registrations
Found       14 Patents
of which    14 had a Swissmedic-Number.
                16 Registrations were successfully updated;
for these    0 Swissmedic-Numbers no Registration was found:


Uppdates:
52277 -> https://www.swissreg.ch/srclient/faces/jsp/spc/sr300.jsp?language=de&section=spc&id=C00077754/01
54282 -> https://www.swissreg.ch/srclient/faces/jsp/spc/sr300.jsp?language=de&section=spc&id=C00129748/01
54510 -> https://www.swissreg.ch/srclient/faces/jsp/spc/sr300.jsp?language=de&section=spc&id=C00430930/01
54708 -> https://www.swissreg.ch/srclient/faces/jsp/spc/sr300.jsp?language=de&section=spc&id=C00136011/02
55297 -> https://www.swissreg.ch/srclient/faces/jsp/spc/sr300.jsp?language=de&section=spc&id=C00162036/01
...

Failures:

NotFound:
51482
52055
02167
...
commit

Update MedWin Updater

  • update_medwin_companies
Plugin: ODDB::MedwinCompanyPlugin
Error: NoMethodError
Message: undefined method `strip' for nil:NilClass
Backtrace:
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1435:in `block in initialize_http_header'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1433:in `each'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1433:in `initialize_http_header'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1862:in `initialize'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:2093:in `initialize'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1307:in `new'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1307:in `send_entity'
(druby://localhost:10006) /path/to/lib/ruby/1.9.1/net/http.rb:1096:in `post'
(druby://localhost:10006) /var/ch.oddb.org/src/util/http.rb:77:in `post'
(druby://localhost:10006) /var/ch.oddb.org/ext/meddata/src/session.rb:100:in `get_result_list'

Some pages in medwin.ch return response with strage encoding.
And some times medwin.ch does not respoend for any request... (return Timeout::Error)

Plugin: ODDB::MedwinCompanyPlugin
Error: ArgumentError
Message: invalid byte sequence in UTF-8
Backtrace:
(druby://localhost:10006) /var/ch.oddb.org/ext/meddata/src/session.rb:86:in `match'
(druby://localhost:10006) /var/ch.oddb.org/ext/meddata/src/session.rb:86:in `handle_resp!'
Plugin: ODDB::MedwinCompanyPlugin
Error: Timeout::Error
Message: Timeout::Error - www.medwin.ch is not responding

And response contains illegal code.

[4] 1.9.3-p194(#<ODDB::HttpSession::ResponseWrapper>)> cd = Iconv.new('UTF-8', charset)
=> #<Iconv:0x000000018bf578>
[5] 1.9.3-p194(#<ODDB::HttpSession::ResponseWrapper>)> cd.iconv body
Iconv::IllegalSequence: "\x8B\b\x00\x00\x00\x00\x00\x00\v\xC5\\\xDBr\xE2H\x9A"...
from (pry):5:in `iconv'

Some MedWin contents has encoding as iso-8859-1. but Server returns as UTF-8 in frames.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="VBScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">

Firefox also says,

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.
  • Prevent Timeout::Error by Request Sequences.
  • Ignore these invalid Responses.
commit
view · edit · sidebar · attach · print · history
Page last modified on April 18, 2013, at 11:05 AM