I must fix a CSS issue, because we must have green background for the print field. Background is now okay, but the print cell is not moved to the left when no change_log is present.
Pushed commits
Fixing wrong references to fachinfo in patinfo changelog. Fixed with commit Display correct patinfo values for its changelog
Must fix a failing unit test. Done with commit Fix unit-tests for change_logs
The heading of a patient info diff still displays "Fachinfo". Needed a small refactoring with commit Moved change_log states into separate file, then fixed the problem with Display correct heading for patient changelogs
Some links do not work correctly, eg. following Änderungen in http://ch.oddb.org/de/gcc/show/patinfo/56195/01/002/diff/23.08.2017 goes to http://ch.oddb.org/de/gcc/show/patinfo/56195/01/002/diff/23.08.2017/diff instead of http://ch.oddb.org/de/gcc/show/patinfo/56195/01/002/diff. Cl. Also following "Patienteninformation zu Ezetrol" leads to http://ch.oddb.org/de/gcc/patinfo/reg/56195 instead of http://ch.oddb.org/de/gcc/patinfo/reg/56195/seq/01/pack/002
Running the snapback_spec test would have spotted the error with the fachinfo. Moved this test to spec/changelog_spec.rb, added tests for fachinfo and patinfo and that the backlink to the orginal PI/FI works, too.
Fixed the problem with commit Fix backtracking and add spec tests for change_logs
When entering atcless and selecting price comparision in the pop down menu, we get a list of all atc_less sequences.
Now I must add a similar search for drug_shortage. This was easy (using either drug_shortage or drugshortage), works. With no additional effort we get the following view.
This view can be sorted by the columns like name or company. Pushed commit Added special search drug_shortage
I propose to sort in this case the packages alphabetically. This should be enough. Adding the following lines would do the job.
diff --git a/src/state/drugs/result.rb b/src/state/drugs/result.rb index ff01fd1..1b8a460 100644 --- a/src/state/drugs/result.rb +++ b/src/state/drugs/result.rb @@ -29,6 +29,10 @@ class Result < State::Drugs::Global @pages = [] @model.session = @session @model.atc_classes.delete_if { |atc| atc.package_count == 0 } + if /drug(_?)shortage/i.match(@session.persistent_user_input(:search_query)) && !@session.user_input(:sortvalue) + @sortby = [:name_base] + sort + end if(@model.atc_classes.nil? || @model.atc_classes.empty?) @default_view = ODDB::View::Drugs::EmptyResult elsif(@model.overflow?)
Consists of
I think I should also remove the ydocx gem and from state/admin the parse_fachinfo_docx.
Now I am running the full test suite to see, whether I introduced any errors.
Running the unit tests passed. The spec tests have still the following 29 failures:
Finished in 50 minutes 48 seconds (files took 1.95 seconds to load) 187 examples, 29 failures, 39 pending Failed examples: rspec ./spec/admin_spec.rb[1:1] # ch.oddb.org should be possible to upload dummy_patinfo.pdf to a given package rspec ./spec/admin_spec.rb[1:2] # ch.oddb.org should be possible to upload dummy_patinfo_2.pdf to a given package rspec ./spec/admin_spec.rb:129 # ch.oddb.org should be possible to create a CompanyUser rspec ./spec/download_spec.rb:27 # ch.oddb.org should download the results of a search to Marcoumar rspec ./spec/home_2_list_spec.rb:68 # ch.oddb.org in home_companies we should see all companies when logged in as user rspec ./spec/home_2_list_spec.rb[1:1:1] # ch.oddb.org in home_companies we should find the corresponding list of companies rspec ./spec/home_2_list_spec.rb[1:2:1] # ch.oddb.org in home_hospitals we should find the corresponding list of hospitals rspec ./spec/home_2_list_spec.rb[1:2:2] # ch.oddb.org in home_hospitals we should find ranges in http://oddb-ci2.dyndns.org/de/gcc/home_hospitals rspec ./spec/home_2_list_spec.rb[1:3:1] # ch.oddb.org in home_pharmacies we should find the corresponding list of pharmacies rspec ./spec/home_2_list_spec.rb[1:3:2] # ch.oddb.org in home_pharmacies we should find ranges in http://oddb-ci2.dyndns.org/de/gcc/home_pharmacies rspec ./spec/home_2_list_spec.rb:82 # ch.oddb.org admin in home_companies we should see all companies when logged in as admin rspec ./spec/home_2_list_spec.rb:87 # ch.oddb.org admin in home_companies we should have the link active_companies if logged in as admin rspec ./spec/paypal_spec.rb:86 # ch.oddb.org should be possible to checkout oddb.csv via paypal rspec ./spec/paypal_spec.rb:144 # ch.oddb.org should return a correct link to a CSV file if the payment is okay rspec ./spec/paypal_spec.rb:169 # ch.oddb.org should not download a CSV file if the payment was not accepted rspec ./spec/paypal_spec.rb:185 # ch.oddb.org should be possible to cancel a paypal before login rspec ./spec/paypal_spec.rb:198 # ch.oddb.org should be possible to cancel a paypal after login but before paying rspec ./spec/rezept_and_instantsearch_spec.rb:452 # ch.oddb.org should not loose existing comment after adding a new prescription rspec ./spec/rezept_and_instantsearch_spec.rb:571 # ch.oddb.org should be possible to print a presciption with 10 drugs rspec ./spec/rss_spec.rb[1:1] # ch.oddb.org should have a working RSS-feed hpc rspec ./spec/rss_spec.rb[1:2] # ch.oddb.org should have a working RSS-feed price_cut rspec ./spec/rss_spec.rb[1:3] # ch.oddb.org should have a working RSS-feed price_rise rspec ./spec/rss_spec.rb[1:4] # ch.oddb.org should have a working RSS-feed recall rspec ./spec/rss_spec.rb[1:5] # ch.oddb.org should have a working RSS-feed sl_introduction rspec ./spec/rss_spec.rb[1:6] # ch.oddb.org should have a working RSS-feed fachinfo rspec ./spec/rss_spec.rb:67 # ch.oddb.org should have a working fachinfo-2008 rspec ./spec/searchbar_spec.rb[1:2] # ch.oddb.org should be possible to find 1,25-Dihydroxycholecalciferol when searching via 125 in analysen rspec ./spec/searchbar_spec.rb:339 # ch.oddb.org should show no drugs for Fortex via unwanted effects search rspec ./spec/searchbar_spec.rb:391 # ch.oddb.org should set best_result when searching Rivoleve via search_type