Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reparse not working for 59174 63164 51601 #294

Open
zdavatz opened this issue Dec 10, 2024 · 6 comments
Open

Reparse not working for 59174 63164 51601 #294

zdavatz opened this issue Dec 10, 2024 · 6 comments

Comments

@zdavatz
Copy link
Owner

zdavatz commented Dec 10, 2024

  1. The reparse is not working for these Patinfos
  2. bundle exec ruby jobs/update_textinfo_swissmedicinfo --target=pi 59174 63164 51601 -reparse
@zdavatz zdavatz changed the title Reparse not working for 59174 63164 57209 51601 Reparse not working for 59174 63164 51601 Dec 10, 2024
@zdavatz
Copy link
Owner Author

zdavatz commented Dec 10, 2024

  1. patinfos.each{ |iksnr, pi| $stdout.puts pi.localized_name if pi.iksnrs.size == 0 };
  2. results in
    -> undefined method `iksnrs' for #<ODDB::Patinfo:0x00007fc29e854248 @odba_id=28685218, @descriptions=#<ODBA::Stub:3216600#28685220 @odba_class=ODDB::SimpleLanguage::Descriptions @odba_container=3062300#28685218>, @revision=2015-05-08 07:22:09.142301293 +0200, @oid=28685218, @odba_persistent=true, @Sequences=#<ODBA::Stub:3216620#28685219 @odba_class= @odba_container=3062300#28685218>, @odba_prefetch=nil, @pointer=#<ODDB::Persistence::Pointer:0x00007fc29ed72ec8 @directions=[[:patinfo, 28685218]]>, @odba_observers=[]>
  3. ODBA.cache.fetch(28685218, nil).iksnrs
  4. gives
    -> undefined method `iksnrs' for #<ODDB::Patinfo:0x00007fc29e854248 @odba_id=28685218, @descriptions=#<ODBA::Stub:3216600#28685220 @odba_class=ODDB::SimpleLanguage::Descriptions @odba_container=3062300#28685218>, @revision=2015-05-08 07:22:09.142301293 +0200, @oid=28685218, @odba_persistent=true, @Sequences=#<ODBA::Stub:3216620#28685219 @odba_class= @odba_container=3062300#28685218>, @odba_prefetch=nil, @pointer=#<ODDB::Persistence::Pointer:0x00007fc29ed72ec8 @directions=[[:patinfo, 28685218]]>, @odba_observers=[]>
  5. ODBA.cache.fetch(28685218, nil).class
  6. gives
    -> ODDB::Patinfo
  7. ODBA.cache.fetch(28685218)
  8. results in
    -> ODDB::Patinfo
  9. $x = ODBA.cache.fetch(28685218)
    -> ODDB::Patinfo
  10. $x.size
    -> undefined method `size' for #<ODDB::Patinfo:0x00007fc29e854248 @odba_id=28685218, @descriptions={"de"=>#<ODBA::Stub:11034420#55402861 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>, "fr"=>#<ODBA::Stub:11034440#55402862 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>}, @revision=2015-05-08 07:22:09.142301293 +0200, @oid=28685218, @odba_persistent=true, @Sequences=#<ODBA::Stub:11034460#28685219 @odba_class=Array @odba_container=3062300#28685218>, @odba_prefetch=nil, @pointer=#<ODDB::Persistence::Pointer:0x00007fc29ed72ec8 @directions=[[:patinfo, 28685218]]>, @odba_observers=[]>
  11. $x.first.time
    -> undefined method `first' for #<ODDB::Patinfo:0x00007fc29e854248 @odba_id=28685218, @descriptions={"de"=>#<ODBA::Stub:11034420#55402861 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>, "fr"=>#<ODBA::Stub:11034440#55402862 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>}, @revision=2015-05-08 07:22:09.142301293 +0200, @oid=28685218, @odba_persistent=true, @Sequences=#<ODBA::Stub:11034460#28685219 @odba_class=Array @odba_container=3062300#28685218>, @odba_prefetch=nil, @pointer=#<ODDB::Persistence::Pointer:0x00007fc29ed72ec8 @directions=[[:patinfo, 28685218]]>, @odba_observers=[]>
  12. $x.last.time
    -> undefined method `last' for #<ODDB::Patinfo:0x00007fc29e854248 @odba_id=28685218, @descriptions={"de"=>#<ODBA::Stub:11034420#55402861 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>, "fr"=>#<ODBA::Stub:11034440#55402862 @odba_class=ODDB::PatinfoDocument @odba_container=8337460#28685220>}, @revision=2015-05-08 07:22:09.142301293 +0200, @oid=28685218, @odba_persistent=true, @Sequences=#<ODBA::Stub:11034460#28685219 @odba_class=Array @odba_container=3062300#28685218>, @odba_prefetch=nil, @pointer=#<ODDB::Persistence::Pointer:0x00007fc29ed72ec8 @directions=[[:patinfo, 28685218]]>, @odba_observers=[]>

@zdavatz
Copy link
Owner Author

zdavatz commented Dec 10, 2024

  1. patinfos.values.select {|pi| !pi.sequences.select{|seq| seq.patinfo != pi }.empty? }.length
    -> 46
  2. patinfos.values.select{|pi| next if pi.sequences.is_a?(String); !pi.sequences.select{|seq| seq.patinfo != pi }.empty? }.length
    -> 46

@zdavatz
Copy link
Owner Author

zdavatz commented Dec 10, 2024

  1. sequences.select {|seq| next unless seq.patinfo; !seq.patinfo.descriptions.values.select{|desc| next unless desc.iksnrs; desc.iksnrs.to_s.gsub(/[^0-9]/, '') !~ /#{seq.iksnr}/ }.empty? }.first.patinfo.description("de").iksnrs
  2. sequences.select {|seq| next unless seq.patinfo; !seq.patinfo.descriptions.values.select{|desc| next unless desc.iksnrs; desc.iksnrs.to_s.gsub(/[^0-9]/, '') !~ /#{seq.iksnr}/ }.empty? }.first.iksnr
    -> undefined method `iksnrs' for #<ODDB::Text::Chapter:0x00007fc2f98d7598 @odba_persistent=true, @Sections=[#<ODDB::Text::Section:0x00007fc22bfc9438 @subheading="", @paragraphs=[#<ODDB::Text::Paragraph:0x00007fc2f98d7318 @formats=[#<ODDB::Text::Format:0x00007fc22bfc9320 @values=[], @start=0, @EnD=-1>], @raw_txt=nil, @text="Sie d\u00FCrfen Amvuttra nicht erhalten,", @preformatted=false, @Format=#<ODDB::Text::Format:0x00007fc22bfc9320 @values=[], @start=0, @EnD=-1>>, #<ODDB::Text::Paragraph:0x00007fc2f98d7138 @formats=[#<ODDB::Text::Format:0x00007fc22bfc9168 @values=[], @start=0, @EnD=-1>], @raw_txt=nil, @text="\u00B7wenn Sie jemals eine schwere allergische Reaktion auf Vutrisiran oder einen der in Rubrik \u00ABWas ist in AMVUTTRA enthalten?\u00BB genannten sonstigen Bestandteile dieses Arzneimittels hatten.", @preformatted=false, @Format=#<ODDB::Text::Format:0x00007fc22bfc9168 @values=[], @start=0, @EnD=-1>>, #<ODDB::Text::Paragraph:0x00007fc2f98d70e8 @formats=[#<ODDB::Text::Format:0x00007fc22bfc90f0 @values=[], @start=0, @EnD=-1>], @raw_txt=nil, @text="Wenn Sie sich nicht sicher sind, sprechen Sie mit Ihrem Arzt, Apotheker oder dem medizinischen Fachpersonal, bevor Sie dieses Arzneimittel erhalten.", @preformatted=false, @Format=#<ODDB::Text::Format:0x00007fc22bfc90f0 @values=[], @start=0, @EnD=-1>>]>], @odba_id=52744963, @odba_prefetch=nil, @Heading="Wann darf AMVUTTRA nicht angewendet werden?", @odba_observers=[]>

@zdavatz
Copy link
Owner Author

zdavatz commented Dec 10, 2024

  1. sequences.select {|seq| next unless seq.patinfo; !seq.patinfo.descriptions.values.select{|desc| next unless desc.iksnrs; desc.iksnrs.to_s.gsub(/[^0-9]/, '') !~ /#{seq.iksnr}/ }.empty? }.first.iksnr
    -> undefined method `iksnrs' for #<ODDB::Text::Chapter:0x00007fc29e151310 @odba_persistent=true, @Sections=[], @odba_id=53229594, @odba_prefetch=nil, @Heading="TEZSPIRE\u00AE Fertigpen", @odba_observers=[]>
  2. https://generika.cc/de/generika/patinfo/reg/69080/seq/01/pack/001

@ngiger
Copy link
Collaborator

ngiger commented Dec 10, 2024

On my laptop (where I have the database as of November 26) reparsing works. Can you update the database to download?

@zdavatz
Copy link
Owner Author

zdavatz commented Dec 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants