<< | Index | >>
suspend
Commit
If the Swissmedic-Importer finds no data in Column O of Packungen.xls then the active agent information will not be saved and also the package information will not be saved. You will have to add the active agent manually and also you will have to hit the "save" button in the package information manually for the product to show up in the search result. That will also make the active agent show up in the search result of "Neue Registrierungen" . This happend in November 2011 with Donepezil Actavis because Packungen.xls contained no data in the column O.
Problem
Note
Replace
Updates
def check_model #if(@model.pointer != @session.user_input(:pointer)) # @errors.store :pointer, create_error(:e_state_expired, :pointer, nil) #elsif !allowed?unless iksnr = @session.user_input(:reg) and seqnr = @session.user_input(:seq) and ikscd = @session.user_input(:pack)\
and reg = @session.app.registration(iksnr) and seq = reg.sequence(seqnr) and pac = seq.package(ikscd)\
and @model.pointer == pac.pointer
@errors.store :pointer, create_error(:e_state_expired, :pointer, nil)
end
if !allowed?
@errors.store :pointer, create_error(:e_not_allowed, :pointer, nil) end end
def add(model)
link = HtmlGrid::Link.new(:plus, model, @session, self)
link.set_attribute('title', @lookandfeel.lookup(:create_part))
link.css_class = 'create square'
#args = [ :pointer, @session.state.model.pointer ]
args = [ :reg, @session.state.model.iksnr, :seq, @session.state.model.seqnr, :pack, @session.state.model.ikscd ]
url = @session.lookandfeel.event_url(:ajax_create_part, args)
link.onclick = "replace_element('#{css_id}', '#{url}');"
link
end
Updates
def ajax_delete_part
check_model
#keys = [:pointer, :part]
keys = [:reg, :seq, :pack, :part]
input = user_input(keys, keys)
if(!error? && (part = @model.parts[input[:part].to_i]))
@session.app.delete part.pointer
end
AjaxParts.new(@session, @model.parts)
end
def delete(model)
if(@model.size > 1)
link = HtmlGrid::Link.new(:minus, model, @session, self)
link.set_attribute('title', @lookandfeel.lookup(:delete))
link.css_class = 'delete square'
#args = [ :pointer, @session.state.model.pointer, :part, @list_index ]
args = [ :reg, @session.state.model.iksnr, :seq, @session.state.model.seqnr, :pack, @session.state.model.ikscd, :part, @list_index ]
url = @session.lookandfeel.event_url(:ajax_delete_part, args)
link.onclick = "replace_element('#{css_id}', '#{url}');"
link
end
end
suspend
Problem
Experiment
ch.oddb> search_by_sequence('donepezil') -> Donepezil ch.oddb> search_by_sequence('donepezil').class -> Array ch.oddb> search_by_sequence('donepezil').length -> 1 ch.oddb> search_by_sequence('donepezil').first.class -> ODDB::AtcClass ch.oddb> search_by_sequence('donepezil').first.packages.select{|pac| pac.name =~ /Donepezil Actavis/}.length -> 8 ch.oddb> search_by_sequence('donepezil').first.active_packages.select{|pac| pac.name =~ /Donepezil Actavis/}.length -> 0 ch.oddb> search_by_sequence('donepezil').first.packages.select{|pac| pac.name =~ /Donepezil Actavis/}[6].odba_id -> 27652198
ch.oddb> registration('61815').sequence('02').package('026').public? -> true ch.oddb> registration('61815').sequence('02').package('026') -> #<ODDB::Package:0x7f5a15661950> ch.oddb> registration('61815').sequence('02').package('026').name -> Donepezil Actavis 10 mg, Filmtabletten ch.oddb> registration('61815').sequence('02').package('026').public? -> true ch.oddb> registration('61815').sequence('02').package('026').odba_id -> 27652198
ch.oddb> registration('61815').sequence('02').public? -> false ch.oddb> registration('61815').public? -> true ch.oddb> registration('61815').sequence('02').package('026').public? -> true
def public? !@export_flag && @registration.public? && active? end
Experiment
ch.oddb> registration('61815').sequence('02').export_flag.class -> NilClass ch.oddb> registration('61815').public? -> true ch.oddb> registration('61815').sequence('02').active? -> false
def active? (!@inactive_date || (@inactive_date > @@two_years_ago)) \ && @registration && @registration.active? && !violates_patent? end
Experiment
ch.oddb> registration('61815').sequence('02').instance_variable_get('@inactive_date').class -> NilClass ch.oddb> registration('61815').active? -> true ch.oddb> registration('61815').sequence('02').violates_patent? -> true
Interim summary
Next
Experiment
$ sudo -u postgres dropdb oddb.org; sudo -u postgres createdb -E UTF8 -T template0 oddb.org $ zcat data/sql/oddb.org.20111111.sql.gz |psql -U postgres oddb.org
Search 'donepezil'
Check
ch.oddb> registration('61815').sequence('02').public? -> true
From Davatz-san
This seems to be related to: http://ch.oddb.org/de/gcc/drug/reg/61815 then see the checkbox Wird ohne "Patent-unabhängig" aufgrund eines Patentkonflikts nicht angezeigt.