view · edit · sidebar · attach · print · history

20110406-testcases-oddb_org-view-some-plugin-swissmedic_rb-model-part_rb

<< | Index | >>


  1. Update testcases
  2. Update renewal_flag_swissmedic

Goal/Estimate/Evaluation
  • Testcases / 81% / 81.21%
Milestones
  • Update testcases
    1. test_plugin/swissmedic.rb (coverage: 97.21%) 9:15
    2. src/view/admin/entity.rb (coverage: 100%) 9:30
    3. src/view/drugs/result.rb (coverage: 100%) 10:40
    4. src/view/analysis/position.rb (coverage: 100%) 14:00
    5. src/view/doctors/doctor.rb (coverage: 100%) 15:00
    6. src/model/part.rb (coverage: 95.79%) 16:30
    7. src/view/chapter.rb (coverage: 73.68%)
Summary
Commits

Update renewal_flag_swissmedic

I change the condition to set renewal_flag_swissmedic, not 'today' but 'the first day of month'

src/plugin/swissmedic.rb#update_registration

    def update_registration(row, opts = {})
      first_day = Date.new(@ @today.year, @ @today.month, 1)
      #opts = {:date => @ @today, :create_only => false}.update(opts)
      opts = {:date => first_day, :create_only => false}.update(opts)
      #opts[:date] ||= @ @today
      opts[:date] ||= first_day

Add the records in March 2011 to data/xls/Packungen-latest.xls

Run (from bin/admin)

  • Updater.new(self).update_swissmedic
  • Updater.new(self).export_oddb_csv

Result

 anthroposophy                      294
 bsv_dossiers                      3312
 complementary                      282
 deductible_g                      8625
 deductible_o                        49
 duplicates                           0
 expiration_date                  21913
 export_registrations               668
 galenic_forms                      324
 generics                          4661
 has_generic                          0
 homeopathy                         810
 inactive_date                     4311
 limitation_both                    142
 limitation_points                  142
 limitation_texts                  1324
 limitations                       1324
 lppv                               597
 missing_size                        28
 originals                         2130
 out_of_trade                      3439
 phytotherapy                      1334
 price_exfactory                   9854
 price_public                     12383
 registration_date                23546
 renewal_flag                       214
 renewal_flag_swissmedic             41
 routes_of_administration             0
 sl_entries                        8674

Commit

Memo (vi, save yank history)

Refer: http://d.hatena.ne.jp/fuenor/20090213/1234547016

.vimrc

nmap <silent> Y   Y:CpR0toR1<CR>
vmap <silent> Y   Y:CpR0toR1<CR>
vmap <silent> y   y:CpR0toR1<CR>
omap <silent> y   y:CpR0toR1<CR>
command! CpR0toR1 if @0 =~ "\<NL>"|let @9=@8|let @8=@7|let @7=@6|let @6=@5|let @5=@4|let @4=@3|let @3=@2|let @2=@1|let @1=@0|endif

How to use

"1pu.u.u.u.u

Check register

:di
view · edit · sidebar · attach · print · history
Page last modified on April 07, 2011, at 04:39 PM