/lib/DDG/Spice/RxInfo.pm

https://github.com/pardocz/zeroclickinfo-spice · Perl · 24 lines · 18 code · 5 blank · 1 comment · 1 complexity · a456ce389f797ac67c40c08e9ecb536c MD5 · raw file

  1. package DDG::Spice::RxInfo;
  2. # ABSTRACT: Given an NDC or physical characteristics, returns an image or images of corresponding pill(s) along with some drug information
  3. use DDG::Spice;
  4. name "RxInfo";
  5. source "C3PI RxImageAccess RESTful API";
  6. description "Search for prespection and over the counter solid dosage pharmaceutical by NDC and characteristics (shape, color, imprint).";
  7. primary_example_queries "pill red round", "rxinfo 68180-0481-01", "pill LL blue";
  8. category "special";
  9. topics "everyday", "special_interest";
  10. code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/RxInfo.pm";
  11. attribution web => ['http://www.medicosconsultants.com', 'Medicos Consultants, LLC'];
  12. triggers startend => 'pill', 'rxinfo', 'capsule', 'tablet', 'softgel', 'caplets';
  13. spice to => 'http://rximage.nlm.nih.gov/api/rximage/1/rxbase?resolution=300&includeIngredients=true&parse=$1';
  14. spice wrap_jsonp_callback => 1;
  15. handle remainder => sub {
  16. return $_ if $_;
  17. return;
  18. };
  19. 1;