view · edit · sidebar · attach · print · history

20120310-patinfo-description

<< | Index | >>


summary

  • checed patinfo error.
    • Some Patinfo doesn't have any descriptions.
    • prevented error cause by this patinfos.

commits

index


Check up on error

Problem
@400000004f5ae5792582e9b4 error in SBSM::Session#http_headers:
/de/swissmedinfo/patinfo/reg/57912/seq/03
@400000004f5ae5792582f184 NoMethodError
@400000004f5ae5792582f56c undefined method `name' for "":String
@400000004f5ae5792582f56c
/var/www/oddb.org/src/view/drugs/patinfo.rb:188:in `patinfo_name'
@400000004f5ae5792582f56c
URL

http://oddb.yasuhiro.org/de/swissmedinfo/search/zone/drugs/search_query/57912/search_type/st_oddb#best_result

output from patinfo_name method in src/drugs/view/patinfo.rb

  • #<ODBA::Stub:133715260#23704580 @odba_class=ODDB::Patinfo @odba_container=133715290#1216023>
  • #<ODBA::Stub:133715260#23704580 @odba_class=ODDB::Patinfo @odba_container=133715290#1216023>

Patinfo are related by sequence.
These 2 packages has same patinfo.

checked bin/admin

ch.oddb> ODBA.cache.fetch('23704580').class
-> ODDB::Patinfo
ch.oddb> ODBA.cache.fetch('23704580').descriptions
-> {}
ch.oddb> ODBA.cache.fetch('23704580').descriptions['de']
-> 
ch.oddb> ODBA.cache.fetch('23704580').company_name
-> Mepha Pharma AG
ch.oddb> ODBA.cache.fetch('23704580').name_base
-> Ciprofloxacin-Mepha 0.1 i.v.

Patinfo doesn't have any Descriptions .

checked exported patinfo.yaml

...
2645586 --- !oddb.org,2003/ODDB::Patinfo
2645587 oid: 23704580
2645588 descriptions:
2645589 article_codes:
2645590 - :article_ean13: "7680579120038"
2645591   :article_pcode: "3583404"
2645592   :article_size: 100 ml
2645593   :article_dose: 200mg / 100ml
2645594 - :article_ean13: "7680579120052"
2645595   :article_pcode: "3583427"
2645596   :article_size: 200 ml
2645597   :article_dose: 400mg / 200ml
2645598 
2645599 --- !oddb.org,2003/ODDB::Patinfo
2645600 oid: 23784452
2645601 descriptions: !oddb.org,2003/ODDB::SimpleLanguage::Descriptions
2645602   de: !oddb.org,2003/ODDB::PatinfoDocument2001
2645603     name: "Intelence\xC2\xAE"
2645604     company: !oddb.org,2003/ODDB::Text::Chapter
2645605       heading: JANSSEN-CILAG
2645606       sections: []
2645607 
2645608     galenic_form:
2645609     effects: !oddb.org,2003/ODDB::Text::Chapter
...

Mesures for empty patinfos

1. no Pi mark

At result list, skipped Patinfo link If Patinfo doesn't have any descriptions.

z.B.

commit:

2. 404 patinfo

If request comes to patinfo that doesn't have any descriptions, return 404 not found.

z.B.

commit:

view · edit · sidebar · attach · print · history
Page last modified on March 10, 2012, at 02:54 PM