view · edit · sidebar · attach · print · history




  • Fix parse-error fachinfo/reg/65447
  • Use refdata to import doctors
  • remove feedback from migel
  • Keep in Mind



Fix parse-error fachinfo/reg/65447

When visiting we get "Fachinformation zu Coop Vitality Grippe & Erkältung" in the title

bin/admin shows

ch.oddb> registration('65447')
-> Coop Vitality Grippe & Erkältung

When visiting the changelog (eg. we find that the title is shown correctly as "70 Änderungen an Fachinfo Coop Vitality Grippe & Erkältung"

Looking at the logs and the xxtracted XML /var/www/

I see that the XML-content in the file is already wrong <title>Coop Vitality Grippe &#038; Erkältung</title>

We must also fix the error when visiting This URL displays correctly now, but had the following error on december 1.

NoMethodError: undefined method `name' for "1.9":String
  (drbssl://localhost:9997) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1624:in `perform_without_block'
  (drbssl://localhost:9997) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1584:in `perform'
  (drbssl://localhost:9997) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1668:in `block (2 levels) in main_loop'
  (drbssl://localhost:9997) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `loop'
  (drbssl://localhost:9997) /usr/local/ruby-2.4.0/lib/ruby/2.4.0/drb/drb.rb:1664:in `block in main_loop'
  /var/www/ `remote_call'
  /var/www/ `name'
  /var/www/ `sponsor_or_logo'
  /var/www/ `personal_logo'
  /var/www/ `create'
  /var/www/ `compose_component'
  /var/www/ `block in compose'
  /var/www/ `each'
  /var/www/ `compose'                                                                                                                              /var/www/ `init'
  /var/www/ `init'                                                                                                                                                                             /var/www/ `initialize'
  /var/www/ `new'
  /var/www/ `head'
  /var/www/ `create'                                                                                                                                /var/www/ `compose_component'
  /var/www/ `block in compose'
  /var/www/ `each'                                                                                                                                 /var/www/ `compose'
  /var/www/ `init'                                                                                                                                  /var/www/ `init'
  /var/www/ `init'                                                                                                                                                                      /var/www/ `initialize'
  /var/www/ `new'                                                                                                                                              /var/www/ `view'                                                                                                                                             /var/www/ `to_html'                                                                                                                                          /var/www/ `to_html'                                                                                                                                        /var/www/ `block in process_rack'                                                                                                                          /var/www/ `synchronize'                                                                                                                                    /var/www/ `process_rack'                                                                                                                                   /var/www/ `call'                                                                                                                                               /var/www/ `_call'                                                                                                                                              /var/www/ `call'                                                                                                                                               /var/www/ `call'                                                                                                                                    /var/www/ `call'                                                                                                                                     /var/www/ `call'                                                                                                                                            /var/www/ `call'                                                                                                                                    /var/www/ `call'                                                                                                                                    /var/www/ `call'                                                                                                                                    /var/www/ `_call'                                                                                                                                              /var/www/ `call'                                                                                                                                               /var/www/ `call'                                                                                                                                    /var/www/ `call'                                                                                                                                            /var/www/ `call'                                                                                                                                     /var/www/ `service'                                                                                                                                 /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:in `service'                                                                                                                                                     /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in `run'                                                                                                                                                          /usr/local/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:in `block in start_thread'                                                                                                                                           ODDB::View::LogoHead::COMPONENTS[[1, 0]] in create(personal_logo)                                                                                                                                                               ODDB::View::Doctors::RootDoctor::COMPONENTS[[0, 0]] in create(head)                                                                                                                                                  - - [01/Dec/2017 08:43:08] "GET HTTP/1.1" 500 148273 46.1762  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.70 Saf

Use refdata to import doctors

For doctors we must only import the address if there is none or we cannot find the PLZ in one of the addresses of doctor.

Looking for the test data via bin/admin

-> ["Mäderstr. 13", "5400 Baden (Zürich)"]
ch.oddb> doctor_by_gln(7601000159199).addresses.last.lines_without_title
-> ["Winterthurerstr. 52", "8006 Zürich (Zürich)"]
ch.oddb> doctor_by_gln(7601000159199).addresses.size
-> 2

Remarked that we do only display pharmacies via the old methods, and not compyanies which have a business unit pharma. E.g

ch.oddb> (companies.values.find_all{|x| x.is_pharmacy?}.collect{|x| x.ean13} - hospitals.values.collect{|x| x.ean13}).first
-> 7601001401419

Adding also support for parsing the hospitals. Running the import. Removing too verbose output. Place a pry statement when getting the details failed. Corrected an error and running import again.

Once the importer has finished I must check de/gcc/search/zone/pharmacies/search_query/7601001017795 (create) and 7601002022842 (update) and check whether my comparision for addresses is good or whether it will create new addresses each time.

Reworked comparing two different addresss, to return a human readable diff.

Pushed commits

Skipping getting the details

remove feedback from migel

This should not be too difficult.

view · edit · sidebar · attach · print · history
Page last modified on December 04, 2017, at 05:34 PM