<< Masa.20101018-update-xls2odat | 2010 | Masa.20100927-search-link-between_sl_entry_and_limitation_text >>
suspend
suspend
Default
Test code
src/plugin/bsv_xml.rb
# in order to refresh limitation text old objects in ODBA cache before updating # otherwise, the link between sl_entry and limitation_text may not produced # even if there are both objects in ODBA cache if sl_entry.limitation_text || txt_ptr.resolve(@app) @app.delete txt_ptr end @app.update txt_ptr.creator, lim_data, :bag
Result
Ticket 242 result Before
After
Davatz-san's mail
We need to get table 7 for xls2odat 3.0 Export right. Please see the attached conf-file file. See the fields 07 4 07 6 An iteration for the same price would look like this: 07|20071011000000|15866|PPUB|4|17.15||| 07|20071011000000|15866|PSL1|4|7.61||| The codes that can be set are PPUB = public price PPHA = chemist‟s price PEXF = Ex-Factory price PDOC = doctor‟s price (for example IVF supplier)
Second task:
Here is the update config file for Galdat 3.0 The filenames for galdat 3.0 should be s01x and following. For the future: h01x would just be Mutation. But that is not necessary at the moment. If xls2odat detects that there is a table 7 specified in conf.xls then the files names should start with s01x s03x [ this is Galdat 3.0 nameing convention ] s07x etc. If there is no table 7 specified in conf.xls then the file names should be H01 H03 [ this is Galdat 2.1 nameing convention ] H07 etc. Also if there _is_ a table 7 there then we do not need any logfiles. If there is _no_ table 7 in the conf.xls we do need the *.LOG files.
BraSt for Solution (task 1)
Notes (task 2)
Confirm the current result
masa@masa ~/ywesee/xls2odat $ ruby -I lib bin/xls2odat conf_gal3.xls Biopartner_neu.xls
Result
masa@masa ~/ywesee/xls2odat $ ls bin conf_gal3.xls doc H01 H03 H06 H07 H19 lib README test Biopartner_neu.xls conf_gal3.xls.org galdat_3.0_2010.pdf H01.LOG H03.LOG H06.LOG H07.LOG H19.LOG LICENSE setup.rb xls2odat-1.1.2.gem
H07
07|20100928|30000000|PPUB|1|1.75 07|20100928|30000001|PPUB|1|1.9 07|20100928|30000002|PPUB|1|1.3 .....
Goal (z.B.)
07|20100928|30000000|PPUB|1|1.75 07|20100928|30000000|PPHA|1|2.75 07|20100928|30000001|PPUB|1|1.9 07|20100928|30000001|PPHA|1|2.9 07|20100928|30000002|PPUB|1|1.3 07|20100928|30000002|PPHA|1|2.3 .....
Restore the algorithm in my brain
xls2odat
...reviewing...
Notes
Test first
test/test_xls2odat.rb
def test_analyzer # iteration aseert_equal "AAA", @parser.send(:analyzer, '"AAA","BBB"', row, @data)
Confirm to fail
masa@masa ~/ywesee/xls2odat $ ruby test/test_xls2odat.rb Loaded suite test/test_xls2odat Started F Finished in 0.019698 seconds. 1) Failure: test_analyzer(Xls2odatTest) [test/test_xls2odat.rb:127]: <"AAA"> expected but was <"AAA\",\"BBB">. 1 tests, 12 assertions, 1 failures, 0 errors
Update the method
lib/xls2odat.rb
masa@masa ~/ywesee/xls2odat $ ruby test/test_xls2odat.rb Loaded suite test/test_xls2odat Started . Finished in 0.017786 seconds. 1 tests, 17 assertions, 0 failures, 0 errors
Test it for actual data
07|20100928|30000000|PEXF|1|1.12 07|20100928|30000000|PPUB|1|1.75 07|20100928|30000001|PEXF|1|1.51 07|20100928|30000001|PPUB|1|1.9 .....
Error
masa@masa ~/work/xls2odat $ gem build xls2odat.gemspec WARNING: no rubyforge_project specified ERROR: While executing gem ... (NoMethodError) undefined method `>' for nil:NilClass masa@masa ~/work/xls2odat $ gem -v 1.3.7
suspend
Task
Algorithm