Widget:CJP3: Difference between revisions

Jump to navigation Jump to search
Christopher Popma (talk | contribs)
No edit summary
Christopher Popma (talk | contribs)
No edit summary
Line 24: Line 24:
                                         alert('Keys: ' + keys);
                                         alert('Keys: ' + keys);
                                         $.each(data.query.results, function(ind, val) {
                                         $.each(data.query.results, function(ind, val) {
                                           alert(val.fulltext);
                                           drugNameFull = val.fulltext;
                                          drugNameShort = drugNameLong.split("#")[0];
                                          pillImprint = value.printouts["Pill Imprint"];
                                          pillDosage = value.printouts["Pill Dosage"];
                                          pillIngred = value.printouts["Pill Ingred"];
                                          pillColor = value.printouts["Pill Color"];
                                          pillShape = value.printouts["Pill Shape"];
                                          pillSize = value.printouts["Pill Size (mm)"];
                                          pillScoring = value.printouts["Pill Scoring"];
                                          ndc = value.printouts["NDC"];
                                          pillName = value.printouts["Pill Name"];
                                          alert(drugNameFull + '\n' + drugNameShort + '\n' + pillImprint + '\n' + pillDosage + '\n' + pillIngred + '\n' + pillColor + '\n' + pillShape + '\n' + pillSize + '\n' + pillScoring + '\n' + ndc + '\n' + pillName);
                                         });
                                         });
});
});

Revision as of 19:35, 3 June 2014