could not connect to www.swissreg.ch: #<Net::HTTPInternalServerError:0x007f8a7d69bb58>
---
Must correct import of medical products to attache a fachinfo to each combination of iksrn, ikscat and ikscd. Must look at the whole code to catch code which gets the fachinfo from a package or a sequence using the old (now no longer unique) definition that a fachinfo belongs to all combinations of ikcscat/ikcscd of a given iksnr.
We must fix src/model/package.rb
But first make our tests fail! But at the moment there is no test for fachinfo in test/test_model/package.rb.
Reworked the unit-tests in test_model/package.rb use more real classes. Two comparables test don't work as intended.
When importing pseudo-fachinfo I cannot reuse storing/updating fachinfo from plugin/text_info.rb as the fachinfo is store in packages and not in the registration.
Also removing the old '00' sequences must be done. And we have no clues on howto remove obsolete sequences from newer pseudo-fi.
As after running my new import I cannot see the new results for the search of sinovial (not even after restarting bin/oddbd and running rebuild_indices) I am convinced that we must use a 10-digit (character 3..12) from the ean13. This would allow us to reuse a known working schema namely 1 IKSRN (chars 3..12) with 1 sequence (chars 8..9) and 1 package (chars 10..12). Because moving the fachinfo (which is localized) and accessing it via the package an no longer the registration would just ripple way too many changes throughout the code without any tangible benefit. There I propose to throw away my work of this day and restart again.
Also in order to avoid a costly migration, we should just use a few bin/admin statement to get rid of all existing pseudo-fachinfo and reimport the 3 Pseudo-FIs again.
Therefore throwing away locally these two patches: Attach:pseudo_pi_patch_1.txt and Attach:pseudo_pi_patch_2.txt
The problem is that now we only the display the actual value of the ikscat field, but do not offer a drop down list of the possible values. via bin/admin verified that the displayed value 'B' is really the value.
registration('47703').package('034').ikscat -> B
Therefore examining the changes in src/view/drugs/package.rb. On oddb-ci2 both packages 018 and 034 had 'B'
Changing via bin/admin goes like this
registration('47703').package('018').ikscat = 'C' -> C rgistration('47703').package('018').odba_store -> #<ODDB::Package:0x007f22d41ac5b8>
Survives restarting oddbd. And displays correctly the C.